Laboratory data analysis method and system based on machine learning technology
By improving the isolation forest algorithm, generating a confrontation network filling model, and improving the black -winged kite optimization algorithm, the problem of high data processing complexity in the laboratory data analysis, high misjudging rate, and insufficient filling capacity in laboratory data have been solved. The achievement of the experimental purpose.
Patent Information
- Application Number
- CN202411907722.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the laboratory data analysis, the prior art has problems such as high data processing complexity, high misjudgment rate, insufficient data filling ability and insufficient processing, and cannot effectively achieve the experimental purpose.
Laboratory data analysis methods based on machine learning technology are used to achieve anomaly cleaning, filling and optimization of data by improving the isolation forest algorithm and generative adversarial network filling model, combined with the improved black-winged kite optimization algorithm.
It reduces the complexity and misjudgment rate of data processing, improves data filling efficiency and results accuracy, and achieves a rapid and timely analysis of laboratory data to meet experimental purposes.
Smart Images

Figure CN119357595A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data analysis, and in particular to a laboratory data analysis method and system based on machine learning technology. Background Art
[0002] Chinese Patent cn 117744002A discloses a laboratory data analysis method and a laboratory information management platform, the method specifically includes: obtaining first data, detecting whether each data in the first data is within a corresponding preset numerical range, the first data is laboratory data; obtaining first target data, when there is data in the first target data that is not within the corresponding preset numerical range, the first target data that is not within the corresponding preset numerical range is recorded as first-class abnormal data; obtaining the associated data of the first target data, setting a deep learning model, inputting the first target data and the associated data of the first target data into the deep learning model, outputting the abnormal information corresponding to the first target data, marking the first target data as second-class abnormal data, and completing the laboratory abnormal data analysis. However, the algorithm does not further fill the data, which brings inconvenience to the analysis and processing of the original data.
[0003] Traditional data analysis methods usually have defects in data processing speed and reducing processing computational complexity due to the presence of a large amount of redundant data in the data processing process. At the same time, when analyzing laboratory data, traditional data analysis methods cannot guarantee the accuracy of data processing, nor do they use technologies such as deep learning. The data is not processed in a timely manner and the experimental objectives cannot be achieved well. Summary of the invention
[0004] In response to the problems in the related art, the present invention provides a laboratory data analysis method and system based on machine learning technology to overcome the above-mentioned technical problems existing in the existing related technology.
[0005] In order to solve the above technical problems, the present invention is achieved through the following technical solutions: The present invention is a laboratory data analysis method based on machine learning technology, comprising the following steps: S1, collecting the data generated by the laboratory to obtain an original laboratory data set, finding an adaptive threshold of the isolation forest algorithm, using an improved isolation forest algorithm to divide the original laboratory data set based on the adaptive threshold to obtain an improved isolation forest, and then deleting abnormal laboratory data in the improved isolation forest to obtain a processed laboratory data set; S2, training a generative adversarial network, obtaining an improved generative adversarial network filling model by introducing multiple missing data filling methods, and using the improved generative adversarial network filling model to fill the processed laboratory data set to obtain a processed laboratory data set; S3, obtaining experimental result data according to the processed laboratory data set, setting expected experimental result data, calculating the error between the experimental result data and the expected experimental result data, and finding the minimum error using the improved black-winged kite optimization algorithm based on the approximation error principle to obtain an optimized laboratory data set; S4. Establish a laboratory database to store the processed laboratory data set and complete laboratory data analysis.
[0006] The invention obtains the original laboratory data set, divides the original laboratory data set based on an adaptive threshold using an improved isolation forest algorithm, calculates the node anomaly scores in the isolation forest, and screens out the abnormal data in the isolation forest; this method introduces an adaptive threshold to find the division points of the isolation forest, which reduces the complexity of data processing and the possibility of data misjudgment compared to the traditional isolation forest; secondly, a generative adversarial network is trained, and an improved generative adversarial network filling model is obtained by introducing multiple missing data filling methods, and the improved generative adversarial network filling model is used to fill in the laboratory data; the neural network combines multiple laboratory data and outputs multiple filling results, and multiple filling reduces the number of missing data. According to the dimension, compared with the generative adversarial network, the network structure is simplified, and the filling efficiency and result accuracy are effectively improved; then the expected experimental result data is set, and according to the error between the experimental result data and the expected experimental result data, the improved black kite optimization algorithm is used to find the laboratory data to obtain the minimum error, so as to optimize the laboratory data; the algorithm simulates the flight and predation behavior of black kites in nature, and has the characteristics of fast search speed and strong search ability, and then the spiral flight is used to improve the algorithm, which improves the global search ability and increases the diversity of black kites while ensuring the convergence speed; finally, a laboratory database is established to store the processed laboratory data and complete the laboratory data analysis.
[0007] Preferably, the S1 comprises the following steps: S11, collect the data generated in the laboratory, the data generated in the laboratory includes experimental condition data, experimental process measurement values, experimental result data, etc., obtain the original laboratory data, and set the experimental condition data set as ,in Indicates The experimental condition data includes experimental temperature, experimental humidity, etc. The original laboratory data is classified according to different experimental condition data in the experimental condition data set. Each experimental condition data contains original laboratory data, obtain the original laboratory data subsets, and form the original laboratory data set; S12: Select any subset of original laboratory data from the original laboratory data set and record it as the laboratory data set to be processed. ,in Indicates The original laboratory data are set, the attribute set of the laboratory data set to be processed is set, and an isolation tree is established. The maximum level of the isolation tree is , selecting a random attribute, a maximum attribute and a minimum attribute from the attribute set of the laboratory data set to be processed, and setting an isolated tree split point, wherein the isolated tree split point is greater than or equal to the minimum attribute and less than or equal to the maximum attribute; Compare the isolated tree segmentation point with the attribute set of the laboratory data set to be processed, place the laboratory data to be processed corresponding to the attribute greater than the isolated tree segmentation point on the right side of the isolated tree, and place the laboratory data to be processed corresponding to the attribute less than the isolated tree segmentation point on the left side of the isolated tree, to obtain the first layer left subtree and the first layer right subtree; take the nodes on the first layer left subtree and the first layer right subtree as the isolated tree segmentation points, repeatedly divide the laboratory data set to be processed until the number of isolated tree layers reaches the maximum layer degree of the isolated tree, stop dividing, and obtain the first isolated forest; S13, calculating the anomaly evaluation value of the first isolation forest and finding the adaptive threshold of the first isolation forest, the specific steps are as follows: S131, setting the first isolation forest to include isolated trees, select any isolated tree in the first isolated forest as a candidate isolated tree, the nodes on the candidate isolated tree represent the laboratory data to be processed, convert the candidate isolated tree into a curve image, set Indicates the curve image The coordinates corresponding to the laboratory data to be processed, Indicates the curve image The coordinates corresponding to the laboratory data to be processed, the calculation formula of the abnormal evaluation value of the candidate isolated tree is as follows: ; in, represents the abnormal evaluation value of the candidate isolated tree, Indicates the number of laboratory data to be processed, ; S132, sequentially calculating the abnormal evaluation values of all isolated trees in the first isolated forest to obtain the abnormal evaluation value of the first isolated forest, and re-sorting the abnormal evaluation values of the first isolated forest in ascending order to obtain a sorted isolated forest. ,in Indicates isolated trees; set the first threshold interval to ,in represents a random integer, selects a random integer in the first threshold interval, recorded as the first integer, calculates the abnormal evaluation value of the isolated tree corresponding to the first integer to the rightmost isolated tree in the sorted isolation forest, recorded as the first abnormal evaluation value; sets the second threshold interval to ,in Indicates less than A random integer is selected in the second threshold interval, recorded as a second integer, and an abnormal evaluation value from the isolated tree corresponding to the second integer to the rightmost isolated tree in the sorted isolation forest is calculated, recorded as a second abnormal evaluation value; S133: Combine the first abnormality assessment value and the second abnormality assessment value to obtain an initial abnormality interval ,in represents the first abnormal evaluation value, Indicates the second abnormal evaluation value, and sets the first step length and the second step length according to the initial abnormal interval; when the initial abnormal interval When using Add the first step length to get the new abnormal interval. When the initial abnormal interval When using Subtract the second step length to get a new abnormal interval; continue to iterate, set the step error, until the absolute value of the difference in the abnormal evaluation value in the new abnormal interval is less than the step error, stop the iteration, and calculate the abnormal evaluation value of the isolated tree corresponding to the mean of the first step length and the second step length, which is recorded as the adaptive threshold of the first isolated forest; S14, using the adaptive threshold of the first isolation forest to divide the first isolation forest to obtain an improved isolation forest, each node in the improved isolation forest represents the laboratory data to be processed, and selecting any laboratory data to be processed in the improved isolation forest is recorded as laboratory data , calculate laboratory data The anomaly score is calculated as follows: ; in, Represents laboratory data The anomaly score, Represents laboratory data In the improved isolation forest, the average path height is Represents the average path height of all isolated trees in the improved isolation forest; Calculate the anomaly score of the laboratory data to be processed in the improved isolation forest and set the anomaly threshold as , the laboratory data to be processed corresponding to the abnormality score less than the abnormality threshold is regarded as normal laboratory data, otherwise it is regarded as abnormal laboratory data, the abnormal laboratory data is deleted, and the abnormal laboratory data in the original laboratory data set are identified and deleted in turn to obtain the processed laboratory data set.
[0008] This invention uses an improved isolation forest algorithm based on an adaptive threshold to divide the original laboratory data set, introduces an adaptive threshold, facilitates finding the division points of the isolation forest, calculates the abnormal scores of nodes in the isolation forest, and screens out abnormal data in the isolation forest. Compared with the traditional isolation forest, it reduces the complexity of data processing and the possibility of data misjudgment.
[0009] Preferably, S2 comprises the following steps: S21, according to the processed laboratory data set, obtain corresponding data attributes, set the processed laboratory data set to include missing laboratory data, obtaining a missing laboratory data set, randomly selecting a number of processed laboratory data from the processed laboratory data set to form a data attribute set, wherein the data attribute set includes at least two data attributes; using the data attribute set to train and verify the generative adversarial network to obtain the accuracy of the data attribute set, the specific steps are as follows: S211. Assume that the generative adversarial network includes a generator and a discriminator, where the generator includes a three-layer fully connected network and the activation function is Functions and Function, the discriminator contains a three-layer fully connected network, and the activation function is Functions and Function, the learning rate is ; Randomly select a data attribute from the data attribute set, the data attribute contains a number of processed laboratory data, and split them to obtain a laboratory data sample training set and a laboratory data sample verification set; Generate a laboratory data mask matrix, a laboratory data noise matrix and a prompt matrix according to the laboratory data sample training set, and input them into the generator, continuously optimize the generator parameters, and output laboratory fill-in data; Combine the laboratory fill-in data and the missing laboratory data in the laboratory data sample training set, input them into the discriminator, fix the generator parameters, and use the stochastic gradient descent method to update the discriminator parameters until the data repair loss and the sum of data similarity are minimized, the training is completed, and a trained generative adversarial network model is obtained; S212, then input the laboratory data sample verification set into the trained generative adversarial network model, and set the accuracy threshold to , when the accuracy of the output prediction result and the actual laboratory data sample is greater than the accuracy threshold, the generative adversarial network filling model is obtained, otherwise the parameters are adjusted until the accuracy of the output prediction result and the actual laboratory data sample is greater than the accuracy threshold; the accuracy of each output prediction result is obtained to obtain the accuracy of the data attribute set; S22, set a prediction accuracy threshold, select data attributes whose accuracy of the data attribute set is greater than the prediction accuracy threshold, and form a data attribute subset; input the data attribute subset into the generative adversarial network filling model, and output a filling value for each data attribute in the data attribute subset, which is recorded as the filling set ,in Indicates The filled value of each data attribute; the processed laboratory data set is filled multiple times according to the filled value of the data attribute, and the calculation formula is as follows: ; in, represents the imputed value of the processed laboratory data set, Indicates The accuracy of the prediction results, ; After the processed laboratory data set is filled in sequence using the filling values of the processed laboratory data set, a processed laboratory data set is obtained.
[0010] This invention trains a generative adversarial network, introduces multiple missing data filling methods, combines multiple laboratory data, outputs multiple filling results, and obtains an improved generative adversarial network filling model, which realizes multiple filling of laboratory data and reduces the data dimension. Compared with the generative adversarial network, the network structure is simplified, and the filling efficiency and result accuracy are effectively improved.
[0011] Preferably, S3 comprises the following steps: S31. According to the processed laboratory data set, obtain laboratory data under different experimental condition data, and obtain experimental result data according to the laboratory data under different experimental condition data, which is recorded as the experimental result data set. ,in Indicates The experimental result data of the experimental condition data are set, the expected experimental result data are set, the error between the experimental result data and the expected experimental result data is used as the fitness function, and the improved black kite optimization algorithm based on the approximation error principle is used to find the minimum error. The specific steps are as follows: S311. Assume that there is a black kite population in the search space. The dimension of each black kite individual in the black kite population represents the laboratory data. The position of the black kite individual represents the experimental result data. The expected experimental result data is regarded as an excellent leader in the black kite population. The upper and lower bounds of the search space are set as and , represents a random number between [0, 1], and the black-winged kite population dimension is , then the black-winged kite population Initial positions of black-winged kites ; S312, the black-winged kite population is in the predation stage, the black-winged kites are hovering in the air, and the current number of iterations is set to , the maximum number of iterations is , the black-winged kite population Black-winged kite individual The iteration position is , Represents a random number between [0, 1], and the attack coefficient is , the first The initial position of each black-winged kite is updated to obtain the first Black-winged kite individual Iteration position , the calculation formula is as follows: ; ; Introduce the spiral flight strategy and select The position of the best leader in the black-winged kite population at the iteration , corresponding to the best fitness function value, the position of the excellent leader in the black-winged kite population and the The individual position difference of the black-winged kite is recorded as the error coefficient, and the spiral flight radius of the black-winged kite is , update the position to get ,in represents the helical constant, represents the error coefficient; S313, update the individual position of the black-winged kite according to the best fitness function value of the current iteration. At this time, the experimental result data is constantly approaching the expected experimental result data. The black-winged kite population is in the migration stage, and the Cauchy mutation is set. , represents the migration coefficient, represents a random number between [0, 1], and calculates the The fitness function value corresponding to the iteration position , calculate the Black-winged kite individual The fitness function value corresponding to the iteration position , for position Update, the calculation formula is as follows: ; ; When the current number of iterations reaches the maximum number of iterations, stop the iteration and get the The final position of the black-winged kite individual, the experimental result data obtained at the final position coordinates is the best experimental result data, and the minimum error is obtained; S32, adjusting the laboratory data of the processed laboratory data set with the minimum error as the goal to obtain optimized laboratory data, forming an optimized laboratory data set, and completing laboratory data optimization.
[0012] This invention optimizes laboratory data by using an improved black kite optimization algorithm to find the minimum error; the algorithm simulates the flight and predation behavior of black kites in nature, and has the characteristics of fast search speed and strong search ability. The algorithm is then improved using spiral flight, which improves the global search capability and increases the diversity of black kites while ensuring the convergence speed.
[0013] Preferably, S4 comprises the following steps: S41. Establish a laboratory database to record the laboratory data collection time in the processed laboratory data set, with the collection time as the directory, including experimental process measurement values, experimental result data, optimized laboratory data, etc., and use the experimental condition data in the experimental condition data set as the index, input the processed laboratory data set into the laboratory database according to different experimental condition data, realize data storage, and complete laboratory data analysis.
[0014] The present invention also discloses a system of a laboratory data analysis method based on machine learning technology, which specifically includes: a laboratory data abnormality cleaning module, a neural network data filling module, a laboratory data optimization module and a laboratory database establishment module; The laboratory data anomaly cleaning module uses an improved isolation forest algorithm to detect abnormal data in the laboratory data set; The neural network data filling module is used to establish an improved generative adversarial network filling model to fill the laboratory data set; The laboratory data optimization module is used to improve the black kite optimization algorithm to find the minimum error of the experimental result data to achieve data optimization; The laboratory database establishment module is used to establish a database to store processed laboratory data.
[0015] The present invention has the following beneficial effects: 1. The invention divides the original laboratory data set by using an improved isolation forest algorithm based on an adaptive threshold, introduces an adaptive threshold, facilitates finding the division points of the isolation forest, calculates the abnormal scores of nodes in the isolation forest, and screens out abnormal data in the isolation forest. Compared with the traditional isolation forest, it reduces the complexity of data processing and reduces the possibility of data misjudgment.
[0016] 2. The invention trains a generative adversarial network, introduces multiple missing data filling methods, combines multiple laboratory data, outputs multiple filling results, and obtains an improved generative adversarial network filling model, which realizes multiple filling of laboratory data and reduces the data dimension. Compared with the generative adversarial network, the network structure is simplified, and the filling efficiency and result accuracy are effectively improved.
[0017] 3. The invention optimizes laboratory data by finding the minimum error through the use of an improved black kite optimization algorithm; the algorithm simulates the flight and predation behavior of black kites in nature, and has the characteristics of fast search speed and strong search ability. The algorithm is then improved by using spiral flight, which improves the global search ability and increases the diversity of black kites while ensuring the convergence speed.
[0018] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the invention, the drawings required for describing the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the invention. For ordinary technicians in this field, they can also obtain drawings based on these drawings without paying creative work.
[0020] Figure 1 A schematic diagram of the process of analyzing laboratory data by a laboratory data analysis system based on machine learning technology provided by 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] In the description of the present invention, it is necessary to understand that the terms "opening", "upper", "lower", "top", "middle", "inside" and the like indicating orientation or positional relationship are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the components or elements referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the invention.
[0023] Example 1 Please refer to Figure 1 The present invention provides a laboratory data analysis method based on machine learning technology, comprising the following steps: S1, collecting the data generated by the laboratory to obtain an original laboratory data set, finding an adaptive threshold of the isolation forest algorithm, using an improved isolation forest algorithm to divide the original laboratory data set based on the adaptive threshold to obtain an improved isolation forest, and then deleting abnormal laboratory data in the improved isolation forest to obtain a processed laboratory data set; The S1 comprises the following steps: S11, collect the data generated in the laboratory, the data generated in the laboratory includes experimental condition data, experimental process measurement values, experimental result data, etc., obtain the original laboratory data, and set the experimental condition data set as ,in Indicates The experimental condition data includes experimental temperature, experimental humidity, etc. The original laboratory data is classified according to different experimental condition data in the experimental condition data set. Each experimental condition data contains original laboratory data, obtain the original laboratory data subsets, and form the original laboratory data set; S12: Select any subset of original laboratory data from the original laboratory data set and record it as the laboratory data set to be processed. ,in Indicates The original laboratory data are set, the attribute set of the laboratory data set to be processed is set, and an isolation tree is established. The maximum level of the isolation tree is , selecting a random attribute, a maximum attribute and a minimum attribute from the attribute set of the laboratory data set to be processed, and setting an isolated tree split point, wherein the isolated tree split point is greater than or equal to the minimum attribute and less than or equal to the maximum attribute; Compare the isolated tree segmentation point with the attribute set of the laboratory data set to be processed, place the laboratory data to be processed corresponding to the attribute greater than the isolated tree segmentation point on the right side of the isolated tree, and place the laboratory data to be processed corresponding to the attribute less than the isolated tree segmentation point on the left side of the isolated tree, to obtain the first layer left subtree and the first layer right subtree; take the nodes on the first layer left subtree and the first layer right subtree as the isolated tree segmentation points, repeatedly divide the laboratory data set to be processed until the number of isolated tree layers reaches the maximum layer degree of the isolated tree, stop dividing, and obtain the first isolated forest; S13, calculating the anomaly evaluation value of the first isolation forest and finding the adaptive threshold of the first isolation forest, the specific steps are as follows: S131, setting the first isolation forest to include isolated trees, select any isolated tree in the first isolated forest as a candidate isolated tree, the nodes on the candidate isolated tree represent the laboratory data to be processed, convert the candidate isolated tree into a curve image, set Indicates the curve image The coordinates corresponding to the laboratory data to be processed, Indicates the curve image The coordinates corresponding to the laboratory data to be processed, the calculation formula of the abnormal evaluation value of the candidate isolated tree is as follows: ; in, represents the abnormal evaluation value of the candidate isolated tree, Indicates the number of laboratory data to be processed, ; S132, sequentially calculating the abnormal evaluation values of all isolated trees in the first isolated forest to obtain the abnormal evaluation value of the first isolated forest, and re-sorting the abnormal evaluation values of the first isolated forest in ascending order to obtain a sorted isolated forest. ,in Indicates isolated trees; set the first threshold interval to ,in represents a random integer, selects a random integer in the first threshold interval, recorded as the first integer, calculates the abnormal evaluation value of the isolated tree corresponding to the first integer to the rightmost isolated tree in the sorted isolation forest, recorded as the first abnormal evaluation value; sets the second threshold interval to ,in Indicates less than A random integer is selected in the second threshold interval, recorded as a second integer, and an abnormal evaluation value from the isolated tree corresponding to the second integer to the rightmost isolated tree in the sorted isolation forest is calculated, recorded as a second abnormal evaluation value; S133: Combine the first abnormality assessment value and the second abnormality assessment value to obtain an initial abnormality interval ,in represents the first abnormal evaluation value, Indicates the second abnormal evaluation value, and sets the first step length and the second step length according to the initial abnormal interval; when the initial abnormal interval When using Add the first step length to get the new abnormal interval. When the initial abnormal interval When using Subtract the second step length to get a new abnormal interval; continue to iterate, set the step error, until the absolute value of the difference in the abnormal evaluation value in the new abnormal interval is less than the step error, stop the iteration, and calculate the abnormal evaluation value of the isolated tree corresponding to the mean of the first step length and the second step length, which is recorded as the adaptive threshold of the first isolated forest; S14, using the adaptive threshold of the first isolation forest to divide the first isolation forest to obtain an improved isolation forest, each node in the improved isolation forest represents the laboratory data to be processed, and selecting any laboratory data to be processed in the improved isolation forest is recorded as laboratory data , calculate laboratory data The anomaly score is calculated as follows: ; in, Represents laboratory data The anomaly score, Represents laboratory data In the improved isolation forest, the average path height is Represents the average path height of all isolated trees in the improved isolation forest; Calculate the anomaly score of the laboratory data to be processed in the improved isolation forest and set the anomaly threshold as , treating the to-be-processed laboratory data corresponding to an abnormality score less than an abnormality threshold as normal laboratory data, otherwise treating it as abnormal laboratory data, deleting the abnormal laboratory data, and sequentially identifying and deleting the abnormal laboratory data in the original laboratory data set to obtain a processed laboratory data set; S2, training a generative adversarial network, obtaining an improved generative adversarial network filling model by introducing multiple missing data filling methods, and using the improved generative adversarial network filling model to fill the processed laboratory data set to obtain a processed laboratory data set; The S2 comprises the following steps: S21, according to the processed laboratory data set, obtain corresponding data attributes, set the processed laboratory data set to include missing laboratory data, obtaining a missing laboratory data set, randomly selecting a number of processed laboratory data from the processed laboratory data set to form a data attribute set, wherein the data attribute set includes at least two data attributes; using the data attribute set to train and verify the generative adversarial network to obtain the accuracy of the data attribute set, the specific steps are as follows: S211. Assume that the generative adversarial network includes a generator and a discriminator, where the generator includes a three-layer fully connected network and the activation function is Functions and Function, the discriminator contains a three-layer fully connected network, and the activation function is Functions and Function, the learning rate is ; Randomly select a data attribute from the data attribute set, the data attribute contains a number of processed laboratory data, and split them to obtain a laboratory data sample training set and a laboratory data sample verification set; Generate a laboratory data mask matrix, a laboratory data noise matrix and a prompt matrix according to the laboratory data sample training set, and input them into the generator, continuously optimize the generator parameters, and output laboratory fill-in data; Combine the laboratory fill-in data and the missing laboratory data in the laboratory data sample training set, input them into the discriminator, fix the generator parameters, and use the stochastic gradient descent method to update the discriminator parameters until the data repair loss and the sum of data similarity are minimized, the training is completed, and a trained generative adversarial network model is obtained; S212, then input the laboratory data sample verification set into the trained generative adversarial network model, and set the accuracy threshold to , when the accuracy of the output prediction result and the actual laboratory data sample is greater than the accuracy threshold, the generative adversarial network filling model is obtained, otherwise the parameters are adjusted until the accuracy of the output prediction result and the actual laboratory data sample is greater than the accuracy threshold; the accuracy of each output prediction result is obtained to obtain the accuracy of the data attribute set; S22, set a prediction accuracy threshold, select data attributes whose accuracy of the data attribute set is greater than the prediction accuracy threshold, and form a data attribute subset; input the data attribute subset into the generative adversarial network filling model, and output a filling value for each data attribute in the data attribute subset, which is recorded as the filling set ,in Indicates The filled value of each data attribute; the processed laboratory data set is filled multiple times according to the filled value of the data attribute, and the calculation formula is as follows: ; in, represents the imputed value of the processed laboratory data set, Indicates The accuracy of the prediction results, ; After sequentially filling the processed laboratory data set with the filling values of the processed laboratory data set, a processed laboratory data set is obtained; S3, obtaining experimental result data according to the processed laboratory data set, setting expected experimental result data, calculating the error between the experimental result data and the expected experimental result data, and finding the minimum error using the improved black-winged kite optimization algorithm based on the approximation error principle to obtain an optimized laboratory data set; The S3 comprises the following steps: S31. According to the processed laboratory data set, obtain laboratory data under different experimental condition data, and obtain experimental result data according to the laboratory data under different experimental condition data, which is recorded as the experimental result data set. ,in Indicates The experimental result data of the experimental condition data are set, the expected experimental result data are set, the error between the experimental result data and the expected experimental result data is used as the fitness function, and the improved black kite optimization algorithm based on the approximation error principle is used to find the minimum error. The specific steps are as follows: S311. Assume that there is a black kite population in the search space. The dimension of each black kite individual in the black kite population represents the laboratory data. The position of the black kite individual represents the experimental result data. The expected experimental result data is regarded as an excellent leader in the black kite population. The upper and lower bounds of the search space are set as and , represents a random number between [0, 1], and the black-winged kite population dimension is , then the black-winged kite population Initial positions of black-winged kites ; S312, the black-winged kite population is in the predation stage, the black-winged kites are hovering in the air, and the current number of iterations is set to , the maximum number of iterations is , the black-winged kite population Black-winged kite individual The iteration position is , Represents a random number between [0, 1], and the attack coefficient is , the first The initial position of each black-winged kite is updated to obtain the first Black-winged kite individual Iteration position , the calculation formula is as follows: ; ; Introduce the spiral flight strategy and select The position of the best leader in the black-winged kite population at the iteration , corresponding to the best fitness function value, the position of the excellent leader in the black-winged kite population and the The individual position difference of the black-winged kite is recorded as the error coefficient, and the spiral flight radius of the black-winged kite is , update the position to get ,in represents the helical constant, represents the error coefficient; S313, update the individual position of the black-winged kite according to the best fitness function value of the current iteration. At this time, the experimental result data is constantly approaching the expected experimental result data. The black-winged kite population is in the migration stage, and the Cauchy mutation is set. , represents the migration coefficient, represents a random number between [0, 1], and calculates the The fitness function value corresponding to the iteration position , calculate the Black-winged kite individual The fitness function value corresponding to the iteration position , for position Update, the calculation formula is as follows: ; ; When the current number of iterations reaches the maximum number of iterations, stop the iteration and get the The final position of the black-winged kite individual, the experimental result data obtained at the final position coordinates is the best experimental result data, and the minimum error is obtained; S32, adjusting the laboratory data with the minimum error as the goal of the processed laboratory data set to obtain optimized laboratory data, forming an optimized laboratory data set, and completing laboratory data optimization; S4, establishing a laboratory database, storing the processed laboratory data set, and completing laboratory data analysis; The S4 comprises the following steps: S41. Establish a laboratory database to record the laboratory data collection time in the processed laboratory data set, with the collection time as the directory, including experimental process measurement values, experimental result data, optimized laboratory data, etc., and use the experimental condition data in the experimental condition data set as the index, input the processed laboratory data set into the laboratory database according to different experimental condition data, realize data storage, and complete laboratory data analysis.
[0024] Example 2 The present invention also discloses a system of a laboratory data analysis method based on machine learning technology, which specifically includes: a laboratory data abnormality cleaning module, a neural network data filling module, a laboratory data optimization module and a laboratory database establishment module; The laboratory data anomaly cleaning module uses an improved isolation forest algorithm to detect abnormal data in the laboratory data set; The neural network data filling module is used to establish an improved generative adversarial network filling model to fill the laboratory data set; The laboratory data optimization module is used to improve the black kite optimization algorithm to find the minimum error of the experimental result data to achieve data optimization; The laboratory database establishment module is used to establish a database to store processed laboratory data.
[0025] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0026] The preferred embodiments of the invention disclosed above are only used to help explain the invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the invention, so that those skilled in the art can understand and use the invention well.
Claims
1. A laboratory data analysis method based on machine learning technology, characterized in that: The steps include: S1, collecting the data generated by the laboratory to obtain an original laboratory data set, finding an adaptive threshold of the isolation forest algorithm, using an improved isolation forest algorithm to divide the original laboratory data set based on the adaptive threshold to obtain an improved isolation forest, and then deleting abnormal laboratory data in the improved isolation forest to obtain a processed laboratory data set; S2, training a generative adversarial network, obtaining an improved generative adversarial network filling model by introducing multiple missing data filling methods, and using the improved generative adversarial network filling model to fill the processed laboratory data set to obtain a processed laboratory data set; S3, obtaining experimental result data according to the processed laboratory data set, setting expected experimental result data, calculating the error between the experimental result data and the expected experimental result data, and finding the minimum error using an optimization algorithm based on the approximation error principle to obtain an optimized laboratory data set; S4. Establish a laboratory database to store the processed laboratory data set and complete laboratory data analysis.
2. A laboratory data analysis method based on machine learning technology according to claim 1, characterized in that: The S1 comprises the following steps: S11. Collect the data generated by the laboratory to obtain original laboratory data and form an original laboratory data set; S12, selecting a laboratory data set to be processed from the original laboratory data set, setting an isolated tree segmentation point, dividing the laboratory data set to be processed until the number of isolated tree layers reaches the maximum layer of the isolated tree, stopping the division, and obtaining a first isolation forest; S13, calculating the anomaly assessment value of the first isolation forest, and finding the adaptive threshold of the first isolation forest; S14. Use the adaptive threshold of the first isolation forest to divide the first isolation forest to obtain an improved isolation forest, calculate the abnormality score of the laboratory data to be processed in the improved isolation forest, set the abnormality threshold, identify and delete the abnormal laboratory data by comparing the abnormality score and the abnormality threshold, and obtain a processed laboratory data set.
3. A laboratory data analysis method based on machine learning technology according to claim 2, characterized in that: The S13 comprises the following steps: S131, converting the isolated tree of the first isolation forest into a curve image, and calculating the abnormality assessment value of the isolated tree according to the laboratory data to be processed on the curve image; S132, sequentially calculating the abnormal evaluation values of all isolated trees in the first isolated forest to obtain the abnormal evaluation value of the first isolated forest, and re-sorting the abnormal evaluation values of the first isolated forest in ascending order, Recalculate the anomaly assessment value; S133. According to the abnormal evaluation value, an initial abnormal interval is obtained, and a step size and a step size error are set. The initial abnormal interval is iterated continuously according to the step size to obtain a new abnormal interval until the absolute value of the abnormal evaluation value difference in the new abnormal interval is less than the step size error. The iteration is stopped to obtain the adaptive threshold of the first isolation forest.
4. The laboratory data analysis method based on machine learning technology according to claim 1, characterized in that: The S2 comprises the following steps: S21. Obtain corresponding data attributes according to the processed laboratory data set to form a data attribute set, wherein the data attribute set includes at least two data attributes; and use the data attribute set to train and verify a generative adversarial network to obtain the accuracy of the data attribute set; S22. Set a prediction accuracy threshold, select data attributes whose accuracy of the data attribute set is greater than the prediction accuracy threshold, and form a data attribute subset; input the data attribute subset into the generative adversarial network filling model, and output a filling value for each data attribute in the data attribute subset to obtain a filled set, and perform multiple fillings on the processed laboratory data set according to the filling values of the data attributes to obtain a processed laboratory data set.
5. A laboratory data analysis method based on machine learning technology according to claim 4, characterized in that: The S21 comprises the following steps: S211, setting the generative adversarial network to include a generator and a discriminator, randomly selecting a data attribute from the data attribute set, the data attribute including a number of processed laboratory data, and splitting them to obtain a laboratory data sample training set and a laboratory data sample verification set; generating a laboratory data mask matrix, a laboratory data noise matrix, and a prompt matrix according to the laboratory data sample training set, and inputting them into the generator, continuously optimizing the generator parameters, and outputting laboratory fill-in data; combining the laboratory fill-in data and the missing laboratory data in the laboratory data sample training set, inputting them into the discriminator, fixing the generator parameters, and using the stochastic gradient descent method to update the discriminator parameters until the data repair loss and the sum of data similarity are minimized, the training is completed, and a trained generative adversarial network model is obtained; S212, then input the laboratory data sample verification set into the trained generative adversarial network model, and set the accuracy threshold to When the accuracy of the output prediction result and the actual laboratory data sample is greater than the accuracy threshold, the generative adversarial network filling model is obtained, otherwise the parameters are adjusted until the accuracy of the output prediction result and the actual laboratory data sample is greater than the accuracy threshold; the accuracy of each output prediction result is obtained to obtain the accuracy of the data attribute set.
6. The laboratory data analysis method based on machine learning technology according to claim 1, characterized in that: The S3 comprises the following steps: S31, according to the processed laboratory data set, obtain laboratory data under different experimental conditions, and obtain experimental result data; set expected experimental result data, use the error between the experimental result data and the expected experimental result data as a fitness function, and use the improved black-winged kite optimization algorithm based on the approximation error principle to find the minimum error; S32, adjusting the laboratory data of the processed laboratory data set with the minimum error as the goal to obtain optimized laboratory data, forming an optimized laboratory data set, and completing laboratory data optimization.
7. The method for analyzing laboratory data based on machine learning technology according to claim 6, characterized in that: The S31 comprises the following steps: S311. Assume that there is a black kite population in the search space. The dimension of each black kite individual in the black kite population represents the laboratory data. The position of the black kite individual represents the experimental result data. The expected experimental result data is regarded as an excellent leader in the black kite population. The upper and lower bounds of the search space are set as and , represents a random number between [0, 1], and the black-winged kite population dimension is , then the black-winged kite population Initial positions of black-winged kites ; S312, the black-winged kite population is in the predation stage, the black-winged kites are hovering in the air, and the current number of iterations is set to , the maximum number of iterations is , the black-winged kite population Black-winged kite individual The iteration position is , Represents a random number between [0, 1], and the attack coefficient is , the first The initial position of each black-winged kite is updated to obtain the first Black-winged kite individual Iteration position , the calculation formula is as follows: ; Introduce the spiral flight strategy and select The position of the best leader in the black-winged kite population at the iteration , corresponding to the best fitness function value, the position of the excellent leader in the black-winged kite population and the The individual position difference of the black-winged kite is recorded as the error coefficient, and the spiral flight radius of the black-winged kite is , update the position to get ,in represents the helical constant, represents the error coefficient; S313, update the individual position of the black-winged kite according to the best fitness function value of the current iteration. At this time, the experimental result data is constantly approaching the expected experimental result data. The black-winged kite population is in the migration stage, and the Cauchy mutation is set. , represents the migration coefficient, represents a random number between [0, 1], and calculates the The fitness function value corresponding to the iteration position , calculate the Black-winged kite individual The fitness function value corresponding to the iteration position , for position Update, the calculation formula is as follows: ; When the current number of iterations reaches the maximum number of iterations, stop the iteration and get the The final position of the black-winged kite individual, the experimental result data obtained at the final position coordinates is the best experimental result data, and the minimum error is obtained.
8. The laboratory data analysis method based on machine learning technology according to claim 1, characterized in that: The S4 comprises the following steps: S41, establish a laboratory database, record the laboratory data collection time in the processed laboratory data set, input the processed laboratory data set into the laboratory database according to different experimental conditions, realize data storage, and complete laboratory data analysis.
9. A system for implementing the laboratory data analysis method based on machine learning technology as described in any one of claims 1 to 8, characterized in that: Specifically include: Laboratory data anomaly cleaning module, neural network data filling module, laboratory data optimization module and laboratory database establishment module; The laboratory data anomaly cleaning module uses an improved isolation forest algorithm to detect abnormal data in the laboratory data set; The neural network data filling module is used to establish an improved generative adversarial network filling model to fill the laboratory data set; The laboratory data optimization module is used to improve the black kite optimization algorithm to find the minimum error of the experimental result data to achieve data optimization; The laboratory database establishment module is used to establish a database to store processed laboratory data.
Citation Information
Patent Citations
Laboratory data analysis method and laboratory information management platform
CN117744002A
Abnormal data reconstruction method and system based on isolated forest adversarial network
CN117520954A
Laboratory control management system based on digital twinning
CN118822268A
Cited By
Anchor rod stress meter monitoring data processing method and system based on data analysis
CN120030285A
Anchor bolt stress gauge monitoring data processing method and system based on data analysis
CN120030285B
Big data-based intelligent scheduling system and method for vehicle passing through barrier gate
CN120087728A
Intelligent Scheduling System and Method for Vehicle Barrier Gate Passage Based on Big Data
CN120087728B