Handwritten numeral classification method and apparatus, and medium and device

By mapping handwritten numerical data to Hilbert space and performing principal component analysis projection, combined with spectrum correction discriminant analysis function, the problem of low accuracy in handwritten numerical recognition in the prior art is solved, and higher accuracy in handwritten numerical recognition is achieved.

WO2025082009A1PCT designated stage Publication Date: 2025-04-24CHANGCHUN UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/112645
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-15
Filing Date
2024-08-16
Publication Date
2025-04-24

AI Technical Summary

Technical Problem

The nuclear feature space based on distance nuclear mapping in the prior art may not be suitable for all types of handwritten numerical data, resulting in low accuracy in handwritten numerical recognition.

Method used

Principal component analysis projection is performed by mapping the original handwritten numerical data to Hilbert space, and the category attributes of handwritten numerical to be classified are calculated through the spectrum correction discriminant analysis function.

Benefits of technology

The accuracy of handwritten digit recognition is improved, and the discriminant ability of discriminating functions is enhanced by more fully retaining the structural characteristics of the population covariance matrix.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024112645_24042025_PF_FP_ABST
    Figure CN2024112645_24042025_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data processing. Disclosed is a handwritten numeral classification method. The method comprises: acquiring raw data having a category label, mapping an input data space to a Hilbert space, and executing both subsequent PCA dimensionality reduction and construction of a classification model in the Hilbert space; calculating a mean value and a sample covariance matrix of data of each category, so as to obtain a common covariance matrix of a set of samples; performing spectrum decomposition on the common covariance matrix, so as to obtain corresponding eigenvalues and orthogonal eigenvectors; selecting eigenvectors corresponding to k features having the largest eigenvalues, so as to form a data matrix after feature reduction, and using the matrix to map the raw data to a low-dimensional space, so as to obtain eigenvalues and eigenvectors in the low-dimensional space; and replacing eigenvalues of a covariance matrix after feature reduction with an estimated value of a population eigenvalue, performing spectrum correction on a sample covariance matrix, so as to form a spectrum correction discriminant analysis function, and determining a category attribute of a new sample by means of the function.
Need to check novelty before this filing date? Find Prior Art

Description

Handwritten digit classification method, device, medium and equipment Technical Field

[0001] The present application relates to the technical field of handwritten image processing, and in particular to a method, apparatus, medium and device for classifying handwritten digits. Background Art

[0002] Handwritten digit recognition technology can automatically convert handwritten digits into a processable digital form, reducing the need for manual input and processing. This is very useful for many applications, such as postal services, bank check processing, and handwritten digital note conversion. Through handwritten digit recognition technology, large amounts of handwritten documents, spreadsheets, and notes can be converted into digital form for archiving and management, helping to save storage space, improve retrieval efficiency, and facilitate data analysis and sharing.

[0003] In the prior art, CN103093235B discloses a handwritten digit recognition method based on improved distance kernel principal component analysis. This method first performs binarization preprocessing on the sample, maps the processed sample data to the kernel feature space using the distance kernel, and divides the training sample set into N subsets using K-means clustering in the kernel feature space. Then, the eigenvector of the kernel matrix is ​​calculated in the kernel space to obtain a transformation matrix, and the transformation matrix is ​​used for feature extraction. The extracted feature data set is placed in a support vector machine to establish a training model, and finally, the model is used to predict the recognition rate of the test sample.

[0004] However, the kernel feature space based on the distance kernel mapping of the above method may not be suitable for all types of handwritten digital data, resulting in low recognition accuracy of handwritten digital data.

[0005] Summary of the Invention

[0006] Based on this, it is necessary to provide a handwritten digit classification method, device, medium and equipment to address the above technical problems.

[0007] This manual adopts the following technical solutions:

[0008] This specification provides a handwritten digit classification method, including:

[0009] Obtain the overall eigenvalue λ of the collected original handwritten digital data with category labels j ;

[0010] The original handwritten digital data is mapped to the Hilbert space, and the handwritten digital data is projected to the high variance direction through principal component analysis in the Hilbert space to obtain the projection covariance matrix and the corresponding projection eigenvalue l of the projected data. j ;

[0011] By using the overall eigenvalue λ j Replace the projected eigenvalue l j Performing spectrum correction on the projection covariance matrix, and constructing a spectrum correction discriminant analysis function based on the spectrum corrected projection covariance matrix;

[0012] Use the spectral rectified discriminant analysis function to calculate the category attributes of the handwritten digits to be classified.

[0013] Furthermore, the overall covariance matrix Σ of the original handwritten digital data with category labels is:

[0014] Among them, σ 2 is an undetermined value used to measure the size of the non-Spiked eigenvalue, I P is the p*p dimensional identity matrix, λ j The eigenvalue that deviates from the center of the distribution is called the Spiked eigenvalue, v j is its corresponding eigenvector; r1 represents the number of large Spiked eigenroots, and r2 represents the number of small Spiked eigenroots.

[0015] Furthermore, projecting the handwritten digital data to a high variance direction by principal component analysis in the Hilbert space specifically includes:

[0016] Calculate the sample mean of data in Hilbert space Η and the sample covariance matrix S Φ :

[0017] Among them, n represents the total sample size, n i represents the number of training samples of the i-th category, is the jth sample of the i-th class sample, It is a sample Samples after projection into Hilbert space; Q = [Q0, Q1], where Q0 is the sample vector after centering of class 0 samples; represents the sample mean of the i-th type of training samples in the Hilbert space; S Φ is the sample covariance matrix;

[0018] For the sample covariance matrix S Φ Perform kernel transformation to obtain the kernel transformation sample matrix and kernel transformed sample covariance matrix

[0019] Kernel-based transformation of sample covariance matrix Constructing the projection matrix Using the projection matrix Project the original handwritten digit data.

[0020] Furthermore, the sample covariance matrix S Φ Perform kernel transformation to obtain the kernel transformation sample matrix and kernel transformed sample covariance matrix Specifically include:

[0021] For the sample covariance matrix S Φ Spectral decomposition, obtain the m wiki coordinates {w1,w2,...,w n};

[0022] Project the data in Hilbert space Η to m wiki coordinates {w1,w2,...,w n}, the transformed eigenvector y=[y1,y2,…,y m ] T ;

[0023] Based on the transformed eigenvector y=[y1,y2,…,y m ] T Calculate the kernel transform sample matrix and kernel transformed sample covariance matrix

[0024] Furthermore, the sample covariance matrix S Φ Spectral decomposition, obtain the m wiki coordinates {w1,w2,…,w n}, specifically including:

[0025] The sample covariance matrix S Φ Perform spectral decomposition and obtain: QQ T =WDW T W=[w1,w2,...,w n ] D=diag[λ1,λ2,…,λ n ]

[0026] According to QQ T =WDW T Get QQ T w i =λ i w i ;

[0027] On QQ T w i =λ i w i Multiply both sides by Q T , obtain (QT Q)Q T w i =λ i Q T w i ;

[0028] Let R = QQ T , then Q T w i is the eigenvector of R, which is related to QQ T have the same eigenvalues;

[0029] The spectral decomposition of the matrix R is: R = ΓEΓ T (Γ=[γ1,γ2,...,γ n ]);

[0030] The eigenvectors of the sample covariance matrix are expressed as:

[0031] At this time, {w1,w2,…,w n} is the m-dimensional basis coordinate in the Hilbert space, and the mapped sample Φ(x) is projected onto the eigenvector basis {w1,w2,…,w n}, the transformed eigenvector y=[y1,y2,…,y m ] T .

[0032] Furthermore, the kernel-based transform sample covariance matrix Constructing the projection matrix Using the projection matrix Project the original handwritten digital data, including:

[0033] Kernel transformation sample covariance matrix Perform eigendecomposition to obtain the eigenvectors corresponding to the first k eigenvalues;

[0034] Construct a projection matrix based on the eigenvector corresponding to the largest eigenvalue

[0035] Original handwritten digit data and projection matrix Multiply to obtain the data matrix after dimensionality reduction And the eigenvectors:

[0036] in, is The projection matrix is ​​composed of the first k columns of eigenvectors. The value of k is determined by the sample dimension p and the PCA dimensionality reduction ratio dim, that is, k = floor (p * dim), where floor is rounded down. is the eigenvector matrix, is a diagonal matrix of eigenvectors.

[0037] Furthermore, the use of the spectrum correction discriminant analysis function to calculate the category attributes of the handwritten digits to be classified specifically includes:

[0038] Among them, y is the new sample, u0 is the mean of the first class sample, u1 is the mean of the second class sample, s is the covariance matrix, π i is the prior probability of the i-th class sample.

[0039] A handwritten digit classification device, comprising:

[0040] The data acquisition module is used to obtain the overall characteristic value λ of the collected original handwritten digital data with category labels j ;

[0041] The projection module is used to map the original handwritten digital data to the Hilbert space, project the handwritten digital data to the high variance direction through principal component analysis in the Hilbert space, and obtain the projection covariance matrix and corresponding projection eigenvalue l of the projected data. j ;

[0042] Discriminant analysis function acquisition module is used to obtain the overall eigenvalue λ j Replace the projected eigenvalue l j Performing spectrum correction on the projection covariance matrix, and constructing a spectrum correction discriminant analysis function based on the spectrum corrected projection covariance matrix;

[0043] The discriminant module is used to calculate the category attributes of the handwritten digits to be classified using the spectral correction discriminant analysis function

[0044] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned handwritten digit classification method is implemented.

[0045] This specification provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the above-mentioned handwritten digit classification method is implemented.

[0046] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0047] The present invention decomposes the eigenvalue l of the sample covariance matrix j Directly replaced by the eigenvalue λ corresponding to the overall covariance matrix jThe sample covariance matrix structure is spectrally corrected to retain the structural characteristics of the overall covariance matrix more completely, so that the discriminant function obtained has stronger discrimination ability, thereby achieving higher handwritten digit recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0049] FIG1 is a flow chart of a handwritten digit classification method provided in this specification;

[0050] FIG2 is a schematic diagram of a handwritten digit classification device provided in this specification;

[0051] FIG3 is a schematic diagram of a computer device for implementing a handwritten digit classification method provided in this specification. DETAILED DESCRIPTION

[0052] To make the purpose, technical solutions, and advantages of this specification more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0053] With the rapid development of computers, data has become more accessible, and the data we study is becoming increasingly high-dimensional, even infinite-dimensional. Classic classification algorithms are now showing their limitations. In high-dimensional settings, the estimates of the covariance matrix and the mean associated with each class are highly inaccurate, leading to severe degradation in classification performance. Linear discriminant analysis was originally proposed by RA Fisher in 1936. Under the assumption that the data is Gaussian, has completely known statistics and a common covariance matrix across classes, this model has been proven to be the optimal classifier with the lowest misclassification rate. However, this model is not suitable for high-dimensional data forms in modern contexts. In 2008, Fan Jianqing et al. estimated the impact of noise and proposed a solution based on feature selection in the paper. In 2015, Zollanvari et al. used the latest results of random matrix theory to obtain the optimal estimate of the regularization parameter and used regularized LDA to solve the problem of the irreversibility of the sample covariance matrix. In 2020, Houssem Sifaou et al. proposed a model with spiked covariance matrix features-I-LDA. While reducing the number of parameter estimates and the complexity of calculations, it retains the original structure of the overall covariance matrix. Its classification performance is also better than other existing LDA models. However, when considering the spiked model structure, this method ignores the effective information brought by the small spiked eigenroots.

[0054] The above improved models are all linear classification models. In other words, nonlinear classification data cannot be effectively classified by a linear classifier (a straight line or a plane). Therefore, the above improved models cannot be effectively applied to nonlinear classification data. Therefore, in the handwritten digit classification method provided, the kernel method is considered to map the nonlinearly separable sample data in the low-dimensional space to the high-dimensional space, and use the linear classifier in the high-dimensional space to solve the classification problem. Experiments have shown that the introduction of the kernel method can effectively improve the classification performance. In addition, this method adds a small spiked eigenroot to the spike model structure and performs spectral correction on the population covariance matrix estimator, so that it more completely preserves the structural information of the population covariance matrix and controls the estimation error to a smaller range.

[0055] Based on this, the present application discloses a spectrally corrected kernel linear classifier, SC-KLDA. This model cites theoretical results on large-dimensional random matrices and proposes that when the dimensions of the observed samples are of the same order of magnitude as the sample size (n→∞, p→∞, p / n→c), the distribution of the eigenvalues ​​of the population covariance matrix obeys the Marcenko-PasturLow curve. This application denotes the eigenvalues ​​that deviate from the center of the distribution as large and small spiked eigenvalues, respectively. Models with this characteristic are referred to as models with a spiked covariance matrix. The classification algorithm performed under the premise of this model structure includes the following steps: obtaining the original data with class labels; given a nonlinear mapping Φ, mapping the input data space to the Hilbert space Η, so that the subsequent PCA dimensionality reduction and classification model construction are performed in the Hilbert space: dividing the labeled data into a training set and a validation set according to a fixed ratio; calculating the mean and sample covariance matrix of each category data in the training set to obtain the common covariance matrix of the set samples; performing spectral decomposition on the common covariance matrix to obtain the corresponding eigenvalues ​​and orthogonal eigenvectors; selecting the eigenvectors corresponding to the "k" features with the largest eigenvalues ​​(i.e., the largest variance) to form a data matrix after feature reduction, and using this matrix to map the original data vector to a low-dimensional space to obtain the eigenvalues ​​and eigenvectors in the low-dimensional space; replacing the eigenvalues ​​of the covariance matrix after feature reduction with the estimated values ​​of the overall eigenvalues, and performing spectral correction on the sample covariance matrix structure to form a spectral correction discriminant analysis function, by which the category attributes of any new sample can be instantly determined.

[0056] The following describes in detail the technical solutions provided by various embodiments of the present application in conjunction with the accompanying drawings.

[0057] Figures 1 and 2 are flowcharts of a handwritten digit classification method in this specification. The digit recognition method proposed in this application is applicable to scenarios where the population covariance matrix Σ adopts the following specific form:

[0058] Among them, I P is the p*p dimensional identity matrix, λ j The eigenvalue that deviates from the center of the distribution is called the Spiked eigenvalue, v j is its corresponding eigenvector; r1 represents the number of large Spiked eigenroots, and r2 represents the number of small Spiked eigenroots.

[0059] The main process of a handwritten digit classification method is as follows: mapping the original handwritten digit data to the Hilbert space, projecting the handwritten digit data in the Hilbert space through principal component analysis, obtaining the projection covariance matrix and corresponding projection eigenvalues ​​of the projected data; performing spectral correction on the projection covariance matrix by replacing the projection eigenvalues ​​with the overall eigenvalues; and using the spectral correction discriminant analysis function to calculate the category attributes of the handwritten digits to be classified.

[0060] More specific steps are: obtain the original data with class labels; given a nonlinear mapping Φ, map the input original data space to the Hilbert space Η; divide the data in the Hilbert space into a training set and a validation set according to a fixed ratio; calculate the mean and sample covariance matrix of each category of data in the training set, and obtain the common covariance matrix of the set samples as an estimator of the covariance matrix of the unknown population; perform spectral decomposition on the common covariance matrix to obtain the corresponding eigenvalues ​​and orthogonal eigenvectors; directly replace the eigenvalues ​​of the sample covariance matrix decomposition with the eigenvalues ​​corresponding to the population covariance matrix. Eigenvalue, spectral correction is performed on the sample covariance matrix structure to obtain an estimator of the overall covariance matrix; the eigenvectors corresponding to the "k" features with the largest eigenvalues ​​(i.e., the largest variance) are selected to form a data matrix after feature reduction, and the original data vector is mapped to a low-dimensional space using this matrix to obtain the eigenvalues ​​and eigenvectors in the low-dimensional space; the eigenvalues ​​of the covariance matrix after feature reduction are replaced with the estimated values ​​of the overall eigenvalues, and the sample covariance matrix structure is spectrally corrected to form a spectral correction discriminant analysis function, which can instantly determine the category attributes of any new sample. The following is the expansion of each step:

[0061] Step 1: Obtain the raw data with class labels. The standard dataset for handwritten digit recognition contains a total of 10 subsets. This paper selects two subsets from this dataset as the overall data for the first and second class samples, denoted as I0 and I1, respectively. The sample dimensions and feature values ​​for class I0 are 6131*784, and the sample dimensions and feature values ​​for class I1 are 5851*784.

[0062] Step 2: Given a nonlinear mapping Φ, input the original data space Mapping to Hilbert space Η: x→Φ(x)

[0063] Step 3: Calculate the sample mean and covariance matrix of the Hilbert space data using the following formula:

[0064] Among them, n represents the total sample size, n i represents the number of training samples of the i-th category, is the jth sample of the i-th class sample, It is a sample Samples after projection into Hilbert space; Q = [Q0, Q1], where Q0 is the sample vector after centering of class 0 samples; represents the sample mean of the i-th type of training samples in the Hilbert space; S Φ is the sample covariance matrix.

[0065] Step 4: Using kernel techniques, we can express the linear expression of training samples in the space of Zhang Cheng. First, we transform S Φ Perform spectral decomposition and get QQ T =WDW T (W=[w1,w2,...,w n ]), we can get the following expression: QQ T w i =λ i w i

[0066] Multiply both sides of the equation by Q T (Q T Q)Q T w i =λQ T w i

[0067] Let R = Q T Q, obviously, Q T w i is the eigenvector of R, which is related to QQ T have the same eigenvalues. The spectral decomposition of the matrix R is: R = ΓEΓ T (Γ=[γ1,γ2,...,γ n ]), at this time, the eigenvector of the sample covariance matrix can be expressed as:

[0068] Now, {w1,w2,…,w n} is the m-dimensional basis coordinate in the Hilbert space, and the mapped sample Φ(x) is projected onto the eigenvector basis {w1,w2,…,w n}, we can get the transformed eigenvector y=[y1,y2,…,y m ] T ,in

[0069] Step 5: Calculate the sample mean and combined covariance matrix after kernel transformation according to the following formula:

[0070] in,

[0071] Step 6: Use PCA to simplify the data in Hilbert space. Calculate the covariance matrix of the data matrix Get its eigenvalues ​​and eigenvectors, select the matrix composed of the eigenvectors corresponding to the "k" features with the largest eigenvalues ​​(i.e., the largest variance), which is the data feature matrix after feature simplification The value of "k" is determined by the sample dimension (p) and the PCA dimensionality reduction ratio (dim), that is, k = floor(p*dim) (floor means rounding down);

[0072] Step 7: Select the eigenvectors corresponding to the "k" features with the largest eigenvalues ​​(i.e., the largest variance) to form the data matrix after feature simplification Use the matrix to map the original data vector to a low-dimensional space to obtain the data in the low-dimensional space, as well as the eigenvalues ​​and eigenvectors of the data matrix;

[0073] in is The projection matrix composed of the first k columns of eigenvectors, is the eigenvector matrix, is a diagonal matrix of eigenvectors;

[0074] Step 9: Directly replace the eigenvalues ​​of the sample covariance matrix decomposition with the eigenvalues ​​corresponding to the population covariance matrix, perform spectral correction on the sample covariance matrix structure, and obtain the estimator of the population covariance matrix. This function can be used to determine the category attributes of any new sample.

[0075] This application is a new approach to classification and identification when the dimension of the observed sample is of the same order of magnitude as the sample size. While retaining the original covariance matrix structure, the overall covariance matrix estimator is spectrally corrected. At the same time, the PCA algorithm is used to map high-dimensional data to a low-dimensional space, simplifying the features of the original data, reducing the computational complexity, and improving the classification performance.

[0076] Moreover, based on the existing classification model, this application further optimizes the algorithm structure: based on the original structure of the population covariance matrix estimator, it adds the study of small Spiked eigenvalues, and decomposes the eigenvalues ​​of the sample covariance matrix into j Directly replaced by the eigenvalue λ corresponding to the overall covariance matrix j, the spectrum of the sample covariance matrix structure is corrected. The structural characteristics of the population covariance matrix are retained more completely, so that although the estimator is not a consistent estimate of the population covariance matrix, its estimation error can be controlled within a smaller ideal range.

[0077] Secondly, this application uses the kernel method to solve the problem that linearly inseparable data cannot be applied to linear classification models: given a mapping function, the nonlinearly separable sample data in the low-dimensional space is mapped to the high-dimensional space, and the kernel technology is introduced in the high-dimensional space to avoid complex and dense point set calculations, and finally a linear classifier is used in the high-dimensional space to solve the classification problem.

[0078] Finally, the present invention combines the use of PCA to screen data features, which reduces the data dimension while retaining the dimensional data containing the main information to improve the classification efficiency of the model.

[0079] The above is a handwritten digit classification method provided in one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding handwritten digit classification device. The handwritten digit classification device provided in this specification includes:

[0080] The data acquisition module is used to obtain the overall characteristic value λ of the collected original handwritten digital data with category labels j ;

[0081] The projection module is used to map the original handwritten digital data to the Hilbert space, project the handwritten digital data to the high variance direction through principal component analysis in the Hilbert space, and obtain the projection covariance matrix and corresponding projection eigenvalue l of the projected data. j ;

[0082] Discriminant analysis function acquisition module is used to obtain the overall eigenvalue λ j Replace the projected eigenvalue l j Performing spectrum correction on the projection covariance matrix, and constructing a spectrum correction discriminant analysis function based on the spectrum corrected projection covariance matrix;

[0083] The discriminant module is used to calculate the category attributes of the handwritten digits to be classified using a spectrum correction discriminant analysis function.

[0084] The specific limitations of the handwritten digit classification device can be found in the limitations of the handwritten digit classification method described above and will not be further elaborated here. Each module in the aforementioned handwritten digit classification device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of these modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.

[0085] This specification also provides a computer-readable storage medium, which stores a computer program. The computer program can be used to execute the handwritten digit classification method provided in FIG. 1 .

[0086] This specification also provides a schematic diagram of the computer device structure shown in Figure 3. As shown in Figure 3, at the hardware level, the computer device includes a processor, an internal bus, a network interface, memory, and non-volatile storage, and may also include other hardware required for the service. The processor reads the corresponding computer program from the non-volatile storage into the memory and then runs it to implement the handwritten digit classification method provided in Figure 1.

[0087] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0088] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A handwritten digit classification method, characterized in that: include: Obtain the overall eigenvalue λ of the collected original handwritten digital data with category labels j ; The original handwritten digital data is mapped to the Hilbert space, and the handwritten digital data is projected to the high variance direction through principal component analysis in the Hilbert space to obtain the projection covariance matrix and corresponding projection eigenvalue l of the projected data. j ; By using the overall eigenvalue λ j Replace the projected eigenvalue l j Performing spectrum correction on the projection covariance matrix, and constructing a spectrum correction discriminant analysis function based on the spectrum corrected projection covariance matrix; Use the spectral rectified discriminant analysis function to calculate the category attributes of the handwritten digits to be classified.

2. The handwritten digit classification method according to claim 1, characterized in that: The overall covariance matrix Σ of the original handwritten digital data with category labels is: Among them, σ 2 is an undetermined value used to measure the size of the non-spiked eigenvalue, I P is the p*p dimensional identity matrix, λ j The eigenvalue deviating from the center of the distribution is called the Spiked eigenvalue, v j is the corresponding eigenvector; r1 represents the number of large Spiked eigenroots, and r2 represents the number of small Spiked eigenroots.

3. The handwritten digit classification method according to claim 1, characterized in that: The projecting of the handwritten digital data to the high variance direction by principal component analysis in the Hilbert space specifically includes: Calculate the sample mean of data in Hilbert space H and the sample covariance matrix S Φ : Among them, n represents the total sample size, n i represents the number of training samples of the i-th category, is the jth sample of the i-th class sample, It is a sample Samples after projection into Hilbert space; Q = [Q0, Q1], Q0 is the sample vector after the 0-class sample is centralized; represents the sample mean of the i-th type of training samples in the Hilbert space; S Φ is the sample covariance matrix; For the sample covariance matrix S Φ Perform kernel transformation to obtain the kernel transformation sample matrix and kernel transformed sample covariance matrix Kernel Transformation Sample Covariance Matrix Constructing the projection matrix Using the Projection Matrix Project the original handwritten digit data.

4. The handwritten digit classification method according to claim 3, characterized in that: The sample covariance matrix S Φ Perform kernel transformation to obtain the kernel transformation sample matrix and kernel transformed sample covariance matrix Specifically include: For the sample covariance matrix S Φ Spectral decomposition, obtain the m wiki coordinates {w1,w2,...,w n }; Project the data in the Hilbert space H to the m-dimensional coordinates {w1,w2,...,w n }, we get the transformed eigenvector y=[y1,y2,...,y m ] T ; Based on the transformed feature vector y=[y1,y2,…,y m ] T Calculate the kernel transform sample matrix and kernel transformed sample covariance matrix 5. The handwritten digit classification method according to claim 4, characterized in that: The sample covariance matrix S Φ Spectral decomposition, obtain the m wiki coordinates {w1,w2,…,w n }, specifically including: The sample covariance matrix S Φ Perform spectral decomposition and obtain: QQ T =WDW T W=[w1,w2,...,w n ] D=diag[λ1,λ2,...,λ n ] According to QQ T =WDW T Get QQ T w i =λ i w i ; On QQ T w i =λ i w i Multiply both sides by Q T , get (Q T Q)Q T w i =λ i Q T w i ; Let R = QQ T , then Q T w i is the eigenvector of R, which is related to QQ T have the same eigenvalues; The spectral decomposition of the matrix R is: R = ΓEΓ T (Γ=[γ1,γ2,…,γ n ]); The eigenvectors of the sample covariance matrix are expressed as: At this time, {w1,w2,…,w n } is the m-dimensional basis coordinate in the Hilbert space, projecting the mapped sample Φ(x) onto the eigenvector basis {w1,w2,...,w n }, we get the transformed eigenvector y=[y1,y2,…,y m ] T .

6. The handwritten digit classification method according to claim 1, characterized in that: The kernel-based transform sample covariance matrix Constructing the projection matrix Using the Projection Matrix Project the original handwritten digital data, including: Kernel transformation sample covariance matrix Perform eigendecomposition to obtain the eigenvectors corresponding to the first k eigenvalues; Construct a projection matrix based on the eigenvector corresponding to the largest eigenvalue Original handwritten digit data and projection matrix Multiply to obtain the reduced dimension data matrix And the eigenvectors: in, Is The projection matrix is ​​composed of the first k columns of eigenvectors. The value of k is determined by the sample dimension p and the PCA dimensionality reduction ratio dim, that is, k = floor (p * dim), where floor is rounded down. is the eigenvector matrix, is a diagonal matrix of eigenvectors.

7. The handwritten digit classification method according to claim 1, characterized in that: The method of using the spectrum correction discriminant analysis function to calculate the category attributes of the handwritten digits to be classified specifically includes: Among them, y is the new sample, u0 is the mean of the first type of sample, u1 is the mean of the second type of sample, s is the covariance matrix, π i is the prior probability of the sample of the i-th class.

8. A handwritten digit classification device, characterized in that: include: The data acquisition module is used to obtain the overall characteristic value λ of the collected original handwritten digital data with category labels. j ; The projection module is used to map the original handwritten digital data to the Hilbert space, project the handwritten digital data to the high variance direction through principal component analysis in the Hilbert space, and obtain the projection covariance matrix and corresponding projection eigenvalue l of the projected data. j ; Discriminant analysis function acquisition module is used to obtain the overall eigenvalue λ j Replace the projected eigenvalue l j Performing spectrum correction on the projection covariance matrix, and constructing a spectrum correction discriminant analysis function based on the spectrum corrected projection covariance matrix; The discriminant module is used to calculate the category attributes of the handwritten digits to be classified using a spectrum correction discriminant analysis function.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • A classification method based on projection residuals

    CN102298703A

  • Data classification method based on depth-width variable multi-kernel learning

    CN111738298A

  • Data dimension reduction method based on maximum ratio and linear discriminant analysis

    CN112836671A

  • Handwritten digit recognition method and device and computer storage medium

    CN117671704A

  • Method of classification of images among different classes

    US20200210755A1