DEVICE FOR GENERATING LEARNING DATA, MODEL LEARNING DEVICE, SAMPLE CHARACTERISTICS ESTIMATION DEVICE, AND CHROMATOGRAPH MASS SPECTROSCOPY DEVICE
The learning data generation device addresses accuracy and efficiency issues in machine learning models by preprocessing chromatogram data to remove missing peaks, high correlations, and outliers, enhancing model performance for sample discrimination and estimation.
Patent Information
- Application Number
- JP2020158367
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-09-23
- Publication Date
- 2024-08-21
- Estimated Expiration
- 2040-09-23
AI Technical Summary
Existing machine learning models for analyzing chromatogram data face accuracy and efficiency issues due to the presence of missing values, correlations, and outliers in peak information, leading to decreased performance.
A learning data generation device that preprocesses peak information by removing missing peaks, peaks with high correlation, and outliers, generating training data that improves model accuracy and efficiency by using peak information associated with sample characteristics.
The preprocessing of peak information enhances the accuracy and efficiency of machine learning models by eliminating unnecessary features, resulting in improved discrimination and estimation of sample characteristics.
Smart Images

Figure 0007537203000007 
Figure 0007537203000008 
Figure 0007537203000024
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a learning data generating device, a model learning device, a sample property estimating device, and a chromatography mass spectrometry device. [Background technology]
[0002] There is known a system that uses software to analyze data obtained by various analytical devices such as GC (Gas Chromatograph), LC (Liquid Chromatograph), GCMS (Gas Chromatograph Mass Spectrometer), LCMS (Liquid Chromatograph Mass Spectrometer), etc. For example, Patent Document 1 discloses a data analysis device that is suitable for performing multi-component simultaneous analysis that simultaneously quantifies many components (compounds and elements) in a sample using a GCMS (see Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2019-74371 A Summary of the Invention [Problem to be solved by the invention]
[0004] It is possible to pick peaks from chromatogram peak information obtained from an analytical device such as a GCMS, detect the presence or absence of a specific substance, or perform various types of discrimination based on the detected peaks. In recent years, with the advancement of machine learning, a method has been considered in which the above-mentioned peak information obtained from multiple samples is used as learning data (teaching data) to learn a model through machine learning processing, and the generated trained model is used to perform various types of discrimination for unknown samples.
[0005] In this method, a model is trained by machine learning processing using a training data set in which the value of each peak (feature amount) for each sample is associated with a predetermined characteristic for each sample (e.g., food freshness and origin information, etc.). However, depending on the content of the training data set, the accuracy and learning efficiency of the trained model that is generated may decrease.
[0006] The present disclosure has been made to solve such problems, and an objective of the present disclosure is to generate learning data that can improve the accuracy and learning efficiency of a trained model when a model is trained through machine learning processing using peak information obtained from multiple samples. [Means for solving the problem]
[0007] The learning data generating device of the present disclosure is a learning data generating device used for generating a learning model. The learning model is generated by machine learning processing using data in which peak information indicating the result of mass spectrometry for a sample and characteristic information indicating a predetermined characteristic of the sample are associated with each other. The learning data generating device includes an acquisition unit that acquires peak information and characteristic information for each sample from a plurality of samples, and a processing unit that executes processing to generate learning data by processing the plurality of peak information acquired by the acquisition unit. The processing unit deletes data of a peak that is missing in any of the plurality of peak information from each of the plurality of peak information, and when a correlation coefficient between data of the remaining peaks is equal to or greater than a predetermined value, further deletes data of one of the peaks from each of the plurality of peak information, and sets the peak information composed of the data of the remaining peaks as input data of the teacher data. Effect of the Invention
[0008] According to the learning data generation device disclosed herein, learning data is generated from which unnecessary peak (feature) data has been deleted, thereby improving the accuracy of the trained model generated and also improving the learning efficiency of the model. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a block diagram showing a configuration of a learning data generating device according to an embodiment of the present disclosure. [Diagram 2] 2 is a block diagram showing a configuration of a learning device that performs model learning using learning data generated by the learning data generating device shown in FIG. 1. FIG. [Diagram 3] FIG. 1 is a block diagram showing a schematic configuration of a GCMS shown as an example of an apparatus for generating peak information about a sample. [Figure 4] 2 is a flowchart showing an example of a procedure of preprocessing executed in the learning data generating device shown in FIG. 1. [Diagram 5] 3 is a flowchart showing an example of a procedure of a learning process executed in the learning device shown in FIG. 2. [Figure 6] 1 is a block diagram showing a configuration of an estimation device according to an embodiment of the present invention. [Figure 7] 7 is a flowchart showing an example of a procedure of an estimation process executed in the estimation device shown in FIG. 6. [Figure 8] FIG. 1 shows an example of a chromatogram obtained as a result of analysis by the SPME method. [Figure 9] FIG. 5 is a diagram showing an example of a feature amount data map generated in step S30 of FIG. 4 in the first embodiment. [Figure 10] FIG. 5 is a diagram showing an example of a heat map of a correlation coefficient matrix indicating correlation coefficients between feature amounts calculated in step S40 of FIG. 4 in the first embodiment. [Figure 11] FIG. 5 is a diagram showing an example of a histogram for each feature amount calculated in step S60 of FIG. 4 in the first embodiment. [Figure 12] This figure shows box plots for each label after scaling the data for each feature. [Figure 13] FIG. 1 is a diagram illustrating an example of a logistic regression model. [Figure 14] FIG. 13 is a diagram showing the permutation importance values of each feature amount. [Figure 15]FIG. 2 shows selected peaks and library search results for corresponding compounds in Example 1. [Figure 16] FIG. 13 is a diagram showing a confusion matrix indicating an evaluation result of a trained model created in Example 1. [Figure 17] FIG. 1 is a first diagram for explaining rules 1 and 2. [Figure 18] FIG. 2 is a second diagram for explaining rules 1 and 2. [Figure 19] FIG. 3 is a third diagram for explaining rules 1 and 2. [Figure 20] FIG. 11 is a first diagram for explaining rule 3. [Figure 21] FIG. 2 is a second diagram for explaining rule 3. [Figure 22] FIG. 3 is a third diagram for explaining rule 3. [Figure 23] FIG. 1 is a diagram illustrating the random forest learning algorithm. [Figure 24] FIG. 13 is a diagram showing a confusion matrix indicating an evaluation result of a model created in Example 2. [Diagram 25] FIG. 1 shows an ROC curve. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings. In the drawings, the same or corresponding parts are designated by the same reference characters and their description will not be repeated.
[0011] 1 is a block diagram showing a configuration of a training data generating device according to an embodiment of the present disclosure. The present disclosure shows a learning device that learns a model by machine learning processing using training data in which peak information obtained from a GCMS, LCMS, or the like is associated with predetermined characteristics of a sample (e.g., food freshness and origin information, etc.). The present disclosure also shows an estimation device that estimates characteristics of an unknown sample by inputting peak information of the unknown sample obtained from a GCMS, LCMS, or the like into a trained model.
[0012] 1 is a device that generates learning data (teacher data) used to generate a model in the learning device. Since the learning data has a large effect on the accuracy of the model generated by the learning device (the estimation accuracy of the properties of an unknown sample), in this embodiment, learning data is generated by performing a specific pre-processing (described later) on the peak information of multiple samples acquired for model learning, and the model is learned using the learning data. In other words, this learning data generation device is a device that performs pre-processing for generating learning data from the peak information of multiple samples.
[0013] 1, a learning data generating device 10 includes a data acquiring unit 12, a processing unit 14, and a learning data storage unit 16. The data acquiring unit 12 acquires peak information of a plurality of samples used for model learning. In this embodiment, for a plurality of samples, peak information for each sample and corresponding sample characteristics are acquired as a set.
[0014] The peak information is peak data of a chromatogram obtained from GCMS, LCMS, or the like. The peak information may be peak data obtained by peak separation using software waveform processing such as deconvolution. Examples of sample characteristics include whether or not the freshness of a food has deteriorated (see Example 1 below), or whether the food is domestically produced or imported (see Example 2 below). The sample characteristics are not necessarily limited to these.
[0015] The processing unit 14 includes a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), etc. (none of which are shown). The CPU loads a program stored in the ROM into the RAM etc. and executes it. The program stored in the ROM is a program in which the processing procedure of the processing unit 14 is written. The processing unit 14 executes the following processes in accordance with these programs.
[0016] The processing unit 14 processes the peak information for each sample acquired by the data acquiring unit 12, and executes a process (pre-processing) for generating learning data to be used in the learning device. Specifically, in this embodiment, the processing unit 14 executes the following processes (1) to (5) on the peak information for each sample acquired by the data acquiring unit 12.
[0017] (1) If the peak intensity data (feature value) for a certain peak (feature) is missing in at least one sample, the data (feature value) for that peak (feature) is deleted from all samples (missing value processing). When training data contains missing values (feature values of 0), the model training algorithm may be limited, and the model training accuracy may decrease. For example, with random forests that use decision trees, models can be generated even if training data contains missing values, but with logistic regression, modeling is not possible if training data contains missing values. Also, when training data contains missing values, there are methods to fill in the missing values, but this may lead to a decrease in the reliability of the data and a decrease in the accuracy of the model.
[0018] Therefore, in the learning data generating device 10 according to the present embodiment, when peak intensity data is missing for a certain peak in any sample, the data for that peak is deleted from all samples. That is, in this missing value processing, a so-called listwise method is used. This makes it possible to realize highly accurate learning by employing various learning models. Note that whether or not a peak is missing is determined, for example, by whether or not the peak intensity is below a predetermined threshold value.
[0019] (2) For each sample acquired by the data acquisition unit 12, a feature data map is generated that lists the peak intensities (feature values) of the remaining peaks (feature values) and information (labels) indicating the characteristics of the sample. For example, when data of N samples is acquired by the data acquisition unit 12 and the number of remaining peaks after missing value processing is M, characteristic information for each sample (such as food freshness and origin information) is added to generate a feature amount data map of size N×(M+1). Note that the missing value processing in (1) may be performed after generating the feature amount data map.
[0020] (3) For peaks (feature values) that are correlated, the data for one peak is deleted from the feature value data map (correlation processing). If there is a strong correlation between features, problems of multicollinearity may occur, which may reduce the accuracy of the model when used for learning data. Therefore, in this embodiment, for peaks with a correlation coefficient equal to or greater than a threshold (e.g., 0.8), the data of one of the peaks is deleted. Note that this threshold may be changed according to the accuracy rate (accuracy) of the generated model. For example, if the accuracy rate is low, the threshold may be lowered. This makes it possible to further reduce the correlation between features, and is expected to improve the accuracy rate of the model.
[0021] (4) The data of peaks that have outliers in the distribution of peak intensities (feature values) for each peak (feature) are further removed from the feature data map (outlier processing). Since peculiar data such as outliers may also reduce the accuracy of the model when used as learning data, in this embodiment, peaks having outliers are also deleted. Whether or not data is an outlier is determined, for example, by whether or not the difference from the statistical median exceeds a predetermined threshold. In this case, the threshold may be changed according to the accuracy rate (accuracy) of the generated model. For example, if the accuracy rate is low, the threshold may be made smaller. This process may be omitted.
[0022] (5) The learning data, which uses each peak (feature) remaining in the feature data map and the peak intensity (feature value) of each peak for each sample as input data and the characteristic information (label) for each sample as correct answer data, is stored in the learning data storage unit 16. By performing machine learning using such preprocessed learning data as training data, the accuracy of the learning model can be improved.
[0023] The learning data storage unit 16 stores the learning data generated by the processing unit 14. As described later, the learning data stored in the learning data storage unit 16 is used as teacher data to perform model learning by a learning device described later. The learning data storage unit 16 is, for example, a storage device such as a hard disk drive (HDD (Hard Disk Drive)) or a solid state drive (SSD (Solid State Drive)).
[0024] Fig. 2 is a block diagram showing a configuration of a learning device that learns a model using learning data generated by the learning data generating device 10 shown in Fig. 1. Referring to Fig. 2, the learning device 20 includes a learning data storage unit 22, a model generating unit 24, and a model storage unit 26.
[0025] The learning data storage unit 22 stores the learning data generated in the learning data generation device 10. The learning data storage unit 22 is, for example, a storage device such as an HDD or an SSD. When the learning data generation device 10 and the learning device 20 are configured on the same computer, the learning data storage unit 16 may be used as the learning data storage unit 22.
[0026] The model generation unit 24 includes a CPU, a ROM, a RAM, etc. (none of which are shown). The programs stored in the ROM are programs describing the processing procedures of the model generation unit 24. The model generation unit 24 executes the following processes in accordance with these programs.
[0027] The model generation unit 24 acquires learning data from the learning data storage unit 22. The learning data is a data set in which a plurality of peaks (feature amounts) and the peak intensities (feature amount values) of each peak for each sample are used as input data, and characteristic information (labels) for each sample are used as correct answer data. Then, the model generation unit 24 executes machine learning processing using the acquired learning data to generate a learning model.
[0028] As the learning algorithm, various supervised learning algorithms can be adopted. In Example 1 described later, a logistic regression learning algorithm is adopted, and in Example 2 described later, a random forest learning algorithm is adopted. Note that the learning algorithm is not limited to these, and for example, a deep learning algorithm using a neural network or a support vector machine (SVM) algorithm can also be adopted.
[0029] The model storage unit 26 stores the trained model generated by the model generation unit 24. As described below, the trained model stored in the model storage unit 26 can be used to estimate the characteristics of an unknown sample (such as the freshness or place of origin of food) by an estimation device described below. The model storage unit 26 is also a storage device such as an HDD or SSD.
[0030] 3 is a block diagram showing a schematic configuration of a GCMS shown as an example of an apparatus for generating peak information about a sample. Referring to FIG. 3, a GCMS 30 includes a GC section 32, an MS (Mass Spectrometer) section 34, a data processing section 36, and a storage section 38.
[0031] The GC section 32 separates the mixture sample to be analyzed into components (compounds) (chromatographic separation). The GC section 32 includes, for example, a gas supply device that supplies a carrier gas (mobile phase), a sample vaporization chamber for heating and vaporizing the sample, and a column for separating the sample into compounds (none of which are shown). The GC section 32 sequentially outputs each compound having a retention time (RT (Retention Time)) specific to the compound and a peak intensity (peak height or peak area) according to the content in the sample (chromatographic peak sequence).
[0032] The MS section 34 performs mass analysis of each compound sequentially output from the GC section 32. The MS section 34 includes, for example, an ion source for ionizing the compound output from the GC section 32, a mass analyzer for performing mass separation according to the ratio m / z of the mass m and charge z of the ionized compound, and a detector for detecting the ions output from the mass analysis section (all not shown). As the ion source, various types can be used, such as an EI (Electron Ionization) ion source, a PCI (Positive Chemical Ionization) ion source, and an NCI (Negative Chemical Ionization) ion source. As the mass analyzer, a quadrupole (QP) type mass spectrometer is typically used. As the detector, a secondary electron multiplier is typically used.
[0033] The data processing unit 36 executes an identification process for identifying a compound from the retention time of each compound detected by the GC unit 32 and the mass spectrum obtained as a result of mass analysis by the MS unit 34. Specifically, the data processing unit 36 acquires an MS library having mass spectra of a large number of compounds from the storage unit 38, and identifies a compound from the retention time and mass spectrum obtained by the GC unit 32 and the MS unit 34 by referring to the MS library. The data processing unit 36 also executes a quantification process for quantifying the identified compound by calculating the peak intensity of a mass chromatogram corresponding to the identified compound. The retention time and peak intensity of each compound identified and quantified in this way are acquired as peak information of the analytical sample.
[0034] Fig. 4 is a flowchart showing an example of a procedure of pre-processing executed in the learning data generating device 10 shown in Fig. 1. Referring to Fig. 1 together with Fig. 4, the processing unit 14 of the learning data generating device 10 receives peak information (intensity and retention time (RT) for each peak) for each of a plurality of samples acquired by the data acquiring unit 12 from the data acquiring unit 12 (step S10). Note that the retention time (RT) in the peak information corresponds to a "feature amount" that characterizes the analytical sample, and the peak intensity corresponds to data of the feature amount.
[0035] Next, when the peak intensity data of a certain peak is missing in any of the samples in the peak information for each sample acquired, the processing unit 14 deletes the data of the peak from the peak information for all samples (step S20). In other words, the processing unit 14 leaves the data of peaks (feature amounts) that are not missing in all the acquired peak information, and deletes the data of peaks (feature amounts) that have missing values. When the learning data includes missing values (feature amount value is 0), the model learning algorithm may be restricted or the learning accuracy of the model may decrease, so the data of the feature amounts including missing values is deleted.
[0036] Next, the processing unit 14 generates a feature data map in which the peak intensities and characteristic information (labels) for the remaining peaks (feature amounts) for each sample are tabulated for the acquired multiple samples (step S30). That is, the feature data map is a table of the intensities (feature data) and characteristic information (labels) for each peak (feature amount) remaining as a result of the processing in step S20 for the multiple samples.
[0037] Next, the processing unit 14 refers to the feature amount data map and calculates the correlation coefficient between all peaks (feature amounts) in a brute-force manner (step S40). Then, for peaks with a correlation coefficient of, for example, 0.8 or more, the processing unit 14 deletes data of one of the peaks (step S50). This is to eliminate multicollinearity that occurs when the correlation coefficient between feature amounts is high, and to suppress a decrease in learning accuracy.
[0038] Next, the processing unit 14 calculates a histogram of the peak intensity (feature data) of each sample for each peak (feature) (step S60). Then, the processing unit 14 further deletes data of peaks having outliers from the feature data map (step S70). For example, when data of a certain peak is shown in a box plot, data that is further out of the lower end of the whiskers (first quartile - 1.5 x IQR (interquartile range)) or the upper end of the whiskers (third quartile + 1.5 x IQR) by a predetermined amount is determined as an outlier, and data of the peak in which an outlier exists is deleted. Alternatively, data whose difference from the statistical median exceeds a predetermined threshold value may be determined as an outlier.
[0039] Then, the processing unit 14 stores the data of the feature amount data map after the processing of step S70 is executed as a learning data set in the learning data storage unit 16 (step S80). As a result, it is possible to prepare learning data as a learning data set that is free of data loss, has independent peaks (feature amounts), and is free of outliers. By performing machine learning using the learning device 20 with the learning data that has been subjected to such preprocessing as teacher data, it is possible to improve the accuracy of the learning model.
[0040] Fig. 5 is a flowchart showing an example of a procedure of a learning process executed in the learning device 20 shown in Fig. 2. Referring to Fig. 2 together with Fig. 5, the model generation unit 24 of the learning device 20 acquires the learning data set generated by the learning data generation device 10 (Fig. 1) from the learning data storage unit 22 (step S110).
[0041] The training dataset is a dataset in which the input data are multiple peaks (feature values) extracted by the above preprocessing for multiple samples, and the peak intensities (feature data) of each peak for each sample, and the characteristic information (label) for each sample is the correct answer data.
[0042] Next, the model generation unit 24 executes a machine learning process using the input data and the correct answer data included in the acquired learning data set as teacher data to generate a learning model (step S120). As described above, various supervised learning algorithms can be used for this machine learning process.
[0043] Then, the model generation unit 24 stores the model generated by the model generation unit 24 as a so-called "trained model" in the model storage unit 26 (step S130).
[0044] The trained model generated as described above is used to estimate the properties of unknown samples.
[0045] Fig. 6 is a block diagram showing the configuration of an estimation device according to the present embodiment. Referring to Fig. 6, this estimation device is a device that estimates characteristics of an unknown sample by inputting peak information of the unknown sample obtained from a GCMS 30 to a trained model generated by a training device 20.
[0046] 6, the estimation device 40 includes a data acquisition unit 42, a model storage unit 44, and an estimation unit 46. The data acquisition unit 42 acquires peak information about an unknown sample to be investigated. In this embodiment, mass analysis is performed on the unknown sample by the GCMS 30 shown in FIG. 3, and peak information, which is the analysis result, is acquired from the GCMS 30.
[0047] The model storage unit 44 stores a trained model generated by the learning device 20 (FIG. 2). The model storage unit 44 is, for example, a storage device such as an HDD or SSD. When the learning device 20 and the estimation device 40 are configured on the same computer, the model storage unit 26 (FIG. 2) may be used as the model storage unit 44.
[0048] The estimation unit 46 includes a CPU, a ROM, a RAM, and the like (none of which are shown). The programs stored in the ROM are programs describing the processing procedures of the estimation unit 46. The estimation unit 46 executes the following processes in accordance with these programs.
[0049] That is, the estimation unit 46 receives peak information of the unknown sample acquired by the data acquisition unit 42 from the data acquisition unit 42. The estimation unit 46 also acquires a trained model from the model storage unit 44. Then, the estimation unit 46 inputs the peak information of the unknown sample received from the data acquisition unit 42 into the trained model, thereby estimating characteristics of the unknown sample. That is, the estimation unit 46 estimates characteristics of the unknown sample acquired by the data acquisition unit 42 using the trained model trained by the learning device 20.
[0050] Fig. 7 is a flowchart showing an example of the procedure of the estimation process executed in the estimation device 40 shown in Fig. 6. Referring to Fig. 6 together with Fig. 7, the estimation unit 46 of the estimation device 40 receives peak information (retention time (RT) and peak intensity for each peak) acquired by the data acquisition unit 42 for an unknown sample from the data acquisition unit 42 (step S210). In addition, the estimation unit 46 acquires a trained model from the model storage unit 44 (step S220).
[0051] Next, the estimation unit 46 inputs data of the peaks (feature amounts) extracted by the learning data generating device 10 (FIG. 1) (data of peaks included in the learning data set) from among the peaks (feature amounts) included in the peak information of the unknown sample acquired in step S210 to the trained model (step S230).Then, the estimation unit 46 outputs the output of the trained model as an estimation result of the property of the unknown sample (step S240).
[0052] As described above, according to this embodiment, learning data is generated from which unnecessary peak (feature) data has been deleted, thereby improving the accuracy of the trained model that is generated and also improving the learning efficiency of the model.
[0053] [Example 1] An embodiment will be described in which a discrimination marker for discriminating the freshness of food is searched for from GCMS data of a food sample.
[0054] In this example, a data set of beef was used as the food sample. For various parts of red meat of beef, samples were prepared that were properly refrigerated (for example, stored at 4°C, hereafter referred to as "4°C samples") and samples that were exposed to a 40°C environment for three hours and were considered to have deteriorated (hereafter referred to as "40°C samples"). It was impossible to distinguish between the two samples based on their appearance.
[0055] 20 mg of these samples were placed in 116 measurement vials (58 4°C samples, 58 40°C samples), and the gas components generated by each sample when heated to 200°C were analyzed using the SPME (Solid Phase Micro Extraction) method.
[0056] Fig. 8 is a diagram showing an example of a total ion chromatogram (TIC) obtained as a result of analysis by the SPME method. Referring to Fig. 8, it was impossible to distinguish between the 4°C sample and the 40°C sample from the appearance of this chromatogram.
[0057] Therefore, using commercially available analysis software, deconvolution of the chromatogram data, picking of peaks, and alignment were performed. In this Example 1, the data was set to peak heights that are less susceptible to waveform processing. The data set for all samples was very horizontally long data of 116 samples x 9318 peaks (feature values), and a learning data set in which unnecessary peaks (feature values) were reduced was generated by performing preprocessing (FIG. 4) on this initial data set using the learning data generation device 10 (FIG. 1) described in the above embodiment. The preprocessing of the data set in this Example 1 will be described in detail below.
[0058] Referring again to FIG. 4, the number of peaks (feature amounts) is narrowed down to 200 as a result of deleting peak data including missing values in step S20.
[0059] Fig. 9 is a diagram showing an example of a feature data map generated in step S30 of Fig. 4 in this Example 1. Referring to Fig. 9, "data name" is a name given to each sample. "Label" is data indicating whether each sample is a 4°C sample or a 40°C sample, with "1" indicating a 4°C sample and "0" indicating a 40°C sample. This label data is used as correct answer data for learning data.
[0060] "RT1.32_001" and the like indicate a peak as a feature. For example, in "RT1.32_001", "RT1.32" indicates that it is data on a peak with a retention time (RT) of 1.32 minutes, and "001" is a serial number given to each peak. Therefore, "RT22.52_199" indicates that it is data on a peak with a retention time (RT) of 22.52 minutes (serial number 199), and "RT23.48_200" indicates that it is data on a peak with a retention time (RT) of 23.48 minutes (serial number 200). As mentioned above, each data (feature data) is a peak height.
[0061] In this Example 1, the 116 data were divided into 92 training data and 24 test data, the training data was used to learn a model, and the test data was used to evaluate the learned model. Note that the data was divided using stratified shuffle split to prevent bias in the label data.
[0062] Fig. 10 is an image diagram of a heat map of a correlation coefficient matrix showing correlation coefficients between feature quantities calculated in step S40 of Fig. 4 in this Example 1. Referring to Fig. 10, data is arranged in the order of retention time vertically and horizontally from the upper left or lower right of the figure, and correlation coefficients between peaks are shown in a matrix. In reality, it is a 200 x 200 matrix, but for the sake of illustration, an image of a heat map is shown.
[0063] The darker areas indicate larger correlation coefficients. From the figure, it can be seen that there are many combinations of peaks with similar retention times that have large correlation coefficients.
[0064] Referring again to FIG. 4, in the first embodiment, in step S50, data of one of the peaks having a correlation coefficient of 0.8 or more was deleted, and as a result, the number of peaks (feature amounts) was narrowed down to 30.
[0065] Fig. 11 is a diagram showing an example of a histogram for each feature calculated in step S60 of Fig. 4 in this Example 1. Referring to Fig. 11, a histogram of the data of the peak with a retention time (RT) of 1.32 minutes (data of "RT1.32_001" in the feature data map of Fig. 9) is shown as an example. At this stage, data of peaks with large outliers or peaks with a significantly narrow distribution spread may be deleted.
[0066] Fig. 12 is a diagram showing data scaled for each feature amount and then plotted in box plots for each label. Referring to Fig. 12, data that deviates significantly from the lower end or upper end of the whiskers, or data whose difference from the median exceeds a threshold value, may be regarded as an outlier, and data of peaks having outliers may be deleted. Alternatively, data of peaks with a significantly narrow distribution spread may also be deleted.
[0067] In addition, in this box plot, peaks that show differences in data distribution for each label can be key features for accurately discriminating samples.
[0068] In this embodiment 1, the peaks (feature values) are not deleted at this stage, and a model is created from the data of the 30 peaks. Then, if the accuracy rate of the created model is low, the data of the peaks having outliers may be deleted. Alternatively, if the accuracy rate of the model is low, the threshold value for determining outliers may be reduced, or the threshold value may be automatically set according to the accuracy rate.
[0069] For the binary discrimination model between 4° C. samples and 40° C. samples, the objective is to search for marker compounds that contribute highly to sample discrimination, so in this example, logistic regression was adopted as the learning algorithm.
[0070] Fig. 13 is a diagram showing an example of a logistic regression model. Referring to Fig. 13, data of n feature quantities is input to an input layer 50 of x1 to xn. The input values input from the input layer 50 are multiplied by weights w1 to wn, respectively, and added in an addition layer 52. The output of the addition layer 52 is input to a sigmoid function 54, and the weights w1 to wn are learned by a gradient descent method based on the output of the sigmoid function 54. A quantizer 56 binarizes the output of the sigmoid function 54 and outputs it.
[0071] In such a logistic regression, the absolute value of the coefficient (weight) of each feature can be considered as the magnitude of contribution. Although not shown in the figure, the trained model created at this stage was evaluated using test data, and the discrimination accuracy of the samples was about 75%. Therefore, in this Example 1, in order to further narrow down the features that contribute highly to the discrimination of samples, the more versatile Permutation Importance was used.
[0072] FIG. 14 is a diagram showing the permutation importance values of each feature. Referring to FIG. 14, since the number of samples is not large this time, it is considered that a large variation occurs due to trial division within the training data. Therefore, in this Example 1, several division patterns are tried and the average is taken. As a result, as shown in the figure, the standard deviation is large, but the overall tendency can be captured. From this result, in this Example 1, the following 10 feature amounts are finally selected.
[0073] Fig. 15 is a diagram showing the peaks selected in this Example 1 and the library search results for the corresponding compounds. Referring to Fig. 15, since the data this time is GCMS scan data, it is possible to perform a qualitative analysis of the marker compounds for each of the selected 10 peaks by using a library search or a standard.
[0074] Using the data of these 10 feature quantities, we generated a new model. The final trained model was evaluated using test data, and was able to distinguish with an accuracy of 91.67%. Figure 16 shows the confusion matrix that indicates the evaluation results of the trained model.
[0075] [Example 2] In Example 2, an application example to determining the origin of agricultural products is shown. Falsification of the origin of agricultural products is a universal problem in the agricultural and food industries, and various methods for determining the origin have been developed. In general, it is difficult to determine the origin of agricultural products based on biological information such as genetic information that agricultural products have innately, and determination is performed using information on substances that are generated in the body of agricultural products after birth. Among them, a method of determining the origin of agricultural products based on information on elements that agricultural products take in from outside the body is highly stable and has been studied for many years.
[0076] Among the substances that occur in crops, there are substances that are taken in from outside the body, as well as substances that are produced in the body, such as amino acids, organic acids, fatty acids, and sugars. These are collectively called "metabolites" and are commonly contained in many crops. Since the concentration of metabolites present in crops changes dynamically depending on the surrounding environment, even for crops of the same variety, if the metabolites present in crops can be comprehensively measured and the abundance ratio pattern of metabolites for each origin for a specific crop variety can be found, the abundance ratio pattern of metabolites can be used to distinguish the origin of the crop.
[0077] In this Example 2, the Smart Metabolites Database (registered trademark) manufactured by Shimadzu Corporation, which is capable of simultaneously measuring 377 hydrophilic metabolites, was used to measure metabolites in a total of 106 samples of domestic and foreign asparagus, and a model (trained model) that can distinguish between domestic and foreign asparagus was created by machine learning processing.
[0078] 58 domestic and 48 foreign samples of asparagus were prepared. Asparagus was cut to an appropriate size, reduced in size, freeze-dried, and then crushed into powder. The resulting powder was subjected to extraction and derivatization using a pretreatment protocol based on the Bligh & Dyer method. Ribitol was used as the internal standard substance added to the samples. The sample solutions after derivatization were then measured by GCMS / MS. The analytical conditions were in accordance with those in the Smart Metabolites Database.
[0079] Next, peak detection was performed using analysis software LabSolutions Insight (registered trademark) manufactured by Shimadzu Corporation. The following rules were set for peak detection.
[0080] Rule 1: A peak is determined as "detected" when the quantitative transition and the confirmatory transition simultaneously form a peak within ±0.08 minutes of the retention time predicted from the retention index, and the height of the quantitative ion is 1000 or more.
[0081] Rule 2: For compounds that are "detected" in more than half of the data, even if some of the data do not satisfy rule 1, the compound will be considered "detected" based on the peak near the predicted retention time (to avoid "non-detected" data becoming missing values or 0).
[0082] Rule 3: When there are two or more peaks that can be considered "detected" near the predicted retention time, the peak closest to the predicted retention time is basically considered "detected", but if this differs depending on the sample, the peak that is "detected" in more than half of the samples is considered "detected" (to avoid peaks that differ depending on the sample being "detected").
[0083] 17 to 19 are diagrams for explaining rules 1 and 2. In Fig. 17 to 19, peak data in the vicinity of the predicted retention time t1 is shown in the chromatograms of samples 1 to 3, respectively. In each diagram, lines L1 and L2 show the data of the quantitative ions and the confirmatory ions, respectively, and area S shows the peak area of the quantitative ions.
[0084] 17, since sample 1 satisfies rule 1, the peak is detected as the peak corresponding to retention time t1. With reference to Fig. 18, since sample 2 also satisfies rule 1, the peak is detected as the peak corresponding to retention time t1.
[0085] 19, sample 3 does not satisfy rule 1. However, since peaks corresponding to retention time t1 are detected in samples 1 and 2, a peak close to the predicted retention time t1 is detected in sample 3.
[0086] Figures 20 to 22 are diagrams for explaining rule 3. Figures 20 to 22 show peak data in the vicinity of the predicted retention time t2 in the chromatograms of samples 1 to 3, respectively. In each diagram, lines L1 and L2 show the data of the quantitative ions and confirmation ions, respectively, and area S shows the peak area of the quantitative ions.
[0087] Referring to FIG. 20, in sample 1, two peaks are present within the predicted retention time t2 ±0.08 minutes, and since the peak on the right side of retention time t2 is closer to retention time t2 than the peak on the left side, the peak on the right side is detected as the peak corresponding to retention time t2 (rule 3).
[0088] Referring to FIG. 21, in sample 2, two peaks are present within the predicted retention time t2±0.08 minutes, and since the peak on the right side of retention time t2 is closer to retention time t2 than the peak on the left side, the peak on the right side is detected as the peak corresponding to retention time t2 (rule 3).
[0089] 22, for sample 3, two peaks are present within the predicted retention time t2 ±0.08 minutes, but the peak on the left side of retention time t2 is closer to retention time t2 than the peak on the right side. However, since the peak on the right side of retention time t2 was detected as the peak corresponding to retention time t2 in samples 1 and 2, the peak on the right side is also detected as the peak corresponding to retention time t2 in sample 3 (rule 3).
[0090] In this case, by measuring using GCMS / MS, many peaks with stable shapes were obtained, and as a result, many peaks could be detected (217 components in total).
[0091] Peak detection was performed for each sample according to the above rules, and an initial data set of 106 samples x 217 peaks (feature amounts) was prepared as a data set for all samples. Then, preprocessing (FIG. 4) was performed on this initial data set by the learning data generation device 10 (FIG. 1) described in the above embodiment to generate a learning data set. The peak detection process according to the above rules can also be considered as preprocessing for generating learning data.
[0092] By performing peak detection according to the above rules, the initial data set does not contain any data strings containing missing values, and therefore no data is deleted in the missing value processing (step S20 in FIG. 4).
[0093] For samples in which the peak of the internal standard was below the standard value, it was assumed that there was a problem in the derivatization process and was removed from the feature data map. For other samples, the area value of each peak was divided by the peak area value of the internal standard, and the calculation results were standardized by z-score and used as data.
[0094] The remaining sample data was then randomly divided into training data and test data, and the learning data generation device 10 performed preprocessing on the 217 components (features) in which peaks were detected, extracting 13 components (features) that were effective for discrimination.
[0095] In this Example 2, a model for discriminating the origin of asparagus was created using these 13 features and a random forest as a learning algorithm.
[0096] Fig. 23 is a diagram illustrating the learning algorithm of the random forest. With reference to Fig. 23, in the random forest, N sub-data sets 62-1 to 62-N are generated by randomly sampling data from an original data set 60. Then, decision tree models 64-1 to 64-N are generated for the sub-data sets 62-1 to 62-N, respectively, and prediction is performed in each of the generated decision tree models 64-1 to 64-N.
[0097] The prediction results of each of the decision tree models 64-1 to 64-N are integrated by an integration unit 66, and a final prediction is made by taking a majority vote on the prediction results of each decision tree model.
[0098] In this Example 2, the training data and test data in the sample were randomly swapped 50 times to create 50 sub-datasets and generate a model using random forest.
[0099] When the final generated model (trained model) was applied to calculate the prediction accuracy, the average model accuracy was 91.7%. Fig. 24 shows a confusion matrix indicating the evaluation results of the generated trained model, and Fig. 25 shows an ROC curve. Referring to Fig. 25, in this example, the AUC (Area Under Curve) of the ROC curve is 0.95, and the origin of asparagus can be well identified.
[0100] In addition to the above-mentioned Examples 1 and 2, the preprocessing described in this disclosure can also be applied to the machine learning preprocessing described in, for example, U.S. Patent Application Publication No. 2007 / 0176088, U.S. Patent Application Publication No. 2008 / 0095428, U.S. Patent Application Publication No. 2010 / 0070438, U.S. Patent Application Publication No. 2016 / 0321561, U.S. Patent Application Publication No. 2017 / 0213000, and U.S. Patent Application Publication No. 2019 / 0130994.
[0101] [Aspects] It will be appreciated by those skilled in the art that the exemplary embodiments described above are examples of the following aspects.
[0102] (Item 1) A learning data generating device according to one embodiment is a learning data generating device used for generating a learning model. The learning model is generated by machine learning processing using data in which peak information indicating the result of mass spectrometry for a sample is associated with characteristic information indicating a predetermined characteristic of the sample. The learning data generating device includes an acquisition unit that acquires peak information and characteristic information for each sample from a plurality of samples, and a processing unit that executes processing to generate learning data by processing the plurality of peak information acquired by the acquisition unit. The processing unit deletes data of a peak that is missing in any of the plurality of peak information from each of the plurality of peak information, and when a correlation coefficient between data of the remaining peaks is equal to or greater than a predetermined value, further deletes data of one of the peaks from each of the plurality of peak information, and sets the peak information composed of the data of the remaining peaks as input data of the teacher data.
[0103] This device for generating learning data generates learning data in which unnecessary peaks (features) are removed, thereby improving the accuracy of the trained model that is generated and also improving the learning efficiency of the model.
[0104] (Item 2) In the device for generating training data according to item 1, the processing unit further deletes data of peaks having outliers in the data distribution of the plurality of samples from each of the plurality of peak information.
[0105] By adopting such a configuration, it is possible to further improve the accuracy of the trained model and the learning efficiency of the model.
[0106] (Item 3) A model learning device according to one embodiment includes a model generation unit that generates a learning model by executing a machine learning process using learning data generated by the learning data generation device described in item 1 or 2 above, and a model memory unit that stores the learned model generated by the model generation unit.
[0107] According to this model learning device, machine learning processing is performed using the learning data generated by the above-mentioned learning data generation device, thereby improving the accuracy of the generated trained model and also improving the learning efficiency of the model.
[0108] (4) A sample property estimation device according to one embodiment includes an acquisition unit that acquires peak information indicating a result of mass spectrometry for the sample, and an estimation unit that estimates a predetermined property of the sample by inputting the peak information into a trained model. The trained model is generated by executing a machine learning process using learning data generated by performing preprocessing on a plurality of peak information obtained from a plurality of samples. The preprocessing includes a process of deleting data of a peak that is missing in any of the plurality of peak information from each of the plurality of peak information, a process of further deleting data of one of the peaks from each of the plurality of peak information when a correlation coefficient between data of the remaining peaks is equal to or greater than a predetermined value, and a process of using the peak information composed of the data of the remaining peaks as input data of the teacher data.
[0109] According to this sample property estimation device, the sample properties are estimated using a model (trained model) generated using learning data from which unnecessary peaks (features) have been removed, thereby enabling the sample properties to be estimated with high accuracy.
[0110] (Item 5) A chromatographic mass spectrometer according to one embodiment includes a chromatograph, a mass analyzer that performs mass analysis based on the analysis results of the chromatograph, and the characteristic estimation device described in item 4 above that estimates a predetermined characteristic of the sample based on peak information indicating the result of the mass analysis by the mass analyzer.
[0111] According to this chromatographic mass spectrometer, since it is equipped with the above-mentioned characteristic estimation device, it is possible to estimate the characteristics of a sample with high accuracy.
[0112] The embodiments disclosed herein should be considered to be illustrative and not restrictive in all respects. The technical scope of the present disclosure is defined by the claims, not by the description of the embodiments described above, and is intended to include all modifications within the meaning and scope of the claims. [Explanation of symbols]
[0113] 10 learning data generation device, 12, 42 data acquisition unit, 14 processing unit, 16, 22 learning data storage unit, 20 learning device, 24 model generation unit, 26, 44 model storage unit, 30 GCMS, 32 GC unit, 34 MS unit, 36 data processing unit, 38 storage unit, 40 estimation device, 46 estimation unit, 50 input layer, 52 addition layer, 54 sigmoid function, 56 quantizer, 60 data set, 62-1 to 62-N sub data sets, 64-1 to 64-N decision tree model, 66 integration unit.
Claims
1. A device for generating learning data used to generate a learning model for machine learning, the learning model being generated by a machine learning process using data in which peak information, which is peak data of a chromatogram obtained from a mass spectrometer, is associated with characteristic information indicating a predetermined characteristic of the sample; an acquisition unit that acquires the peak information and the characteristic information for each sample from a plurality of samples; a processing unit that processes the plurality of pieces of peak information acquired by the acquisition unit to generate the learning data, The processing unit includes: deleting data of a peak that is missing in any of the plurality of pieces of peak information from each of the plurality of pieces of peak information; When a correlation coefficient between data of remaining peaks is equal to or greater than a predetermined value, data of one peak is further deleted from each of the plurality of peak information; A learning data generating device that uses peak information composed of remaining peak data as input data for training data.
2. The processing unit further deletes data of peaks having outliers in the data distribution of the plurality of samples from each of the plurality of peak information; 2. The device for generating training data according to claim 1, wherein the outlier is a value that falls outside a predetermined upper or lower limit in the data distribution shown in a box plot, or a value whose difference from a statistical median of the data distribution exceeds a predetermined threshold value.
3. a model generation unit that generates the learning model by executing a machine learning process using the learning data generated by the learning data generation device according to claim 1 or 2; A model learning device comprising: a model storage unit that stores the trained model generated by the model generation unit.
4. An acquisition unit that acquires peak information, which is peak data of a chromatogram obtained from a mass spectrometer, for a sample; an estimation unit that estimates a predetermined property of the sample by inputting the peak information into a trained model; The trained model is generated by executing a machine learning process using training data generated by performing preprocessing on a plurality of peak information obtained from a plurality of samples, The pretreatment is a process of deleting data of a peak that is missing in any of the plurality of pieces of peak information from each of the plurality of pieces of peak information; a process of further deleting data of one of the remaining peaks from each of the plurality of peak information when a correlation coefficient between data of the remaining peaks is equal to or greater than a predetermined value; and processing the peak information constituted by the data of the remaining peaks as input data for teaching data.
5. Chromatography and a mass analyzer that performs mass analysis based on the analysis results of the chromatograph; 5. A chromatographic mass spectrometer comprising: the sample characteristic estimation device according to claim 4, which estimates a predetermined characteristic of the sample based on peak information which is peak data of a chromatogram obtained as a result of mass analysis by the mass analyzer.
Citation Information
Patent Citations
Quality prediction device, quality prediction method, program and computer readable recording medium
JP2012027683A
Specific substance monitoring system using mass spectrometer
JP2019074371A
Method for creating discriminator
WO2020070786A1
