An entity classification method and system based on a probabilistic reproducing kernel function
By using a method based on the probability regeneration kernel function, the problem of low accuracy in domain adaptive classification and recognition in existing technologies is solved, and high-precision classification and recognition is achieved across different datasets.
Patent Information
- Application Number
- CN202210361230.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-07
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-04-07
AI Technical Summary
Existing classification algorithms cannot achieve domain-adaptive classification operations, resulting in low classification accuracy, especially in terms of insufficient adaptability between different datasets.
The method based on the probabilistic regeneration kernel function is adopted. The input data is acquired and mapped to the Hilbert space. The probabilistic kernel function is introduced, and the covariance matrix is optimized considering the probability distribution of the input data. The data is then projected to the RKHS subspace, and the optimal subspace is generated according to the preset criteria. Finally, the classification algorithm is used to process the data and output the classification result.
The domain-adaptive classification results are more accurate, improving classification and recognition accuracy across different datasets.
Smart Images

Figure CN114743046B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of classification recognition, and in particular to an entity classification method and system based on a probability reproducing kernel function. BACKGROUND
[0002] At present, the classification recognition algorithm can be used in multiple scenes in image classification: classification and recognition of faces, fingerprints and irises required in access control systems and payment systems; classification and recognition of license plates, road signs and signal lights required in the field of intelligent assisted driving and automatic driving; and classification and recognition of cancer cells and liver diseases required in the medical field. However, the current classification algorithm cannot realize domain adaptive classification. According to the law of large numbers, various distributions in nature are more biased towards Gaussian distribution, which is the factor why the Gaussian kernel function performs well on various data sets. However, flat fading signals obey Rayleigh distribution, and the effect will be much worse if the Gaussian kernel function is used. The current kernel function does not consider the probability distribution of the data set, resulting in the problem of low accuracy of the current classification recognition algorithm. SUMMARY
[0003] In order to solve the above technical problems, the purpose of the present application is to provide an entity classification method and system based on a probability reproducing kernel function, which can realize domain adaptive classification.
[0004] The first technical solution adopted by the present application is: an entity classification method based on a probability reproducing kernel function, comprising the following steps:
[0005] Obtaining input data and mapping the input data to a Hilbert space to obtain mapping data;
[0006] Introducing a probability kernel function, optimizing the covariance matrix by considering the probability distribution of the input data, and obtaining an optimized probability kernel function;
[0007] Projecting the mapping data to an RKHS subspace based on the optimized probability kernel function, and learning to generate an optimal subspace according to a preset criterion to obtain distribution-optimized data;
[0008] Processing the distribution-optimized data based on a classification algorithm and outputting a classification result.
[0009] Further, the step of obtaining input data and mapping the input data to a Hilbert space to obtain mapping data specifically comprises:
[0010] Obtaining input data, the input data comprising source domain data and target domain data;
[0011] Mapping the source domain data and the target domain data to a high-dimensional Hilbert space based on mapping parameters to obtain mapping data.
[0012] Further, the probability kernel function formula is expressed as follows:
[0013]
[0014] In the above formula, x i and x j represent data in the original space, p(x i |x0) represents the probability of transferring x0 to x i given x0, p(x j |x0) represents the probability of transferring x0 to x j given x0, x0 can be any sample in the data set, and x j is the sample after x0.
[0015] Further, the step of introducing the probability kernel function, considering the probability distribution of the input data to optimize the covariance matrix, and obtaining the optimized probability kernel function, specifically includes:
[0016] Solving the variance of the features in the input data and obtaining the probability distribution of the input data;
[0017] Introducing the probability kernel function and constructing the expression of the probability kernel function based on the probability distribution of the input data;
[0018] De-correlating the input data and adjusting the expression of the probability kernel function to obtain a second expression;
[0019] Calculating the variance corresponding to the features in the input data, and based on the second expression, traversing within a certain range, and obtaining the optimized probability kernel function according to the classification effect.
[0020] Further, it is judged that the input data is subject to Gaussian distribution, and the expression of the probability kernel function is as follows:
[0021]
[0022] In the above formula, σ0 represents the standard deviation when p(x0) is Gaussian distribution, σ is the standard deviation when p(x i ) is Gaussian distribution, and is also the standard deviation when p(x j ) is Gaussian distribution, and ρ is the correlation coefficient between x0 and x i .
[0023] Optionally, the step of projecting the mapped data into the RKHS subspace based on the optimized probability kernel function, and learning to generate the optimal subspace according to the preset criteria to obtain the distribution-optimized data, specifically includes:
[0024] Projecting the mapped data into the RKHS subspace based on the optimized probability kernel function;
[0025] Based on the MMD criterion, traverse the RKHS subspace and calculate the RKHS subspace source domain data and target domain data mean, and obtain the data mean;
[0026] The RKHS subspace with the minimum data mean is the optimal subspace;
[0027] According to the source domain data and the target domain data on the optimal subspace, the distribution-optimized data is obtained.
[0028] Optionally, the step of projecting the mapped data to the RKHS subspace based on the optimized probability kernel function, and learning and generating the optimal subspace according to the preset criterion to obtain the distribution-optimized data, specifically includes:
[0029] Project the mapped data to the RKHS subspace based on the optimized probability kernel function;
[0030] Based on the covariance criterion, traverse the RKHS subspace and calculate the RKHS subspace source domain data and target domain data covariance, and obtain the data covariance;
[0031] The RKHS subspace with the minimum data covariance is the optimal subspace;
[0032] According to the source domain data and the target domain data on the optimal subspace, the distribution-optimized data is obtained.
[0033] Further, the step of processing the distribution-optimized data based on the classification algorithm and outputting the classification result, specifically includes:
[0034] Based on the source domain data in the distribution-optimized data, a classifier is constructed by a classification algorithm;
[0035] Based on the classifier, the target domain data in the distribution-optimized data is classified and corresponding labels are generated, and the classification result is output.
[0036] The second technical scheme adopted by the present application is: an entity classification system based on a probability reproducing kernel function, comprising:
[0037] A mapping module acquires input data and maps the input data to a Hilbert space to obtain mapped data;
[0038] A probability kernel function introduction module is used to introduce a probability kernel function, consider the probability distribution optimization covariance matrix of the input data, and obtain an optimized probability kernel function;
[0039] A projection module projects the mapped data to an RKHS subspace based on the optimized probability kernel function, and learns and generates an optimal subspace according to a preset criterion to obtain distribution-optimized data;
[0040] The classification module processes the data after distribution optimization based on a classification algorithm, and outputs a classification result.
[0041] The method and system have the advantages that the probability kernel function is introduced in data classification, the covariance matrix of the relevant probability kernel function is optimized according to the probability distribution of a specific database to obtain the best reproducing kernel Hilbert space data classification, and the domain adaptive classification result is more accurate. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 is a step flow chart of an entity classification method based on a probability reproducing kernel function according to the present application;
[0043] Figure 2 is a schematic diagram of an entity classification method based on a probability reproducing kernel function according to the present application;
[0044] Figure 3 is a physical meaning diagram of a probability kernel function in a specific embodiment according to the present application;
[0045] Figure 4 is a comparison diagram of accuracy rates of a specific embodiment according to the present application and a Gaussian kernel function as a kernel function;
[0046] Figure 5 is a probability kernel function image diagram corresponding to a data set obeying a Gaussian distribution in a specific embodiment according to the present application;
[0047] Figure 6 is a probability kernel function image diagram corresponding to a data set obeying an exponential distribution in a specific embodiment according to the present application;
[0048] Figure 7 is a probability kernel function image diagram corresponding to a data set obeying a Rayleigh distribution in a specific embodiment according to the present application;
[0049] Figure 8 is a structural block diagram of an entity classification system based on a probability reproducing kernel function according to the present application. DETAILED DESCRIPTION
[0050] The present application will be further described in detail below in combination with the drawings and specific embodiments. For the step numbers in the following embodiments, only the setting is for the convenience of description, and the order between the steps is not limited in any way, and the execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0051] Referring to Figure 1 and Figure 2 , the present application provides an entity classification method based on a probability reproducing kernel function, which comprises the following steps:
[0052] S1, obtaining input data and mapping the input data to a Hilbert space to obtain mapped data;
[0053] Specifically, there is a processed data set including 991 data, a total of 5 classes, and each data is represented by 4 features. We randomly extract one third of the data from each class in the data set as source domain data, and the remaining two thirds of the data as target domain.
[0054] In solving the model corresponding to the hyperplane partitioning the feature space, it involves calculating i ) T φ(x j )(where x i and x j are data in the original space, and φ(x i ), φ(x j ) are their corresponding data in the Hilbert space) is the inner product of data x i and x j after they are mapped to the feature space. Since the dimension of the feature space may be high, even possibly infinite, it is usually difficult to directly calculate i ) T φ(x j ). To avoid this obstacle, a function can be conceived as follows:
[0055] κ(x i , x j ) = <φ(x i ), φ(x j )> = φ(x i ) T φ(x j )
[0056] That is, the inner product of x i and x j in the feature space is equal to the result calculated by the function κ(·,·) in the original sample space. With such a function, we do not need to directly calculate the inner product in the high-dimensional or even infinite-dimensional feature space.
[0057] Thus κ(x i , x j ) = <φ(x i ), φ(x j )> so that the operation on the low-dimensional space x i and x j completes the operation that the high-dimensional φ(x i ), φ(x j ) wants to complete.
[0058] S1.1, obtaining input data, the input data comprising source domain data and target domain data;
[0059] S1.2, mapping the source domain data and the target domain data to a high-dimensional Hilbert space based on a mapping function to obtain mapping data.
[0060] Specifically, in the domain adaptation problem, the data is divided into source domain data and target domain data. The source domain data is labeled, while the target domain data is unlabeled, and the statistical characteristics of the source domain data and the target domain data are different. The first thing to do is to map the source domain data and the target domain data to a high-dimensional Hilbert space using a mapping φ.
[0061] S2, introducing a probability kernel function, considering the probability distribution of the input data to optimize the covariance matrix, and obtaining an optimized probability kernel function;
[0062] Specifically, the probability distribution of the input data is obtained by calculating the variance of each feature, and the variance is traversed within a certain range. According to the classification result, the variance with the highest classification accuracy is obtained as the parameter of the probability kernel function, and thus the optimized probability kernel function is obtained.
[0063] S2.1, solving the variance of the features in the input data and obtaining the probability distribution of the input data;
[0064] S2.2, introducing a probability kernel function and generating an expression of the probability kernel function based on the probability distribution of the input data;
[0065] S2.3, decorrelating the input data and adjusting the expression of the probability kernel function to obtain a second expression;
[0066] Specifically, the probability kernel function formula is basically represented as:
[0067]
[0068] In the above formula, x i and x j represent data in the original space, p(x i |x0) represents the probability of transferring x0 to x i , p(x j |x0) represents the probability of transferring x0 to x j ,
[0069] The binary function satisfies symmetry and positive definiteness, so the binary function can be used as a kernel function.
[0070] Since a data set is subject to the same probability distribution, p(x i |x0) and p(x jis the conditional probability, representing the probability of transitioning to x i and x j , since they are samples from the same distribution but can be different, x i and x j are in different positions in Figure 3 , the physical meaning of the probability kernel function is the probability distribution from this time point to another time point.
[0071] Assume that the data is Gaussian distributed:
[0072] That is, p(x i , x0) is a two-dimensional normal distribution, then according to the definition of conditional probability, the expression of p(x i | x0) is obtained, and then the expression of the probability kernel function is obtained by integration.
[0073]
[0074] where σ0is the standard deviation of p(x0) when it is Gaussian distributed, σ is the standard deviation of p(x i ) when it is Gaussian distributed, and also the standard deviation of p(x j ) when it is Gaussian distributed, ρ is the correlation coefficient between x0and x i , and also the correlation coefficient between x0and x j , the equal standard deviations and the equal correlation coefficients above are to ensure the symmetry of the kernel function.
[0075] Let , we have:
[0076]
[0077] Since σ eq , ρ, σ0are constants.
[0078] Let , we have:
[0079]
[0080] When x i , x j are n-dimensional vectors, first de-correlate the data, and finally the result is
[0081]
[0082] In the above formula, x im represents the mth feature of the ith data, x jm represents the mth feature of the jth data, and ρ mCorrelation coefficient representing m features.
[0083] S2.4, calculate the variance corresponding to the features in the input data, and traverse in a certain range based on the second expression, and obtain an optimized probability kernel function according to the classification effect
[0084] Specifically, replace the parameter σ in the second expression (4) meq , find the σ that has the best classification effect meq , and obtain the optimized probability kernel function.
[0085] S3, project the mapping data into the RKHS subspace based on the optimized probability kernel function, and learn to generate the optimal subspace according to the preset criterion to obtain distribution-optimized data;
[0086] Specifically, project the mapping data into the RKHS subspace based on the optimized probability kernel function as a constraint;
[0087] The preset criterion includes MMD criterion and covariance criterion.
[0088] MMD criterion: in different RKHS subspaces, learn to minimize the RKHS subspace of the mean of the source domain data and the target domain data, that is, the distribution of the source domain data and the target domain data is most similar, and this RKHS subspace that minimizes the mean is the optimal subspace to be found.
[0089] Covariance criterion (co-variance criterio): in different RKHS subspaces, find the RKHS subspace that minimizes the covariance of the source domain data and the target domain data, that is, the distribution of the source domain data and the target domain data is most similar, and this RKHS subspace that minimizes the mean is the optimal subspace to be found.
[0090] S4, process the distribution-optimized data based on the classification algorithm, and output the classification result.
[0091] S4.1, based on the source domain data in the distribution-optimized data, a classifier is constructed by a classification algorithm;
[0092] S4.2, based on the classifier, the target domain data in the distribution-optimized data is classified and corresponding labels are generated, and the classification result is output.
[0093] Specifically, since the source domain data has labels, we get a classifier through the KNN algorithm (k is a parameter in the KNN algorithm, here k=1, k=3, k=5, k=7). Since the distribution of the source domain data and the target domain data is similar at this time, the target domain data is classified and labeled by the classifier, thereby achieving the purpose of classifying data.
[0094] Further as a preferred embodiment of the method, it further comprises:
[0095] S5, calculating the accuracy of the classification result, and comparing the accuracy with the Gaussian kernel function as the kernel function.
[0096] Specifically, referring to Figure 4 , represents a row vector composed of the standard deviation corresponding to each feature value of the database. represents the mean of this vector, that is The remaining three are σ = 1, σ = 1000, σ = 100000 substituted into the Gaussian kernel function , σ > 0.
[0097] Further as a preferred embodiment of the method, it further comprises modeling the relevant probability kernel function of the data subject to any probability distribution to obtain the kernel function in a general sense:
[0098] According to the formula:
[0099]
[0100] Since the kernel function needs to satisfy symmetry, a i = a j , z i = z j .
[0101] Let a = a i = a j , z = z i = z j , since x i = ax0 + z, we can get z = x i - ax0, then
[0102] p z (z) = p z (ax0 - x i )
[0103] x0 is a constant, and after derivation, we get: p(x i | x0) = p z (x i - ax0).
[0104]
[0105] Let x = x i - ax0, Δx = x i - x j , and substitute p(x i | x0) = p z (x i - ax0) to get:
[0106]
[0107] The definition of autocorrelation function is:
[0108]
[0109] The general form of more general kernel function is:
[0110]
[0111] Assume p z (z) obeys Gaussian distribution, that is Substitute it into the equation, we can get:
[0112]
[0113] The image of this kernel function is shown in Figure 5 .
[0114] Assume p z (z) obeys exponential distribution, that is Substitute it into the equation, we can get:
[0115]
[0116] The image of this kernel function is shown in Figure 6 .
[0117] Assume p z (z) obeys Rayleigh distribution, that is Substitute it into the equation, we can get:
[0118]
[0119] The image of this kernel function is shown in Figure 7 .
[0120] Since the kernel function has symmetry, it can be seen from Figure 5 , Figure 6 and Figure 7 that the image of the probability kernel function corresponding to the data set obeying Gaussian distribution, exponential distribution and Rayleigh distribution also has symmetry, which also proves the correctness of our derivation from the side.
[0121] As shown in Figure 8 , an entity classification system based on probability reproducing kernel function comprises:
[0122] A mapping module acquires input data and maps the input data to a Hilbert space to obtain mapped data.
[0123] The probability kernel function introduction module is configured to introduce a probability kernel function, consider a probability distribution of input data to optimize a covariance matrix, and obtain an optimized probability kernel function.
[0124] The projection module is configured to project the mapping data to an RKHS subspace based on the optimized probability kernel function, and learn and generate an optimal subspace according to a preset criterion to obtain distribution-optimized data.
[0125] The classification module is configured to process the distribution-optimized data based on a classification algorithm, and output a classification result.
[0126] The above method embodiments are applicable to the system embodiments, the system embodiments achieve the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.
[0127] The above is a specific description of the preferred embodiments of the application, but the application is not limited to the embodiments described above. Those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the application. These equivalent modifications or replacements are all included in the scope defined by the claims of the present application.
Claims
1. An entity classification method based on a probabilistic regeneration kernel function, characterized in that, Includes the following steps: Obtain the input data and map it to the Hilbert space to obtain the mapped data; By introducing a probability kernel function and considering the probability distribution of the input data, the covariance matrix is optimized to obtain the optimized probability kernel function. Based on the optimized probability kernel function, the mapped data is projected onto the RKHS subspace, and the optimal subspace is generated according to the preset criteria to obtain the data with optimized distribution. The data after distribution optimization is processed based on a classification algorithm, and the classification results are output. This entity classification method based on the probability regeneration kernel function is used in image classification scenarios, where the input data is an image. The step of introducing a probability kernel function, considering the probability distribution of the input data, optimizing the covariance matrix, and obtaining the optimized probability kernel function specifically includes: Solve for the variance of features in the input data and obtain the probability distribution of the input data; Introduce a probability kernel function and construct its expression based on the probability distribution of the input data; The input data is decorrelated, and the expression of the probability kernel function is adjusted to obtain the second expression; Calculate the variance of the features in the input data, and iterate within a certain range based on the second expression to obtain the optimized probability kernel function according to the classification effect; The input data is determined to follow a Gaussian distribution. The expression for the probability kernel function is as follows: In the above formula, σ0 represents the standard deviation of p(x0) when it follows a Gaussian distribution, and σ is the standard deviation of p(x0) when it follows a Gaussian distribution. i ) represents the standard deviation of the Gaussian distribution, and is also p(x) j Let ρ be the standard deviation of the Gaussian distribution, and ρ be the difference between x0 and x2. i The correlation coefficient between x0 and x j The correlation coefficient between them, x i and x j Let x0 represent any sample in the dataset, and x represent the data in the original space. j These are the samples following x0.
2. The entity classification method based on the probability regeneration kernel function according to claim 1, characterized in that, The step of acquiring input data and mapping it to Hilbert space to obtain mapped data specifically includes: Acquire input data, which includes source domain data and target domain data; The source domain data and the target domain data are mapped to a high-dimensional Hilbert space based on the mapping function to obtain the mapped data.
3. The entity classification method based on the probability regeneration kernel function according to claim 2, characterized in that, The introduced probability kernel function is expressed as follows: In the above formula, p(x) i |x0) represents the transition from x0 to x. i The probability, p(x) j |x0) represents the transition from x0 to x. j The probability of.
4. The entity classification method based on the probability regeneration kernel function according to claim 3, characterized in that, The step of projecting the mapped data onto the RKHS subspace based on the optimized probability kernel function, and learning to generate the optimal subspace according to a preset criterion to obtain the data with optimized distribution, specifically includes: The mapped data is projected onto the RKHS subspace based on the optimized probability kernel function; Based on the MMD criterion, the RKHS subspace is traversed and the mean values of the source domain data and the target domain data in the RKHS subspace are calculated to obtain the data mean. The optimal subspace is the RKHS subspace with the smallest data mean. Based on the source domain data and target domain data in the optimal subspace, the data with optimized distribution is obtained.
5. The entity classification method based on the probability regeneration kernel function according to claim 3, characterized in that, The step of projecting the mapped data onto the RKHS subspace based on the optimized probability kernel function, and learning to generate the optimal subspace according to a preset criterion to obtain the data with optimized distribution, specifically includes: Project the mapped data into the RKHS subspace; Based on the covariance criterion, the RKHS subspace is traversed and the covariance between the source domain data and the target domain data in the RKHS subspace is calculated to obtain the data covariance. The optimal subspace is the RKHS subspace with the smallest data covariance. Based on the source domain data and target domain data in the optimal subspace, the data with optimized distribution is obtained.
6. The entity classification method based on the probability regeneration kernel function according to any one of claims 4 or 5, characterized in that, The step of processing the distribution-optimized data based on the classification algorithm and outputting the classification result specifically includes: A classifier is constructed based on the source domain data in the optimized distribution data using a classification algorithm. The target domain data in the optimized distribution data is classified using a classifier, and corresponding labels are generated. The classification results are then output.
7. An entity classification system based on a probability regeneration kernel function, characterized in that, An entity classification method based on a probability regeneration kernel function as described in claim 1, comprising: The mapping module acquires input data and maps it to Hilbert space to obtain the mapped data. The probability kernel function introduction module is used to introduce the probability kernel function, which optimizes the covariance matrix considering the probability distribution of the input data to obtain the optimized probability kernel function. The projection module projects the mapped data onto the RKHS subspace based on the optimized probability kernel function, and learns to generate the optimal subspace according to a preset criterion, thus obtaining the data with optimized distribution. The classification module processes the optimized data based on a classification algorithm and outputs the classification results.
Citation Information
Patent Citations
Supervised neighborhood preserving embedding method based on kernel function
CN106940785A
Domain adaptive method based on Hilbert-Schmidt independent criterion subspace learning
CN111563539A