Raman spectrum classification and identification method and system
By constructing the M-dimensional training data set of Raman spectral signals and calculating the centroid point and class radius, the problem of difficulty in determining similarity among similar species under high-dimensional data is solved, and effective classification is achieved in multi-dimensional space, improving the accuracy and robustness of classification.
Patent Information
- Application Number
- CN202411921592.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-18
AI Technical Summary
In the case of high-dimensional data, the problem of difficulty in determining similarity among similar species is mainly due to the complexity of high-dimensional data, limitations of human visualization capabilities, challenges in feature selection and extraction, and the impact of noise and interference.
By constructing an M-dimensional training data set of Raman spectral signals, the centroid points and class radius of each type of cell are calculated, and the inter-class relationship diagram and intra-class dispersion diagram are constructed based on this information, thereby realizing the effective classification of the classified data.
This method can effectively evaluate the quality of classification in multi-dimensional space, improve the accuracy and robustness of classification, reduce the impact of noise data on model training, and better reflect the true distribution of data.
Smart Images

Figure CN119848649A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of detection, and in particular to a Raman spectrum classification and identification method and system. Background Art
[0002] The Raman spectrum of a cell is a unique fingerprint of its chemical composition, containing information about its classification characteristics and physiological state. When collecting Raman spectra of cells for classification, the problem of difficulty in determining similarity between similar strains in the case of high-dimensional data is mainly caused by the complexity of high-dimensional data, the limitations of human visualization capabilities, the challenges of feature selection and extraction, and the influence of noise and interference.
[0003] As the data dimension increases, the complexity and sparsity of the data also increase. In Raman spectroscopy, the spectrum of each cell may contain a large number of characteristic peaks, which are intertwined in multidimensional space, making the spectral differences between similar strains difficult to capture and distinguish.
[0004] Humans have limited visualization capabilities for high-dimensional data and can usually only intuitively understand data in two or three-dimensional space. When the data dimension exceeds this range, we cannot directly judge the distribution and similarity of the data through vision, which makes it difficult to determine the effectiveness of classification. Summary of the invention
[0005] The embodiments of the present application provide a Raman spectrum classification and recognition method and system to at least solve the problem of difficulty in determining the effectiveness of classification.
[0006] In a first aspect, an embodiment of the present application provides a Raman spectrum classification and identification method, comprising:
[0007] The data set construction step is to obtain the Raman spectral signals of N types of cells for preprocessing and dimensionality reduction, and construct an M-dimensional training data set. The n-th type of sample is represented as 1≤n≤N;
[0008] A data processing step, based on the training data set, calculating the centroid point and class radius of each type of cell in the M-dimensional space, wherein the centroid point is the average value of all sample points in a type of sample in the M-dimensional space, and the class radius is the mean or median of all sample points in a type of sample to the centroid point;
[0009] The steps of constructing the graph model are to construct the inter-class relationship graph and the intra-class dispersion graph based on the centroid points and class radius of N types of cells. In the inter-class relationship graph, the spatial distance between any two classes is used as the inter-class distance D i,j The intra-class dispersion graph takes the centroid of the class as the center, and the distance between the sample point and the centroid is recorded as r n,i ,
[0010] In the classification and identification step, a data set to be classified is preprocessed and dimensionally reduced, and then mapped to the inter-class relationship diagram and the intra-class relationship diagram. Based on preset conditions, it is determined whether to classify it according to its distribution in the inter-class relationship diagram or the intra-class relationship diagram. If so, a sorting instruction is sent to the corresponding sorting device, and the category of the data set to be classified belongs to at least one of the N categories.
[0011] In some embodiments, the classification identification step further comprises:
[0012] The multidimensional space mapping step preprocesses and reduces the dimension of the data set to be classified, and then maps the data set to the inter-class relationship diagram and the intra-class relationship diagram by calculating the distance from the data point to the centroid point in the data set to be classified;
[0013] a distribution determination step, obtaining distribution data of data points in the inter-class relationship diagram and the intra-class relationship diagram in the data set to be classified, wherein the distribution data includes: the class to which the data point belongs, the spatial relationship of the classes to which the data point belongs, and the position of the data point in the intra-class relationship diagram, wherein the first discreteness threshold and the second discreteness threshold are set in the intra-class relationship diagram;
[0014] The classification judgment step analyzes the class to which the data point belongs and its spatial relationship, the position of the data point in the intra-class relationship diagram and the relationship between the first discreteness threshold and the second discreteness threshold, and determines whether to perform classification in combination with the preset conditions.
[0015] In some embodiments, in the inter-class relationship graph, the spatial relationship between any two classes is represented by a relationship ratio Rel, which is the ratio of the sum of the class radii of the two classes to the inter-class distance, and the spatial relationship includes: intersection, tangency or non-overlap.
[0016] If Rel>1, it means that the spaces of the two classes intersect, and the two classes can be clearly distinguished;
[0017] If Rel < 1, it means that the spaces of the two classes do not overlap and have a gap. The smaller the ratio, the larger the gap.
[0018] If Rel=1, it means that the spaces of the two classes are tangent.
[0019] In some embodiments, the preset condition is set to:
[0020] The data points are distributed in at least two classes, and the classes to which at least two data points belong intersect;
[0021] The data points of the data set to be classified are classified into the correct class to which the data points belong, and the data points exceeding the first proportion do not fall within the first discreteness threshold range in the intra-class relationship diagram;
[0022] Data points exceeding the second ratio are classified into a class to which any wrong data point belongs, and in the intra-class relationship diagram of the class, are within the range of the first discreteness threshold;
[0023] Data points exceeding the third ratio are classified into the class to which any wrong data point belongs, and fall within the range of the second discreteness threshold in the intra-class relationship diagram;
[0024] If any of the above conditions is met, the classification result is considered to be of poor validity and no classification is performed.
[0025] In some embodiments, the first ratio>the second ratio>the third ratio.
[0026] In some embodiments, a first threshold circle and a second threshold circle may be formed in the intra-class relationship diagram based on the first discreteness threshold and the second discreteness threshold, and the number of data points in the first threshold circle is greater than the number of data points in the second threshold circle.
[0027] In some embodiments, the model training step further includes:
[0028] Based on the set threshold, the outliers of the class in the classification results are deleted, and the centroid and class radius of each type of cell in the M-dimensional space are recalculated.
[0029] In some embodiments, the threshold is set to α, and the outliers satisfy the following conditions:
[0030] ||x n,i -C n ||>αR n .
[0031] In a second aspect, an embodiment of the present application provides a Raman spectrum classification and recognition system, comprising:
[0032] The dataset construction module is configured to obtain the Raman spectral signals of N types of cells for preprocessing and dimensionality reduction, and construct an M-dimensional training dataset. The n-th type of sample is represented as 1≤n≤N;
[0033] A data processing module is configured to calculate the centroid point and class radius of each type of cell in the M-dimensional space based on the training data set, wherein the centroid point is the average value of all sample points in a type of sample in the M-dimensional space, and the class radius is the mean or median value of all sample points in a type of sample to the centroid point;
[0034] The graph model construction module is configured to construct an inter-class relationship graph and an intra-class dispersion graph based on the centroid points and class radius of N-class cells. In the inter-class relationship graph, the spatial distance between any two classes is used as the inter-class distance D i,j The intra-class dispersion graph takes the centroid of the class as the center, and the distance between the sample point and the centroid is recorded as rn,i ;
[0035] The classification recognition module is configured to preprocess and reduce the dimension of a data set to be classified, and then map it to the inter-class relationship diagram and the intra-class relationship diagram, and determine based on preset conditions whether to classify it according to its distribution in the inter-class relationship diagram or the intra-class relationship diagram. If so, a sorting instruction is sent to the corresponding sorting device, and the category of the data set to be classified belongs to at least one of the N categories.
[0036] In some embodiments, the classification recognition module further comprises:
[0037] A multidimensional space mapping module is configured to pre-process and reduce the dimension of the data set to be classified, and then map the data set to the inter-class relationship diagram and the intra-class relationship diagram by calculating the distance from the data point to the centroid point in the data set to be classified;
[0038] A distribution determination module is configured to obtain distribution data of data points in the inter-class relationship diagram and the intra-class relationship diagram in the data set to be classified, wherein the distribution data includes: the class to which the data point belongs, the spatial relationship of the classes to which the data point belongs, and the position of the data point in the intra-class relationship diagram, wherein the intra-class relationship diagram is provided with a first discreteness threshold and a second discreteness threshold;
[0039] The classification judgment module is configured to analyze the class to which the data point belongs and its spatial relationship, the position of the data point in the intra-class relationship diagram and the relationship between the first discreteness threshold and the second discreteness threshold, and determine whether to perform classification in combination with the preset conditions.
[0040] Compared with the related art, the Raman spectrum classification and recognition method and system provided in the embodiment of the present application proposes a new solution for the classification problem in multi-dimensional space and visualization application, realizing a scale for comparing the quality of classification in multi-dimensional space. For detailed analysis, please refer to the specific implementation method.
[0041] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] 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:
[0043] Figure 1 is a flow chart of a Raman spectrum classification and identification method according to an embodiment of the present application;
[0044] Figure 2 is a step-by-step flow chart of a Raman spectrum classification and identification method according to an embodiment of the present application;
[0045] Figure 3 is a structural block diagram of a Raman spectrum classification and recognition system according to an embodiment of the present application;
[0046] Figure 4 This is a schematic diagram of the effect of the inter-class relationship diagram according to an embodiment of the present application;
[0047] Figure 5 It is a schematic diagram of the effect of the intra-class relationship diagram according to the preferred embodiment of the present application;
[0048] Figure 6 It is a schematic diagram of another type of internal relationship diagram effect according to a preferred embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0050] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0051] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0052] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0053] Microfluidics is a scientific technology that precisely manipulates fluids in micro-nanoscale space. It integrates sample preparation, reaction, separation, and detection by miniaturizing the basic functions of biological and chemical laboratories onto a chip of a few square centimeters. Cell sorting technology is a technology that separates specific cell subpopulations from mixed cell samples based on the characteristics of the cells. The purpose of this application is to serve cell sorting equipment. When collecting Raman spectra of cells for classification, the classification method based on this application solves the problem of difficulty in determining similarity between similar strains in high-dimensional data, breaks through the complexity of high-dimensional data and the limitations of human visualization capabilities, and facilitates the execution of sorting operations.
[0054] This embodiment provides a Raman spectrum classification and recognition method. Figure 1 to Figure 2 is a flow chart of a Raman spectrum classification and identification method according to an embodiment of the present application, such as Figure 1 to Figure 2 As shown, the process includes the following steps:
[0055] Dataset construction step S1: obtain the Raman spectral signals of N types of cells for preprocessing and dimensionality reduction, and construct an M-dimensional training dataset. The n-th type of sample is represented as 1≤n≤N;
[0056] Data processing step S2, based on the training data set, calculates the centroid point and class radius of each type of cell in the M-dimensional space. The centroid point is the average value of all sample points in a type of sample in the M-dimensional space, and the class radius is the mean or median of all sample points in a type of sample to the centroid point; based on the median, the robustness of the data and the resistance to outliers can be better reflected, and based on the mean, the overall level of the data can be better reflected and all valid information can be fully utilized. Centroid point C n It is expressed as:
[0057]
[0058] Among them, k n Indicates the number of samples corresponding to the nth class, each sample point is x n,i ∈R m , R is the set of real numbers.
[0059] Taking the calculation of the mean value to solve the class radius as an example, the class radius R in the embodiment of the present application is n It is expressed as:
[0060]
[0061] Here, |||| represents the Euclidean distance norm.
[0062] Step S3 of graph model construction: construct an inter-class relationship graph and an intra-class dispersion graph based on the centroid points and class radius of N class cells. In the inter-class relationship graph, the spatial distance between any two classes is used as the inter-class distance D. i,j The intra-class dispersion graph takes the centroid of the class as the center, and the distance between the sample point and the centroid is recorded as r n,i , the angles of the sample points are randomly distributed in the graph. In the intra-class dispersion graph, the closer the distance of a sample point to the centroid is, the closer the classification of the cell is to that class. In the embodiment of the present application, the spatial distance is solved based on the Euclidean distance, and it can also be replaced by the Mahalanobis distance;
[0063] D i,j =||c i -C j ||,i≠j,i,j=1,2,...,N
[0064] In the classification identification step S4, a data set to be classified is preprocessed and dimensionally reduced, and then mapped to the inter-class relationship diagram and the intra-class relationship diagram. Based on preset conditions, it is determined whether to classify according to its distribution in the inter-class relationship diagram or the intra-class relationship diagram. If so, a sorting instruction is sent to the corresponding sorting device. If not, the inter-class relationship diagram and the intra-class dispersion diagram are re-optimized, and the category of the data set to be classified belongs to at least one of the N categories.
[0065] Based on the above steps, the embodiment of the present application introduces the centroid point and class radius, which provides a clear geometric representation for each type of cell. The centroid point, as the center of a class of samples, can reflect the overall characteristics of the class of cells. The class radius provides information about the intra-class discreteness, which helps to evaluate the robustness of the classification. The inter-class relationship diagram provides an intuitive representation of the inter-class relationship by showing the spatial distance between any two classes. The intra-class discreteness diagram uses the centroid point as the center of the circle to show the distribution of sample points within the class. This helps to evaluate the accuracy and reliability of the classification, especially when there are outliers or noise.
[0066] In the above embodiment, preprocessing includes: band selection, smoothing, baseline correction, normalization, etc., and band selection selects a specific band or range from the original Raman spectrum for analysis to remove irrelevant or noisy areas, thereby focusing on the band containing useful information, which helps to reduce the amount of data for subsequent processing and improve the accuracy of analysis; the smoothing algorithm used in the smoothing process includes Fourier transform filter, Gaussian filter, etc.; through baseline correction, the background noise caused by the sample placement position, direction or instrument itself can be effectively removed, and the characteristic peaks in the spectrum can be highlighted, thereby improving the accuracy of analysis. Commonly used baseline correction methods include polynomial fitting, wavelet transform, etc. Dimensionality reduction processing includes: linear discriminant analysis LDA, T-SNE (t-Distributed Stochastic Neighbor Embedding), self-organizing map SOM and UMAP (Uniform Manifold Approximation and Projection), etc., which effectively reduce the data dimension and reduce the computational complexity, while retaining the useful information in the original data, which is helpful for classification.
[0067] In some embodiments, the classification and identification step S4 further comprises:
[0068] In a multi-dimensional space mapping step S401, after preprocessing and dimensionality reduction processing of the data set to be classified, the distance from the data point to the centroid in the data set to be classified is calculated, and the data is mapped to the inter-class relationship diagram and the intra-class relationship diagram;
[0069] Distribution determination step S402, obtaining distribution data of data points in the inter-class relationship diagram and the intra-class relationship diagram in the data set to be classified, wherein the distribution data includes: the class to which the data point belongs, the spatial relationship of the classes to which the data point belongs, and the position of the data point in the intra-class relationship diagram, wherein the intra-class relationship diagram is provided with a first discreteness threshold and a second discreteness threshold;
[0070] The classification judgment step S403 analyzes the class to which the data point belongs and its spatial relationship, the relationship between the position of the data point in the intra-class relationship diagram and the first discreteness threshold and the second discreteness threshold, and determines whether to perform classification in combination with the preset conditions.
[0071] Based on the above steps, the analysis of the classification effectiveness of the embodiment of the present application takes into account both the inter-class relationship and the intra-class dispersion, thereby improving the accuracy of classification; when the classification effect is not obvious or there are disagreements, the scheme can refuse classification and avoid erroneous classification results.
[0072] In some embodiments, in the inter-class relationship graph, the spatial relationship between any two classes is represented by a relationship ratio Rel, which is the ratio of the sum of the class radii of the two classes to the inter-class distance, and the spatial relationship includes: intersection, tangency or non-overlap.
[0073] If Rel>1, it means that the spaces of the two classes intersect, and the two classes can be clearly distinguished;
[0074] If Rel < 1, it means that the spaces of the two classes do not overlap and have a gap. The smaller the ratio, the larger the gap.
[0075] If Rel=1, it means that the spaces of the two classes are tangent, which helps to identify which classes are close to or overlapping, and which classes are far away from each other. By introducing the relationship ratio Rel to represent the spatial relationship between any two classes, the embodiment of the present application provides a new dimension for quantifying the relationship between classes, which helps to more accurately evaluate the similarities and differences between classes.
[0076] In some embodiments, the preset condition is set to:
[0077] If the data points are distributed in at least two classes, and the classes to which at least two data points belong intersect, it means that the two classes cannot be distinguished;
[0078] The data points of the data set to be classified are classified into the correct class to which the data points belong, and the data points exceeding the first proportion do not fall within the first discreteness threshold range in the intra-class relationship diagram. Optionally, the first proportion of the present application is configured as 50%. For ease of understanding, it is assumed that the data set to be classified belongs to the i-th classification. This condition indicates that there are data points that are accurately classified into the i-th class, but if more than 50% are not classified within the first threshold circle, it is considered that the classification effect is not obvious;
[0079] Data points exceeding the second ratio are classified into the class to which any wrong data point belongs, and belong to the first discreteness threshold range in the class intra-class relationship diagram of the class. Optionally, the second ratio of the present application is configured as 30%, that is, it needs to be classified into the i-th class, but more than 30% of the data points are clearly classified into the j-th class and belong to the first threshold circle range in the class intra-class relationship diagram of the j-th class, then it is considered that there is a disagreement in the classification effect, and it is easy to make mistakes;
[0080] Data points exceeding the third ratio are classified into the class to which any wrong data point belongs, and belong to the second discreteness threshold range in the intra-class relationship diagram. Optionally, the third ratio of the present application is configured as 10%, that is, it needs to be classified into the i-th class, but more than 10% of the data points are clearly classified into the j-th class and belong to the second threshold circle range in the intra-class relationship diagram of the j-th class, then it is considered that there is a disagreement in the classification effect, and it is easy to make mistakes;
[0081] If any of the above conditions is met, the classification result is considered to be of poor validity and no classification is performed.
[0082] Wherein, the first ratio>the second ratio>the third ratio. Based on the first discreteness threshold and the second discreteness threshold, a first threshold circle and a second threshold circle can be formed in the intra-class relationship diagram, and the number of data points in the first threshold circle is greater than the number of data points in the second threshold circle.
[0083] In some embodiments, the model training step further includes:
[0084] Based on the set threshold, the outliers of the class in the classification results are deleted, and the centroid and class radius of each type of cell in the M-dimensional space are recalculated.
[0085] In some embodiments, the threshold is set to α, and the outliers satisfy the following conditions:
[0086] ||x n,i -C n ||>αR n , that is, outliers are determined based on the proportional relationship between the distance between a point and the centroid and the class radius.
[0087] After deleting the outliers, we get a new set S′ n , accordingly, the calculated new centroid is expressed as:
[0088]
[0089] The new class radius is expressed as:
[0090]
[0091] Based on this, the distance between classes can be expressed as: D i,j=||C′ i -C′ j ||,i≠j,i,j=1,2,...,N.
[0092] At the same time, n,i =||x n,i -C′ n ||.
[0093] Based on the above steps, deleting outliers in the classification results based on the set threshold and recalculating the centroid points and class radius of each type of cell in the M-dimensional space are important steps to improve the accuracy and robustness of the classification effect, which helps to reduce the impact of noise data on model training and better reflect the true distribution of the data.
[0094] This application collects tens of thousands of Raman spectra of 6 types of cells for experiments, uses LDA to reduce the dimension to 5-dimensional space, generates inter-class relationship diagrams and intra-class relationship diagrams, and then classifies the new 200 data to determine the feasibility of generating the following Figure 4 The relationship diagram between classes shown:
[0095] The figure shows the distance and REL ratio between different categories in the form of blocks. It can be seen that the ec and sm categories have high similarities and are not easy to distinguish in this spatial dimension. Other types of cells can achieve good distinction effects.
[0096] Figure 5 , Figure 6 The following is the intra-class dispersion diagram of ec and sm classes, see Figure 5 , Figure 6 As shown in the figure, the inter-class control radius is used to represent the first threshold circle, and the intra-class control radius is used to represent the second threshold circle. The distances of these two types of cells from the centroid are relatively discrete, and no good clustering effect is shown.
[0097] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0098] This embodiment also provides a Raman spectrum classification and identification system, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be repeated hereafter. As used below, the terms "module", "unit", "subunit", etc. can implement a combination of software and / or hardware for a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0099] Figure 3is a structural block diagram of a Raman spectrum classification and recognition system according to an embodiment of the present application, such as Figure 3 As shown, the system includes: a data set construction module 1, a data processing module 2, a graph model construction module 3 and a classification recognition module 4. Among them:
[0100] The data set construction module 1 is configured to obtain the Raman spectral signals of N types of cells for preprocessing and dimensionality reduction, and construct an M-dimensional training data set. The n-th type of sample is represented as 1≤n≤N;
[0101] The data processing module 2 is configured to calculate the centroid point and class radius of each type of cell in the M-dimensional space based on the training data set, wherein the centroid point is the average value of all sample points in a type of sample in the M-dimensional space, and the class radius is the mean or median of all sample points in a type of sample to the centroid point;
[0102] The graph model building module 3 is configured to build an inter-class relationship graph and an intra-class dispersion graph based on the centroid points and class radius of N class cells. In the inter-class relationship graph, the spatial distance between any two classes is used as the inter-class distance D i,j The intra-class dispersion graph takes the centroid of the class as the center, and the distance between the sample point and the centroid is recorded as r n,i ;
[0103] The classification identification module 4 is configured to preprocess and reduce the dimension of a data set to be classified, and then map it to the inter-class relationship diagram and the intra-class relationship diagram, and determine based on preset conditions whether to classify it according to its distribution in the inter-class relationship diagram or the intra-class relationship diagram. If so, a sorting instruction is sent to the corresponding sorting device, and the category of the data set to be classified belongs to at least one of the N categories.
[0104] In the above embodiment, the classification identification module 4 further includes: a multidimensional space mapping module 401, a distribution determination module 402, and a classification determination module 403, wherein the multidimensional space mapping module 401 is configured to pre-process and reduce the dimension of the data set to be classified, and then map it to the inter-class relationship diagram and the intra-class relationship diagram by calculating the distance from the data point to the centroid point in the data set to be classified; the distribution determination module 402 is configured to obtain the distribution data of the data points in the data set to be classified in the inter-class relationship diagram and the intra-class relationship diagram, and the distribution data includes: the class to which the data point belongs, the spatial relationship of the class to which it belongs, and the position of the data point in the intra-class relationship diagram, and the first discreteness threshold and the second discreteness threshold are set in the intra-class relationship diagram; the classification determination module 403 is configured to analyze the class to which the data point belongs and its spatial relationship, the position of the data point in the intra-class relationship diagram and the relationship between the first discreteness threshold and the second discreteness threshold, and determine whether to classify in combination with the preset conditions.
[0105] Based on the above system, the sorting equipment that the system relies on can automatically process Raman spectral signals, perform preprocessing, dimensionality reduction and classification and recognition, which greatly improves the efficiency and accuracy of classification and recognition. By constructing inter-class relationship diagrams and intra-class dispersion diagrams, the system can intuitively display the spatial relationship and dispersion between cells, which helps users better understand the results of classification and recognition. The system can be adjusted according to different preset conditions and thresholds to adapt to different classification and recognition needs.
[0106] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0107] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described 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.
[0108] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A Raman spectrum classification and identification method, characterized in that: include: Dataset construction step: obtaining Raman spectral signals of N types of cells for preprocessing and dimensionality reduction to construct an M-dimensional training dataset; A data processing step, based on the training data set, calculating the centroid point and class radius of each type of cell in the M-dimensional space, wherein the centroid point is the average value of all sample points in a type of sample in the M-dimensional space, and the class radius is the mean or median of all sample points in a type of sample to the centroid point; The steps of constructing the graph model are as follows: based on the centroid points and class radius of N types of cells, the inter-class relationship graph and the intra-class dispersion graph are constructed. In the inter-class relationship graph, the spatial distance between any two classes is used as the inter-class distance D. i,j The intra-class dispersion graph takes the centroid of the class as the center, and the distance between the sample point and the centroid is recorded as r n,i ; In the classification and identification step, a data set to be classified is preprocessed and dimensionally reduced, and then mapped to the inter-class relationship diagram and the intra-class relationship diagram. Based on preset conditions, it is determined whether to classify it according to its distribution in the inter-class relationship diagram or the intra-class relationship diagram. If so, a sorting instruction is sent to the corresponding sorting device, and the category of the data set to be classified belongs to at least one of the N categories.
2. The Raman spectrum classification and identification method according to claim 1, characterized in that: The classification and identification step further comprises: The multidimensional space mapping step preprocesses and reduces the dimension of the data set to be classified, and then maps the data set to the inter-class relationship diagram and the intra-class relationship diagram by calculating the distance from the data point to the centroid point in the data set to be classified; a distribution determination step, obtaining distribution data of data points in the inter-class relationship diagram and the intra-class relationship diagram in the data set to be classified, wherein the distribution data includes: the class to which the data point belongs, the spatial relationship of the classes to which the data point belongs, and the position of the data point in the intra-class relationship diagram, wherein the first discreteness threshold and the second discreteness threshold are set in the intra-class relationship diagram; The classification judgment step analyzes the class to which the data point belongs and its spatial relationship, the position of the data point in the intra-class relationship diagram and the relationship between the first discreteness threshold and the second discreteness threshold, and determines whether to perform classification in combination with the preset conditions.
3. The Raman spectrum classification and identification method according to claim 2, characterized in that: In the inter-class relationship graph, the spatial relationship between any two classes is represented by the relationship ratio Rel, which is the ratio of the sum of the class radii of the two classes to the inter-class distance. The spatial relationship includes: intersection, tangency or non-overlap.
4. The Raman spectrum classification and identification method according to claim 3, characterized in that: The preset conditions are set as: The data points are distributed in at least two classes, and the classes to which at least two data points belong intersect; The data points of the data set to be classified are classified into the correct class to which the data points belong, and the data points exceeding the first proportion do not fall within the first discreteness threshold range in the intra-class relationship diagram; Data points exceeding the second ratio are classified into a class to which any wrong data point belongs, and in the intra-class relationship diagram of the class, are within the range of the first discreteness threshold; Data points exceeding the third ratio are classified into the class to which any wrong data point belongs, and fall within the range of the second discreteness threshold in the intra-class relationship diagram; If any of the above conditions are met, no classification will be performed.
5. The Raman spectrum classification and identification method according to claim 4, characterized in that: The first ratio>the second ratio>the third ratio.
6. The Raman spectrum classification and identification method according to claim 4, characterized in that: A first threshold circle and a second threshold circle may be formed in the intra-class relationship diagram based on the first discreteness threshold and the second discreteness threshold, and the number of data points in the first threshold circle is greater than the number of data points in the second threshold circle.
7. The Raman spectrum classification and identification method according to any one of claims 1 to 6, characterized in that: The model training step also includes: Based on the set threshold, the outliers of the class in the classification results are deleted, and the centroid and class radius of each type of cell in the M-dimensional space are recalculated.
8. The Raman spectrum classification and identification method according to claim 7, characterized in that: The threshold is set to α, and the outliers meet the following conditions: ||x n,i -C n ||>αR n 。 9. A Raman spectrum classification and recognition system, characterized in that: include: A data set construction module is configured to obtain Raman spectral signals of N types of cells, perform preprocessing and dimensionality reduction processing, and construct an M-dimensional training data set; A data processing module is configured to calculate the centroid point and class radius of each type of cell in the M-dimensional space based on the training data set, wherein the centroid point is the average value of all sample points in a type of sample in the M-dimensional space, and the class radius is the mean or median value of all sample points in a type of sample to the centroid point; The graph model construction module is configured to construct an inter-class relationship graph and an intra-class dispersion graph based on the centroid points and class radius of N-class cells. In the inter-class relationship graph, the spatial distance between any two classes is used as the inter-class distance D i,j The intra-class dispersion graph takes the centroid of the class as the center, and the distance between the sample point and the centroid is recorded as r n,i ; The classification recognition module is configured to preprocess and reduce the dimension of a data set to be classified, and then map it to the inter-class relationship diagram and the intra-class relationship diagram, and determine based on preset conditions whether to classify it according to its distribution in the inter-class relationship diagram or the intra-class relationship diagram. If so, a sorting instruction is sent to the corresponding sorting device, and the category of the data set to be classified belongs to at least one of the N categories.
10. The Raman spectrum classification and identification system according to claim 9, characterized in that: The classification recognition module further comprises: A multidimensional space mapping module is configured to pre-process and reduce the dimension of the data set to be classified, and then map the data set to the inter-class relationship diagram and the intra-class relationship diagram by calculating the distance from the data point to the centroid point in the data set to be classified; A distribution determination module is configured to obtain distribution data of data points in the inter-class relationship diagram and the intra-class relationship diagram in the data set to be classified, wherein the distribution data includes: the class to which the data point belongs, the spatial relationship of the classes to which the data point belongs, and the position of the data point in the intra-class relationship diagram, wherein the intra-class relationship diagram is provided with a first discreteness threshold and a second discreteness threshold; The classification judgment module is configured to analyze the class to which the data point belongs and its spatial relationship, the position of the data point in the intra-class relationship diagram and the relationship between the first discreteness threshold and the second discreteness threshold, and determine whether to perform classification in combination with the preset conditions.