Pseudo-ginseng producing area identification method based on machine learning, storage medium and device
By constructing a machine learning-based Panax notoginseng origin identification model, using near-infrared spectral data and logistic regression models, the problem of insufficient accuracy in Panax notoginseng origin identification is solved, the intelligent origin identification of Panax notoginseng medicinal materials is realized, and the identification accuracy is improved. sex and efficiency.
Patent Information
- Application Number
- CN202411070125.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-10-11
AI Technical Summary
The existing technology has insufficient accuracy in identifying the origin of Panax notoginseng. Especially when the medicinal materials are processed into pieces or powders, the identification capabilities of traditional character identification and microscopic identification are limited, and the image recognition accuracy is not high, and the illumination is uneven. Factors such as shadows and reflections have a greater impact.
The method of identifying the origin of Panax notoginseng based on machine learning is used to obtain the Panax notoginseng near-infrared spectrum data set, perform dimensionality reduction processing and build a logistic regression model, and use the support vector machine model and Lagrange multiplier algorithm to optimize the model parameters to achieve three-dimensional analysis. Intelligent identification of seven origins.
It achieves green, non-destructive and intelligent origin identification of Panax notoginseng medicinal materials, improves the iteration efficiency and stability of the model, enhances the accuracy and reliability of identification results, and reduces hardware costs.
Smart Images

Figure CN118762233A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence identification, and specifically relates to a method, storage medium and device for identifying the origin of Panax notoginseng based on machine learning. Background Art
[0002] Panax notoginseng is the dried root of a perennial herbaceous plant of the genus Panax in the Araliaceae family. In recent years, it has received widespread attention in the medical field because it is non-toxic and has no side effects. Panax notoginseng has a cultivation history of more than 600 years in China. Panax notoginseng produced in Wenshan, China is considered to be "invaluable" and is expensive. However, due to the serious continuous cropping obstacles in the original production area of Wenshan, Wenshan Panax notoginseng is under-planted and its price is much higher than that of other production areas. Using other Panax notoginseng as a substitute for Wenshan Panax notoginseng has become a very common problem in the herbal medicine market, and once Panax notoginseng leaves its place of origin, it is basically labeled as Wenshan Panax notoginseng. Therefore, it is necessary to identify the origin of Panax notoginseng.
[0003] Traditional methods for identifying Panax notoginseng are mainly character identification and microscopic identification. Character identification is to identify the authenticity, quality and origin of medicinal materials by observing the shape, size, color, texture, smell, surface and fracture characteristics, and the main identification characteristics in water test and fire test. It is the simplest, fastest and easiest identification method. However, this character identification method is only suitable for the identification of complete medicinal materials. When the medicinal materials are processed into pieces or powders, the necessary character characteristics are lost, and the identification ability of the character identification method is limited. Microscopic identification is to use microscopic technology to analyze and identify the tissue structure, cell morphology and inclusions of traditional Chinese medicine. It is suitable for the identification of complete medicinal materials, broken or powdered medicinal materials, and Chinese patent medicines whose appearance is difficult to identify. Microscopic identification is especially suitable for the identification of powdered medicinal materials. Compared with physical and chemical identification and molecular identification, microscopic identification requires simple instruments, uses less reagents, and has a fast identification speed, but it also has some shortcomings. The microscopic characteristics of medicinal materials of the same genus are similar, making it difficult to identify them. For example, the application number 201910168812.X, "A method for identifying authentic and fake mixed Chinese medicinal materials based on artificial intelligence", discloses that photographing authentic and fake Chinese medicinal material particles obtains a data set, and then the multi-dimensional features of the image data set are input into the SVM model for training, and finally the classification of authentic Chinese medicinal materials and fake Chinese medicinal materials is realized; the patent application number 202111593705.5, "A method for identifying authentic Chinese medicinal materials with hyperspectral images of adaptive random block convolution kernel networks", discloses that hyperspectral images of Chinese medicinal materials are collected to construct a data set, and then the optimal clustering framework is used to obtain the optimal band subset of the data set and select the best feature band, and then principal component analysis is used to reduce the dimension of the data set, and finally an adaptive random convolution kernel network is used to realize the classification of Chinese medicinal materials. Patent application number 202111034530.4, “A method for identifying medicinal materials and decoction pieces based on image annotation deep learning algorithm model”, discloses obtaining pictures of medicinal materials or decoction pieces to be identified and extracting features from the pictures, and then using the feature data to identify the type of medicine or decoction piece to be identified through a recurrent neural network model. Patent application number 202010360338.3, “A method for constructing a classification model for the provenance of Herba Anopheles based on NIR spectroscopy and its application”, discloses collecting near-infrared spectral data of Herba Anopheles samples, then preprocessing the infrared spectral data, and finally applying the SVM model to classify the provenance of Herba Anopheles.
[0004] In the above-mentioned prior art, since the morphology, color, texture and other characteristics of Chinese medicinal materials are affected by many factors and have large variability, the quality of the image and the shooting conditions will affect the accuracy of image recognition. For example, factors such as uneven lighting, shadows, and reflections will make it difficult to extract the features of the image, thereby affecting the identification results; the data preprocessing methods and machine learning models used in the above patents are mature methods and models, and the recognition accuracy given by the scheme is not high, which shows that the existing mature methods and models are difficult to directly apply to the identification of the origin and quality control of Chinese medicinal materials. Summary of the invention
[0005] In order to solve the problems existing in the above prior art, the present invention proposes a method for identifying the origin of Panax notoginseng based on machine learning, which comprises: obtaining a Panax notoginseng sample to be identified; constructing a Panax notoginseng near-infrared spectrum data set; performing dimensionality reduction processing on the data in the Panax notoginseng near-infrared spectrum data set; dividing the reduced dimensionality data set into a training set and a test set; constructing a Panax notoginseng origin identification model, wherein the Panax notoginseng origin identification model is a logistic regression model; inputting the data in the training set into the Panax notoginseng origin identification model for training; inputting the data in the test set into the trained Panax notoginseng origin identification model for testing; inputting the Panax notoginseng sample to be identified into the trained Panax notoginseng origin identification model to obtain a Panax notoginseng origin identification result;
[0006] Training the Panax notoginseng origin identification model includes:
[0007] S1, construct the prediction function of the support vector machine model;
[0008] S2, input the data in the training set into the support vector machine model to obtain the prediction results;
[0009] S3. Construct a target optimization function using the Lagrange multiplier algorithm according to the prediction results; and transform the target optimization function into a new target function;
[0010] S4, calculating the central parameter in the new objective function;
[0011] S5. Calculate the gradient of the Lagrangian function according to the central parameter;
[0012] S6. Update the Lagrange multiplier according to the gradient of the Lagrange function;
[0013] S7. Repeat steps S4 to S6. When the objective function converges, the model training is completed and the optimal model parameters are output.
[0014] To achieve the above objectives, the present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, any of the above-mentioned methods for identifying the origin of Panax notoginseng based on machine learning is implemented.
[0015] To achieve the above-mentioned purpose, the present invention also provides a Panax notoginseng origin identification device based on machine learning, comprising a processor and a memory; the memory is used to store a computer program; the processor is connected to the memory, and is used to execute the computer program stored in the memory, so that the Panax notoginseng origin identification device based on machine learning can execute any of the above-mentioned Panax notoginseng origin identification methods based on machine learning.
[0016] Beneficial effects of the present invention:
[0017] Based on the existing technical equipment, the present invention only needs to construct a near-infrared spectral data set of Panax notoginseng from different origins, and then realize green, non-destructive and intelligent origin identification of Panax notoginseng Chinese medicinal materials through software without increasing hardware costs; the present invention optimizes the parameter adjustment process of the support vector machine model by introducing the gradient descent method of the central parameter of the interior point method, which will optimize the iteration efficiency and stability of the model and better reflect the applicability and robustness of the new model; the inner product between each sample and other samples of the present invention is applied to the update speed of the Lagrange multiplier, so that a larger central parameter will lead to a faster update speed of the Lagrange multiplier, thereby improving the convergence speed of the model and the efficiency of operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is the overall flow chart of the present invention;
[0019] Figure 2 A flowchart of the present invention for performing dimensionality reduction processing on data in a Panax notoginseng near-infrared spectrum data set;
[0020] Figure 3 This is a training flow chart of the Panax notoginseng origin identification model of the present invention. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] A method for identifying the origin of Panax notoginseng based on machine learning, such as Figure 1 As shown, the method includes: obtaining a Panax notoginseng sample to be identified; constructing a Panax notoginseng near-infrared spectrum data set; performing dimensionality reduction processing on the data in the Panax notoginseng near-infrared spectrum data set; dividing the reduced dimensionality data set into a training set and a test set; constructing a Panax notoginseng origin identification model, wherein the Panax notoginseng origin identification model is a logistic regression model; inputting the data in the training set into the Panax notoginseng origin identification model for training; inputting the data in the test set into the trained Panax notoginseng origin identification model for testing; inputting the Panax notoginseng sample to be identified into the trained Panax notoginseng origin identification model to obtain a Panax notoginseng origin identification result.
[0023] like Figure 3 As shown, the training of the Panax notoginseng origin identification model includes:
[0024] S1, construct the prediction function of the support vector machine model;
[0025] S2, input the data in the training set into the support vector machine model to obtain the prediction results;
[0026] S3. Construct a target optimization function using the Lagrange multiplier algorithm according to the prediction results; and transform the target optimization function into a new target function;
[0027] S4, calculating the central parameter of the interior point method in the new objective function;
[0028] S5. Calculate the gradient of the Lagrangian function according to the central parameter of the interior point method;
[0029] S6. Update the Lagrange multiplier according to the gradient of the Lagrange function;
[0030] S7. Repeat steps S4 to S6. When the objective function converges, the model training is completed and the optimal model parameters are output.
[0031] In this embodiment, constructing a Panax notoginseng near-infrared spectral data set includes: collecting Panax notoginseng Chinese medicinal material samples from different origins; cleaning, drying and grinding the Panax notoginseng samples; taking 2 grams of sample powder and using a Fourier transform near-infrared spectrometer to collect near-infrared spectral data of the Panax notoginseng powder; storing all near-infrared spectral data and storing each sample by row; marking the origin of each sample to obtain a Panax notoginseng near-infrared spectral data set.
[0032] Specifically, multiple batches of Panax notoginseng Chinese medicinal material samples from different origins were collected and processed. First, after washing the soil on the surface of the Panax notoginseng samples, the samples were dried to constant weight at a constant temperature of 50°C using a Longyue LDO-9000 air drying oven, crushed using a grinder, and the medicinal powder was screened through an 80-mesh sieve to ensure uniform particle size. About 2 grams of powder was taken from each sample and placed in a glass weighing bottle to ensure that the surface of the powder was flat. Then, a Bruker Matrix-F Fourier transform near-infrared spectrometer was used to collect near-infrared spectral data. The parameters were set as follows: the resolution was 1.0cm -1 The scanning number was 64 times, air was used as reference, the scanning mode was diffuse reflectance spectroscopy, and the spectral range was 4000-10000cm -1 . Each Panax notoginseng powder sample was subjected to 3 spectral acquisitions, and the average spectrum was taken as the near-infrared spectrum of the sample. All spectra were measured in reflection mode and recorded as the logarithm of the reciprocal reflectance. Finally, the near-infrared spectrum data of each Panax notoginseng sample were stored row by row, and the origin of each sample was labeled to construct a Panax notoginseng near-infrared spectrum raw data set X with origin labels.
[0033] In this embodiment, since the dimension of each sample of the original dataset X of Panax notoginseng near-infrared spectrum reaches 6000 dimensions, if the original dataset X is directly used for the training and testing of the next model, it will inevitably consume more computing resources and time. Therefore, it is necessary to perform dimensionality reduction processing on the original dataset X of Panax notoginseng near-infrared spectrum to obtain a new dataset X after dimensionality reduction. p .like Figure 2 As shown, the dimensionality reduction processing of the data includes: calculating the intra-class scatter matrix of the Panax notoginseng near-infrared spectroscopy data set; calculating the inter-class scatter matrix of the Panax notoginseng near-infrared spectroscopy data set; solving the generalized eigenvalue problem to obtain eigenvalues and eigenvectors; arranging the eigenvectors in descending order according to the size of the eigenvalues, and selecting the first P eigenvectors as the new feature space; projecting the new feature space to obtain a projection matrix; using the projection matrix to project the original data X into a low-dimensional space to obtain a data matrix after dimensionality reduction.
[0034] The specific steps for data dimensionality reduction include:
[0035] Step 1: Calculate the intra-class scatter matrix S W , to measure the dispersion of data points of the same category; first, for each category C i , calculate the scatter matrix S of this class i .
[0036]
[0037] Among them, μ i represents the mean vector of the ith category of the original dataset X of Panax notoginseng near-infrared spectra, x k Represents the kth sample of the original dataset X of Panax notoginseng near-infrared spectrum.
[0038] Secondly, calculate the intra-class scatter matrix S W is the sum of the scatter matrices of all classes.
[0039]
[0040] Here, c is the number of categories.
[0041] Step 2: Calculate the inter-class scatter matrix S B , to measure the dispersion between different types of data points; first, calculate the overall mean μ of all data points.
[0042]
[0043] Among them, N represents the total number of samples in the original dataset X of Panax notoginseng near-infrared spectrum, M represents the total dimension of each sample in the original dataset X of Panax notoginseng near-infrared spectrum, and x ij Represents the data value of the jth feature of the ith sample of the Panax notoginseng near-infrared spectrum original dataset X.
[0044] Second, for each category C i , calculate the scatter matrix S between the mean vector of this class and the overall mean B .
[0045]
[0046] Among them, N i represents the number of samples in the ith category of the original dataset X of Panax notoginseng near-infrared spectroscopy, M represents the total dimension of each sample in the original dataset X of Panax notoginseng near-infrared spectroscopy, μ i represents the mean vector of the ith category of the original dataset X of Panax notoginseng near-infrared spectroscopy, and μ represents the overall mean of all data points of the original dataset X of Panax notoginseng near-infrared spectroscopy.
[0047] Step 3: Solve the generalized eigenvalue problem; find the projection matrix by solving the generalized eigenvalue problem.
[0048]
[0049] Among them, λ represents the eigenvalue and V represents the eigenvector matrix.
[0050] Step 4: Select the principal component; that is, arrange the eigenvectors in descending order of eigenvalue, and select the first P eigenvectors as the new feature space, where P is the dimension after dimensionality reduction (the default value of parameter P is 5, which can be adjusted according to actual conditions, and is usually less than 10).
[0051] Step 5: Data projection: The projection matrix W consisting of the original data set X of Panax notoginseng near-infrared spectrum and the selected eigenvectors is p Multiply them to get the reduced-dimensional data matrix X p .
[0052] X p =XV p
[0053] Among them, V p The projection matrix containing the first P eigenvectors.
[0054] For the reduced dimension dataset X p Split the dataset into training and test sets. p The basic principle of splitting is to randomly shuffle the samples in the entire data set to ensure that the training set and test set after splitting are random and representative sample subsets. Dataset X p 80% of the total number of p_train , and the remaining 20% is used as the test set X p_test .
[0055] In this embodiment, an optimized support vector machine model is designed for identification of the geographical origin of Panax notoginseng. The optimization idea of the new model is to use the gradient descent of the interior point method to optimize the support vector machine model. The advantage of the interior point method gradient descent is that the interior point method is an algorithm for solving linear and nonlinear optimization problems. It avoids the problem of relaxing the constraints in the exterior point method by finding the optimal solution in the feasible domain. This is very useful for processing unbalanced data sets or emphasizing the importance of specific samples.
[0056] In this embodiment, if Figure 3 As shown, the training of the Panax notoginseng origin identification model includes:
[0057] Step 1: Define the prediction model: According to the design of the support vector machine model, the prediction function of the support vector machine model is:
[0058]
[0059] Among them, W represents the weight vector to be optimized, b represents the offset, and X p_train Represents the dataset X after dimensionality reduction p The training set, Indicates that the model is in the training set X p_train The prediction results on .
[0060] Step 2: Define the optimization objective function: The idea of the support vector machine classification algorithm is to find a hyperplane to segment the samples. The principle of segmentation is to maximize the interval, and finally it is transformed into a convex quadratic programming problem to solve. The optimization objective function obtained by using the Lagrange multiplier method is to minimize the quadratic programming problem with constraints:
[0061]
[0062] Among them, μ i Represents the training set X based on the interior point method p_train The center parameter of the i-th training sample, N train Represents the training set X p_train The number of samples, x i_train Represents the training set X p_train The i-th training sample, y i_train Represents the training set X p_train The i-th training sample x i_train The true category, α i Represents the training set X p_train Lagrange multiplier for the ith training example.
[0063] Take the partial derivatives of the above equation with respect to w and b respectively and set them equal to zero. Transform the original problem into the problem of solving α, and finally obtain the new objective function:
[0064]
[0065] Step 3: Calculate the central parameter based on the interior point method: The gradient change of the Lagrangian function is controlled by the central parameter, that is, the central parameter realizes the adaptive adjustment of the change speed of the Lagrangian multiplier to ensure the iterative efficiency and stability of the model.
[0066]
[0067] Among them, N train Represents the training set X p_train The number of samples, x i_train Represents the training set X p_train The i-th training sample.
[0068] Step 4: Calculate the gradient of the Lagrangian function: According to the definition in step 2, the gradient of the Lagrangian function based on the interior point method is calculated as follows:
[0069]
[0070] Step 5: Update the Lagrange multiplier: Substitute the calculated Lagrange function gradient into the following formula to obtain the next iteration parameters of the model.
[0071]
[0072] Among them, t represents the current iteration, t+1 represents the next iteration, and η represents the parameter update step (learning rate), which ranges from (0,1). As the model training progresses, the learning rate η is dynamically adjusted to avoid training problems caused by excessive learning rates, thereby improving the training effect and convergence speed of the model. For example, the learning rate η can be reduced through the polynomial attenuation formula.
[0073]
[0074] Among them, η0 represents the initial step size, t max represents the maximum iteration time, and t represents the current iteration.
[0075] Step 6: Repeat steps 3 to 5 until the loss function of the model converges, and the model training is completed. At this time, the optimal model parameters are output as follows:
[0076]
[0077] Among them, W is the weight vector to be optimized, α i For the training set X p_train The Lagrange multiplier of the i-th training sample, b is the offset, N train Represents the training set X p_train The number of samples, x i_train Represents the training set Xp_train The i-th training sample, y i_train Represents the training set X p_train The i-th training sample x i_train The real category.
[0078] In this embodiment, the test set X p_test Input the trained model and return the predicted classification y pred . Its expression is:
[0079] y pred =sign(W T ·X p_test +b)
[0080] Calculate the predicted classification result y pred and the actual category y of the sample test , and finally the prediction accuracy of the logistic regression model based on the weighted mean square error gradient descent method is obtained; its expression is:
[0081]
[0082] Among them, count represents the count of the predicted classification results and the actual category of the sample, N test Denotes the test set X p_test The accuracy represents the prediction accuracy of the artificial intelligence model.
[0083] In terms of the identification of the origin of Chinese medicinal materials, this technical solution can accurately determine the origin of Panax notoginseng. The traditional method of identifying the origin of Panax notoginseng is subjective and uncertain, resulting in low reliability of the identification results. This technical solution uses big data technology to quickly and accurately identify the origin of Panax notoginseng based on the characteristic data of Panax notoginseng.
[0084] In terms of quality control of traditional Chinese medicine production, this technical solution can assist traditional Chinese medicine companies in accurately judging the quality of the purchased Panax notoginseng medicinal materials. Companies can better control the quality of raw materials and ensure that the produced medicines meet the prescribed quality standards.
[0085] In one embodiment of the present invention, the present invention also includes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned methods for identifying the origin of Panax notoginseng based on machine learning.
[0086] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0087] A device for identifying the origin of Panax notoginseng based on machine learning, comprising a processor and a memory; the memory is used to store computer programs; the processor is connected to the memory, and is used to execute the computer programs stored in the memory, so that the device for identifying the origin of Panax notoginseng based on machine learning can execute any of the above-mentioned methods for identifying the origin of Panax notoginseng based on machine learning.
[0088] Specifically, the memory includes: ROM, RAM, magnetic disk, USB flash drive, memory card or optical disk, etc., which can store program codes.
[0089] Preferably, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0090] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for identifying the origin of Panax notoginseng based on machine learning. It is characterized in that include: Obtaining a Panax notoginseng sample to be identified; Construct a Panax notoginseng near-infrared spectroscopy dataset; Perform dimensionality reduction on the data in the Panax notoginseng near-infrared spectroscopy dataset; The reduced-dimensional data set is divided into a training set and a test set; a Panax notoginseng origin identification model is constructed, wherein the Panax notoginseng origin identification model is a logistic regression model; The data in the training set are input into the Panax notoginseng origin identification model for training; Input the data in the test set into the trained Panax notoginseng origin identification model for testing; Inputting the Panax notoginseng sample to be identified into the trained Panax notoginseng origin identification model to obtain the Panax notoginseng origin identification result; Training the Panax notoginseng origin identification model includes: S1, construct the prediction function of the support vector machine model; S2, input the data in the training set into the support vector machine model to obtain the prediction results; S3. Construct a target optimization function using the Lagrange multiplier algorithm according to the prediction results; and transform the target optimization function into a new target function; S4, calculating the central parameter of the new objective function; S5. Calculate the gradient of the Lagrangian function according to the central parameter; S6. Update the Lagrange multiplier according to the gradient of the Lagrange function; S7. Repeat steps S4 to S6. When the objective function converges, the model training is completed and the optimal model parameters are output.
2. The method for identifying the origin of Panax notoginseng based on machine learning according to claim 1, It is characterized in that Constructing the Panax notoginseng near-infrared spectroscopy dataset includes: collecting Panax notoginseng Chinese medicinal material samples from different origins; cleaning, drying and grinding the Panax notoginseng samples; taking 2 grams of sample powder and using a Fourier transform near-infrared spectrometer to collect near-infrared spectral data of the Panax notoginseng powder; storing all near-infrared spectral data and storing each sample by row; marking the origin of each sample to obtain the Panax notoginseng near-infrared spectroscopy dataset.
3. The method for identifying the origin of Panax notoginseng based on machine learning according to claim 1, It is characterized in that The dimensionality reduction processing of the data includes: calculating the intra-class scatter matrix of the Panax notoginseng near-infrared spectroscopy data set; calculating the inter-class scatter matrix of the Panax notoginseng near-infrared spectroscopy data set; solving the generalized eigenvalue problem to obtain eigenvalues and eigenvectors; arranging the eigenvectors in descending order according to the size of the eigenvalues, and selecting the first P eigenvectors as the new feature space; projecting the new feature space to obtain a projection matrix; using the projection matrix to project the original data X into a low-dimensional space to obtain a data matrix after dimensionality reduction.
4. The method for identifying the origin of Panax notoginseng based on machine learning according to claim 1, It is characterized in that The prediction function of the support vector machine model is: Among them, W represents the weight vector to be optimized, b represents the offset, and X p_train Represents the dataset X after dimensionality reduction p The training set, Indicates that the model is in the training set X p_train The prediction results on .
5. The method for identifying the origin of Panax notoginseng based on machine learning according to claim 1, It is characterized in that The new objective function is: Among them, μ i Represents the training set X based on the interior point method p_train The center parameter of the i-th training sample, N train Represents the training set X p_train The number of samples, x i_train Represents the training set X p_train The i-th training sample, y i_train Represents the training set X p_train The i-th training sample x i_train The true category, α i Represents the training set X p_train Lagrange multiplier for the ith training example.
6. The method for identifying the origin of Panax notoginseng based on machine learning according to claim 1, It is characterized in that The expression for calculating the center parameter is: Among them, N train Represents the training set X p_train The number of samples, x i_train Represents the training set X p_train The i-th training sample.
7. The method for identifying the origin of Panax notoginseng based on machine learning according to claim 1, It is characterized in that The Lagrange multiplier is updated as: Among them, t represents the current iteration, t+1 represents the next iteration, and η represents the parameter update step size.
8. The method for identifying the origin of Panax notoginseng based on machine learning according to claim 1, It is characterized in that The optimal model parameters are: Among them, W is the weight vector to be optimized, α i For the training set X p_train The Lagrange multiplier of the i-th training sample, b is the offset, N train Represents the training set X p_train The number of samples, x i_train Represents the training set X p_train The i-th training sample, y i_train Represents the training set X p_train The i-th training sample x i_train The real category.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to provide a method for identifying the origin of Panax notoginseng based on machine learning as described in any one of claims 1 to 8.
10. A device for identifying the origin of Panax notoginseng based on machine learning, It is characterized in that It comprises a processor and a memory; the memory is used to store a computer program; the processor is connected to the memory and is used to execute the computer program stored in the memory, so that the device for identifying the origin of Panax notoginseng based on machine learning can execute the method for identifying the origin of Panax notoginseng based on machine learning as described in any one of claims 1 to 8.
