Computation program, computation method, and information processing device
Patent Information
- Application Number
- JP2023132273
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-02-28
AI Technical Summary
【0007】 精度の高い結果を得ることができる。
Smart Images

Figure 2025027502000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a computing program, a computing method, and an information processing device. [Background technology]
[0002] Techniques for analyzing analytical data obtained by analyzing a target substance have been disclosed (see, for example, Patent Documents 1 to 3). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2005-010931 A [Patent Document 2] JP 2007-164772 A [Patent Document 3] JP 2018-119897 A Summary of the Invention [Problem to be solved by the invention]
[0004] It is necessary to correlate the obtained analytical data with characteristic data including physical properties, and predict the material composition, material structure, chemical state, etc. that will manifest the desired physical properties and functions. For this purpose, methods that utilize mathematical and statistical science have been proposed. The mathematical and statistical science method that is mainly used is regression analysis. However, in regression analysis, even though there is a complicated process of selecting an appropriate hyperparameter λ, the results obtained include some inaccuracies.
[0005] In one aspect, the present invention aims to provide a calculation program, a calculation method, and an information processing device that can obtain highly accurate results. [Means for solving the problem]
[0006] In one embodiment, the calculation program causes a computer to execute processes of extracting each element of a matrix of multiple analytical data represented as two-dimensional data to generate a first vector, normalizing each element of the first vector to create a first normalized vector, extracting each element of a matrix of characteristic data corresponding to the multiple analytical data to generate a second vector, normalizing each element of the second vector to create a second normalized vector, and identifying a correspondence between elements included in the first vector and elements included in the second vector depending on a similarity between the first normalized vector and the second normalized vector. Effect of the Invention
[0007] Highly accurate results can be obtained. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is a diagram illustrating an X-ray diffraction spectrum. [Diagram 2] FIG. 13 is a diagram illustrating an example of set objective variables and explanatory variables. [Diagram 3] FIG. 11 is a diagram illustrating an example of an analysis result. [Figure 4] FIG. 13 is a diagram illustrating the results of changes in regression coefficients. [Diagram 5] This figure examines whether the results shown in Figure 4 are correct. [Figure 6] FIG. 2A is a functional block diagram illustrating an example of an overall configuration of an information processing device, and FIG. 2B is a block diagram illustrating an example of a hardware configuration of the information processing device. [Figure 7] 11 is a flowchart illustrating an example of an operation of the information processing device. [Figure 8] 11 is a flowchart illustrating an example of an operation of the information processing device. [Figure 9] 11 is a flowchart illustrating an example of an operation of the information processing device. [Figure 10] FIG. 13 is a diagram illustrating a calculation result. [Figure 11] FIG. 13 is a diagram illustrating a calculation result. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Physical and chemical analysis of existing materials and substances is carried out to develop new materials and substances with new properties and functions, or to improve the properties and functions of existing materials and substances. In physical and chemical analysis, parameters are mass-to-charge ratio (m / z) for mass spectrometry, wave number (1 / cm) for infrared spectroscopy, and diffraction angle (2θ) for X-ray diffraction analysis. The analytical data obtained by the analysis is obtained as two-dimensional data such as a spectrum in which the horizontal axis is the parameter and the vertical axis is the signal intensity (detection signal value) obtained by each detector for the changed parameter. Alternatively, in the case of electron microscope observation, two-dimensional data is obtained such as an image in which the scanning position of the electron beam is the parameter and the gray scale obtained by the associated detector is recorded as the detection signal value for the changed parameter.
[0010] These analytical data are correlated with characteristic data, including physical properties, to predict the material composition, material structure, chemical state, etc. that will manifest the desired physical properties and functions. In this correlation, it is extremely important to find out which parts of the 2D data are closely related to the properties. For example, this correlation is achieved by repeatedly building and verifying hypotheses based on physical and chemical principles, which requires a high level of expertise and abundant experience, and it is not uncommon for this to take a great deal of time.
[0011] Therefore, in recent years, methods that utilize mathematical and statistical science have been proposed to improve efficiency. The mathematical and statistical science method that is mainly used is regression analysis. In regression analysis, characteristic values are used as the response variable, and two-dimensional data are used as the explanatory variables. The explanatory variable with the largest regression coefficient obtained as a result of regression analysis is considered to be the part that is most closely related to the response variable. In recent years, regression analysis with regularization has been used to prevent overfitting, improving the accuracy of the analysis. Regression analysis with regularization is a method such as the following.
[0012] As shown in the following formula (1), assume that there are m+1 explanatory variables y for n+1 objective variables s. Both objective variables s and explanatory variables y are expressed as vectors.
number
[0013] The predicted value and the regression coefficient are expressed as in the following formula (2). Both the predicted value and the regression coefficient are expressed as vectors.
number
[0014] In this case, the linear regression equation can be expressed by the following equation (3), where w0y0 represents the intercept.
number
[0015] When the above formula (3) is expressed as a vector, the following formula (4) is obtained.
number
[0016] In multiple regression analysis, the above predicted value is not one, but the regression coefficient is derived from a large number of training data. Therefore, there are as many predicted values as there are training data. The sample size is n+1, which is the number of objective variables, and is expressed as in the following formula (5).
number
[0017] The weights w (regression coefficients) are specified so that there is no separation between the predicted value and the actual s, which is the objective variable. In multiple regression analysis, the least squares method is used to determine parameters so as to minimize the loss function L expressed by the following formula (6).
number
[0018] In regularization, a function obtained by adding a regularization term to the loss function L is treated as a new target for minimization. Representative regularization terms include the L2 regularization term in the following formula (7) and the L1 regularization term in the following formula (8). Note that λ is a hyperparameter that can be freely determined.
number
number
[0019] By minimizing the loss function with the regularization term added, the coefficients of variables that do not contribute to the objective variable are made smaller, the number of effective explanatory variables is reduced, and overfitting can be suppressed, compared to when the regularization term is not added. The influence of regularization can be controlled by manipulating the regularization term λ. Increasing the value of λ increases the influence of the regularization term, and the number of explanatory variables with a coefficient value of 0 increases. Specifically, the problem is reduced to the optimization problem of the regression function shown in the following formula (9), and the regression coefficient w is optimized as shown in the following formula (10) (L1 regularization).
number
number
[0020] An example of regression analysis using regularization is shown below. For example, assume that the X-ray diffraction spectrum of a certain material is obtained as shown in Figure 1. The X-ray diffraction spectrum in Figure 1 is represented as the sum of eight spectra with different ratios of a certain substance contained. Therefore, each intensity value of the X-ray diffraction spectrum in Figure 1 contains eight spectra as components. These eight spectra (Data 7, Data 8, Data 9, Data 10, Data 17, Data 19, Data 21, Data 22) and their corresponding characteristics (abundance ratio of a certain element: 0%, 0.25%, 0.5%, 0.75%, 0.11%, 0.14%, 0.06%, 0.46%) are compared with the above formulas (5) to (8), and the objective variable and explanatory variable are set as shown in Figure 2, and regularized regression analysis is performed, and the result in Figure 3 is obtained.
[0021] In Figure 3, out of the 4,350 explanatory variables (diffraction angles), only two diffraction angles, 23.3 deg and 29.5 deg, have regression coefficients, while the regression coefficients related to the other diffraction angles are 0. However, 23.3 deg shows a negative value, and 29.5 deg shows a positive value. A negative value means that in the X-ray diffraction spectrum, the intensity at 23.3 deg and a characteristic (abundance ratio of a certain element) are inversely proportional, while a positive value means that they are proportional.
[0022] As shown in Figure 3, easy-to-understand results are obtained, but in the regularization process, it is necessary to set the hyperparameter λ to an appropriate value. The method of setting λ is to scan the value of λ within a certain range. As mentioned above, as the value of λ increases, the number of explanatory variables with regression coefficient values of 0 increases, and the regression coefficients are gradually narrowed down.
[0023] Then, an appropriate one is selected from the narrowed down regression coefficients, and the value of the explanatory variable related to it is set as the target value, that is, the part of the spectrum that shows the closest relationship with the characteristics. For example, if λ is scanned from 0.01 to 100 and the change in the regression coefficient associated with it is examined, the result shown in Figure 4 is obtained. If the value of λ is increased, finally two values remain, 23.3 deg and 29.5 deg. According to Figure 3, the regression coefficient remaining when λ = 50 is the appropriate value, and Figure 3 is obtained. Figure 5 is a figure that examines whether the result shown in Figure 4 is correct. The diffracted X-ray intensity at 29.5 deg increases with the increase in the abundance ratio, and it can be seen that this part is closely related to the abundance ratio. On the other hand, the diffracted X-ray intensity at 23.3 deg tends to decrease slightly with the increase in the abundance ratio, and although it is recognized that there is some relationship to the abundance ratio, it cannot be said that there is a close relationship.
[0024] In view of these results, it can be said that the above method includes inaccurate results, even though it involves a complicated process of selecting an appropriate hyperparameter λ. Therefore, in the following embodiment, an example will be described in which highly accurate results can be obtained without going through a complicated process. EXAMPLES
[0025] First, the principle of the first embodiment will be described.
[0026] Two-dimensional data such as spectra and images obtained as a result of physical and chemical analysis can be expressed as shown in the following formula (11), where m+1 horizontal axis values x correspond to m+1 vertical axis values y obtained as analytical data. The horizontal axis values x and vertical axis values y are expressed as vectors.
number
[0027] Furthermore, when there are n+1 pieces of analytical data (e.g., spectra) represented by the above formula (11) and there are n+1 corresponding characteristic values s, as shown in the following formula (12), the analytical data can be expressed as a matrix Y and characteristic values s, as shown in the following formula (13).
number
number
[0028] Here, each column of Y is expressed as in the following formula (14) and extracted as a first vector. Note that the vector in the above formula (12) is the second vector.
number
[0029] Next, y i A first normalized vector is generated by normalizing s, and a second normalized vector is generated by normalizing s. For example, L p Normalization is performed by the norm, so that the sum of the detection signal values becomes constant.
number
number
[0030] The normalized values are expressed by the following equations (17) and (18).
number
number
[0031] Next, z s and zyi For example, calculate the similarity between z s and z yi As the similarity with z, the cosine similarity is calculated as shown in the following formula (19). Next, the z yi and the z closest to -1 yi And, extract.
number
[0032] The closer the cosine similarity is to 1, the greater the similarity, and the closer it is to -1, the closer the vector is to the opposite direction. Therefore, the cosine similarity is closest to 1 for z yi is z s The positive relationship with z is strongest and closest to -1. yi indicates that the negative correlation is strongest. Here, positive and negative mean proportional and inverse proportional, respectively. yi Gives x i However, this is the area that most strongly shows the relationship with the characteristics in two-dimensional data.
[0033] Next, a specific device configuration of this embodiment will be described. Fig. 6(a) is a functional block diagram illustrating an example of the overall configuration of an information processing device 100 according to the embodiment 1. As illustrated in Fig. 6(a), the information processing device 100 functions as an acquisition unit 10, a vector creation unit 20, a normalization unit 30, a similarity calculation unit 40, a specification unit 50, an output unit 60, and the like.
[0034] Fig. 6(b) is a block diagram illustrating an example of a hardware configuration of the information processing device 100. As illustrated in Fig. 6(b), the information processing device 100 includes a CPU 101, a RAM 102, a storage device 103, an input device 104, a display device 105, and the like.
[0035] The CPU (Central Processing Unit) 101 is a central processing unit. The CPU 101 includes one or more cores. The RAM (Random Access Memory) 102 is a volatile memory that temporarily stores a program executed by the CPU 101, data processed by the CPU 101, and the like. The storage device 103 is a non-volatile storage device. For example, a ROM (Read Only Memory), a solid state drive (SSD) such as a flash memory, or a hard disk driven by a hard disk drive can be used as the storage device 103. The storage device 103 stores a calculation program. The input device 104 is an input device such as a keyboard or a mouse. The display device 105 is a display device such as an LCD (Liquid Crystal Display). The CPU 101 executes the calculation program to realize an acquisition unit 10, a vector creation unit 20, a normalization unit 30, a similarity calculation unit 40, a specification unit 50, an output unit 60, and the like. The acquisition unit 10, the vector creation unit 20, the normalization unit 30, the similarity calculation unit 40, the identification unit 50, the output unit 60, and the like may be implemented using hardware such as dedicated circuits.
[0036] 7 to 9 are flow charts showing an example of the operation of the information processing device 100. As exemplified in Fig. 7, the acquisition unit 10 acquires analysis data from sample 1 to sample n (step S1). The analysis data is two-dimensional data in which a parameter is plotted on the horizontal axis and signal intensity (detection signal value) obtained by a detector is recorded on the vertical axis for a changed parameter.
[0037] Next, the vector creation unit 20 expresses each analysis data acquired in step S1 as a vector as shown in the above formula (13) (step S2), where it is assumed that for each analysis data, there are m+1 y coordinates for each of the m+1 x coordinates.
[0038] Next, the normalization unit 30 extracts each column of the matrix obtained in step S2 as a vector and converts the elements of the vector into L pThe norm is normalized as shown in the above formula (18) (step S3).
[0039] In parallel with steps S1 to S3, as illustrated in FIG. 8, the acquiring unit 10 acquires characteristic data of samples 1 to n (step S11).
[0040] Next, the vector creation unit 20 expresses each piece of characteristic data acquired in step S11 as a vector as shown in the above formula (13) (step S12).
[0041] Next, the normalization unit 30 normalizes the elements of the matrix obtained in step S12 as L p The norm is normalized as shown in the above formula (17) (step S13).
[0042] After executing step S3 and step S13, as shown in FIG. 9, the similarity calculation unit 40 calculates z s and z yi The cosine similarity cos(x, y) with the given object is calculated (step S21).
[0043] Next, the identification unit 50 selects z yi and z closest to -1 yi Extract this z yi Gives x i is identified as the portion on the analysis data that most strongly indicates a relationship with the characteristic (step S22). The output unit 60 outputs the result identified by the identification unit 50. The output result is displayed, for example, by the display device 105. For example, the display device 105 displays a graph of the relationship between the detection signal value (y coordinate value) at the extracted parameter value (x coordinate value) and the characteristic value.
[0044] In this way, according to the present embodiment, each element of the matrix of a plurality of analytical data represented as two-dimensional data is extracted as a first vector, and a first normalized vector normalized for each element is obtained. Also, each element of the matrix of characteristic data corresponding to the plurality of analytical data is extracted as a second vector, and a second normalized vector normalized for each element is obtained. A correspondence relationship between elements included in the first vector and elements included in the second vector is obtained according to the similarity between the first normalized vector and the second normalized vector. In this way, highly accurate results can be obtained without going through the complicated process of selecting appropriate hyperparameters.
[0045] Next, the usefulness of this embodiment will be shown for the above-mentioned eight X-ray diffraction spectra (Data 7, Data 8, Data 9, Data 10, Data 17, Data 19, Data 21, and Data 22). The characteristic value s is the abundance ratio of a certain element, and y i is the y coordinate of each of the eight spectra having 4351 x coordinates. The characteristic value s, x coordinate, and yi can be expressed as in the following formulas (20) to (22).
number
number
number
[0046] When the cosine similarity was calculated for the above formula (20) and formula (22) based on the above formulas (14) to (19), the result shown in FIG. 10 was obtained. 1 The norm was used.
[0047] FIG. 11 shows a plot of the diffracted X-ray intensity at a diffraction angle of 38.48 deg, where the similarity is closest to 1 in FIG. 10, against the abundance ratio. As shown in FIG. 11, a good proportional relationship is obtained. Note that, as can be seen from FIG. 10, none of the results in this embodiment show a negative similarity value. Therefore, there is no spectrum that is inversely proportional to the abundance ratio.
[0048] Figures 10 and 11 show the L 1 The result of using the norm, L 2 Norm, L 3 Norm, L 4 Similar results can be obtained by using the norm. The results in Figure 11 can also be used as a highly accurate calibration curve to explore unknown properties from analytical data.
[0049] Thus, according to this embodiment, L p By performing similarity evaluation using cosine similarity after normalization with a norm, it is possible to extract points that strongly indicate a relationship with characteristics in two-dimensional data such as spectra and images. FIG. 11 shows that the result is appropriate. Also, while searching for appropriate hyperparameters involves cumbersome work, this embodiment obtains good results with simple calculations. Furthermore, the accuracy is clearly expressed by the numerical value of the similarity. On the other hand, in the method using regularized regression analysis, information on a negative relationship was extracted, but FIG. 4 suggests that this information is inaccurate. From the above, this embodiment can be said to be a more useful method.
[0050] Although the embodiments of the present invention have been described in detail above, the present invention is not limited to such specific embodiments, and various modifications and variations are possible within the scope of the gist of the present invention described in the claims. (Appendix 1) On the computer, Extracting each element of a matrix of a plurality of analytical data represented as two-dimensional data to generate a first vector; creating a first normalized vector by normalizing each element of the first vector; Extracting elements of a matrix of characteristic data corresponding to the plurality of analytical data to generate a second vector; creating a second normalized vector by normalizing each element of the second vector; A computation program that executes a process of identifying a correspondence between an element included in the first vector and an element included in the second vector according to a similarity between the first normalized vector and the second normalized vector. (Appendix 2) 2. The arithmetic program according to claim 1, wherein the first vector and the second vector are normalized by a norm. (Appendix 3) extracting vertical axis coordinates of the plurality of analysis data as a matrix of the plurality of analysis data when the horizontal axis represents a parameter in the plurality of analysis data; Calculating a cosine similarity as a similarity between the first normalized vector and the second normalized vector; The calculation program according to claim 1, further comprising: extracting, from the first normalized vectors, a vector whose cosine similarity is closest to 1 and a vector whose cosine similarity is closest to -1; and identifying, among the horizontal axis coordinates of the plurality of analytical data, coordinates giving each of the extracted vectors. (Appendix 4) The calculation program according to claim 1, wherein the analysis data is spectral data or image data. (Appendix 5) The computer Extracting each element of a matrix of a plurality of analytical data represented as two-dimensional data to generate a first vector; creating a first normalized vector by normalizing each element of the first vector; Extracting elements of a matrix of characteristic data corresponding to the plurality of analytical data to generate a second vector; creating a second normalized vector by normalizing each element of the second vector; A computation method comprising: executing a process for identifying a correspondence between an element included in the first vector and an element included in the second vector according to a similarity between the first normalized vector and the second normalized vector. (Appendix 6) The calculation method according to claim 5, wherein the first vector and the second vector are normalized by a norm. (Appendix 7) extracting vertical axis coordinates of the plurality of analysis data as a matrix of the plurality of analysis data when the horizontal axis represents a parameter in the plurality of analysis data; Calculating a cosine similarity as a similarity between the first normalized vector and the second normalized vector; The calculation method described in Appendix 5, characterized in that a vector whose cosine similarity is closest to 1 and a vector whose cosine similarity is closest to -1 are extracted from the first normalized vectors, and coordinates giving each of the extracted vectors are identified among the horizontal axis coordinates of the multiple analytical data. (Appendix 8) The calculation method according to claim 5, wherein the analytical data is spectral data or image data. (Appendix 9) a vector creation unit that extracts each element of a matrix of a plurality of analytical data represented as two-dimensional data to generate a first vector, and extracts each element of a matrix of characteristic data corresponding to the plurality of analytical data to generate a second vector; a normalization unit that normalizes each element of the first vector to create a first normalized vector and normalizes each element of the second vector to create a second normalized vector; an identification unit that identifies a correspondence relationship between an element included in the first vector and an element included in the second vector according to a similarity between the first normalized vector and the second normalized vector. (Appendix 10) The information processing device according to claim 9, wherein the normalization unit normalizes the first vector and the second vector by a norm. (Appendix 11) As a matrix of the plurality of analysis data, a vertical axis coordinate is extracted when a parameter in the plurality of analysis data is set as a horizontal axis; a similarity calculation unit that calculates a cosine similarity as a similarity between the first normalized vector and the second normalized vector, The information processing device described in Appendix 9, wherein the identification unit extracts from the first normalized vectors a vector whose cosine similarity is closest to 1 and a vector whose cosine similarity is closest to -1, and identifies coordinates that give each of the extracted vectors among the horizontal axis coordinates of the multiple analytical data. (Appendix 12) The information processing device according to claim 9, wherein the analysis data is spectral data or image data. [Explanation of symbols]
[0051] 10 Acquisition Department 20 Vector Creation Section 30 Standardization Department 40 Similarity calculation part 50 Specific section 60 Output section 100 Information processing device 101 CPU 102 RAM 103 Storage device 104 Input Devices 105 Display device
Claims
1. On the computer, Extracting each element of a matrix of a plurality of pieces of analytical data represented as two-dimensional data to generate a first vector; creating a first normalized vector by normalizing each element of the first vector; Extracting elements of a matrix of characteristic data corresponding to the plurality of analytical data to generate a second vector; creating a second normalized vector by normalizing each element of the second vector; A computation program that executes a process of identifying a correspondence between an element included in the first vector and an element included in the second vector in accordance with a similarity between the first normalized vector and the second normalized vector.
2. 2. The arithmetic program according to claim 1, wherein the first vector and the second vector are normalized by a norm.
3. extracting vertical axis coordinates of the plurality of analysis data as a matrix of the plurality of analysis data when the horizontal axis represents a parameter in the plurality of analysis data; Calculating a cosine similarity as a similarity between the first normalized vector and the second normalized vector; 2. The computational program according to claim 1, further comprising: extracting, from the first normalized vectors, a vector whose cosine similarity is closest to 1 and a vector whose cosine similarity is closest to -1; and identifying, among the horizontal axis coordinates of the plurality of analysis data, coordinates giving each of the extracted vectors.
4. 2. The computing program according to claim 1, wherein the analysis data is spectral data or image data.
5. The computer Extracting each element of a matrix of a plurality of pieces of analytical data represented as two-dimensional data to generate a first vector; creating a first normalized vector by normalizing each element of the first vector; Extracting elements of a matrix of characteristic data corresponding to the plurality of analytical data to generate a second vector; creating a second normalized vector by normalizing each element of the second vector; A computation method comprising: executing a process for identifying a correspondence between an element included in the first vector and an element included in the second vector according to a similarity between the first normalized vector and the second normalized vector.
6. a vector creation unit that extracts each element of a matrix of a plurality of analytical data represented as two-dimensional data to generate a first vector, and extracts each element of a matrix of characteristic data corresponding to the plurality of analytical data to generate a second vector; a normalization unit that normalizes each element of the first vector to create a first normalized vector and normalizes each element of the second vector to create a second normalized vector; an identification unit that identifies a correspondence between an element included in the first vector and an element included in the second vector in accordance with a similarity between the first normalized vector and the second normalized vector.
Citation Information
Patent Citations
Image data similarity searching device and similarity determining method in the device
JP2005010931A
Method for constructing descriptors for set of data samples implemented by computer
JP2007164772A
Substance identification method using mass analysis and mass analysis data processing device
JP2018119897A