Application of intelligent data distribution analysis and transformation in medical data mining
By using the neural network regression model to predict Box_Cox parameters in the medical field, intelligent analysis and conversion of data distribution in different hospitals is achieved, the problem of data distribution differences is solved, and the applicability and accuracy of the machine learning model are improved.
Patent Information
- Application Number
- CN202311179650.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-13
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2043-09-13
AI Technical Summary
Existing technology is difficult to achieve effective conversion between medical data distributions in different hospitals in the medical field, resulting in poor application results of machine learning models in different data environments.
By extracting the hospital's project data, perform Box_Cox conversion and build data features, use the neural network regression model to predict Box_Cox parameters, realize intelligent analysis and conversion of data distribution, and eliminate differences between data.
It improves the distribution consistency between the training set and the test set in machine learning, achieves rapid conversion to the target data distribution, and improves the applicability and accuracy of the model.
Smart Images

Figure CN117219285B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence and data distribution conversion technology, and in particular to an application of data distribution intelligent analysis conversion in medical data mining. Background Art
[0002] The data distribution problem is an important prerequisite in big data analysis. Usually, training a machine learning model is used to predict and fit other unknown data. In this case, it is strictly required that the training data and the test data are independent and identically distributed. However, in real applications, independent and identically distributed data is very rare, especially in the medical field. The same medical test project, under different geographical conditions, instruments and other conditions, produces very different distributions of medical data. This results in the model trained in one hospital not being able to be well applied to the data of another hospital, resulting in poor model testing results. Therefore, using intelligent technology to convert the data distribution of one hospital to be similar to the data distribution of another hospital is of great significance to improving the distribution consistency of the training set and the test set.
[0003] Artificial intelligence is an interdisciplinary subject based on computer science. As the core technology of artificial intelligence research, machine learning has gradually developed well in biomedical image recognition, disease prediction, and other aspects. As an important technical means of artificial intelligence, machine learning mainly learns to handle complex tasks from data and has strong fitting ability, but at the same time it has a strong dependence on data, that is, features and data volume. When the data quality is poor, the model will also have errors in solving practical problems.
[0004] The existing Box-Cox data distribution conversion technology can only convert data into a specific distribution through a functional relationship, but cannot convert data into the distribution of any target data; and when setting the Box-Cox conversion parameters, the data distribution conversion is performed through experience and multiple attempts, lacking research on intelligent analysis of data distribution. Summary of the invention
[0005] The purpose of the present invention is to provide an application of intelligent analysis and conversion of data distribution in medical data mining, to make method innovations in this field, to predict the parameters of Box-Cox data conversion according to data characteristics, and to quickly convert to the target data distribution. Through intelligent analysis, the differences between data are eliminated to the greatest extent, and the distribution consistency of training set and test set in machine learning is improved.
[0006] To achieve the above objectives, the present invention provides an application of data distribution intelligent analysis and conversion in medical data mining.
[0007] Preferably, the method comprises the following steps:
[0008] S1. Extract the project data of Hospital A and Hospital B to obtain the original data set;
[0009] S2, perform Box-Cox transformation on the original data set, and construct data features based on the transformed data set to form a sample set with the corresponding Box-Cox parameter lmbda;
[0010] S3, select a neural network regression model to train the data set and evaluate the model;
[0011] S4, inputting the data features of the data to be converted into the model for prediction;
[0012] S5. Use Box_Cox to transform the data distribution and compare the data distribution before and after the transformation.
[0013] Preferably, in step S1, data from two different hospitals are extracted, one hospital is used as the target data distribution, and the other hospital is used as the data distribution to be converted, and the data from the two hospitals are merged and sorted.
[0014] Preferably, in step S2, the following steps are specifically included:
[0015] S21, performing Box-Cox transformation on the data set of step S1, calculating the data characteristics of the transformed data, and simulating the relationship between the original data set and the Box-Cox transformation parameters;
[0016] S22. Specific data characteristics include mean, median, maximum, minimum, range, standard deviation, variance, coefficient of dispersion, skewness, and kurtosis, a total of 10 statistics;
[0017] S23. Combine the calculated data features with the lmbda parameters to form a new sample set.
[0018] Preferably, in step S3, it specifically includes:
[0019] After the model is built, the evaluation index of the regression algorithm is used to evaluate the model and obtain MSE, MAE and R2;
[0020] Among them, the calculation formulas of MSE, MAE and R2 are:
[0021]
[0022]
[0023]
[0024] Among them, y i represents the original dependent variable value, represents the predicted dependent variable value, represents the mean of the original dependent variable, m represents the number of samples, MSE is the mean square error, which is the square of the difference between the true value and the predicted value, and then the average of the sum, which is used to detect the deviation between the predicted value and the true value of the model; MAE is the average of the absolute error, which better reflects the actual situation of the predicted value error; R 2 is the coefficient of determination, which reflects the accuracy of the model fitting the data. 2 The range is from 0 to 1. The closer its value is to 1, the stronger the explanatory power of the variables in the equation for y, and the better the model fits the data.
[0025] Preferably, in step S4, data features are calculated for the data to be converted and distributed, to form model input features in step S4.
[0026] Preferably, in step S5, the prediction result in step S4 is input into the Box-Cox transformation to perform data distribution transformation, and a plot comparison is performed on the data distribution before and after the transformation.
[0027] Therefore, the present invention adopts the above-mentioned data distribution intelligent analysis and conversion application in medical data mining, and its technical effects are as follows:
[0028] (1) Make methodological innovations in this field, predict the parameters of Box-Cox data transformation based on data characteristics, and quickly transform to the target data distribution.
[0029] (2) Through intelligent analysis, the differences between data can be eliminated to the greatest extent possible, thereby improving the distribution consistency of training sets and test sets in machine learning.
[0030] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flow chart of the data distribution intelligent analysis and conversion method of the present invention;
[0032] Figure 2 This is a comparison chart of data distribution before conversion;
[0033] Figure 3 This is a comparison chart of the data distribution after conversion. DETAILED DESCRIPTION
[0034] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0035] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.
[0036] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the main idea or essential features of the present invention. Therefore, from all points of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention, and any reference numerals in the claims should not be regarded as limiting the claims involved.
[0037] In addition, it should be understood that although this specification is described according to the implementation modes, not every implementation mode includes only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation modes that can be understood by those skilled in the art. These other implementation modes are also covered within the protection scope of the present invention.
[0038] It should also be understood that the specific embodiments described above are only used to explain the present invention, and the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, can make equivalent replacements or changes based on the technical solutions and inventive concepts of the present invention, which should be covered by the protection scope of the present invention / invention.
[0039] Technologies, methods, and equipment known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0040] The disclosed contents of the prior art documents cited in the present specification are incorporated into the present invention by reference in their entirety and are therefore part of the disclosure of the present invention.
[0041] Embodiment 1
[0042] like Figure 1 As shown, the present invention provides an application of data distribution intelligent analysis and conversion in medical data mining, comprising the following steps:
[0043] S1. Extract the project data of Hospital A and Hospital B to obtain the original data set, where the data set of Hospital A is the single-dimensional data of the indicator ALT, and the data set of Hospital B is the single-dimensional data of the indicator ALT. The data set is obtained, and the specific content is:
[0044] Extract data from two different hospitals, one hospital as the target data distribution, the other hospital as the transformed data distribution, and merge and organize the data of the two hospitals;
[0045] S2. Based on the stats.boxcox function in scipy in Python, the original data set is Box_Cox transformed, and data features are constructed based on the transformed data set to form a sample set with the corresponding Box_Cox parameter lmbda, which specifically includes the following steps:
[0046] S21, performing Box_Cox transformation on the combined data set of the two hospitals in step S1, calculating the data characteristics of the transformed data, and simulating the relationship between the original data set and the Box_Cox transformation parameters;
[0047] S22. Specific data characteristics include mean, median, maximum, minimum, range, standard deviation, variance, coefficient of dispersion, skewness, and kurtosis, a total of 10 statistics;
[0048] Perform Box-Cox transformation, cyclically transform parameter lmbda, parameter range {-1, 1}, step size 0.01.
[0049] S23, calculate the data features of each converted data, and form a simulated data set with the corresponding conversion parameters. Combine the calculated data features with the lmbda parameters to form a new sample set, as shown in Table 1.
[0050] Table 1 Part of the sample set
[0051]
[0052]
[0053] S3. Select a neural network regression model to train the data set and evaluate the model, including:
[0054] The experiment uses a neural network algorithm to build a regression model, and the specific parameters are set as shown in Table 2:
[0055] Table 2 Neural network prediction model structure parameters
[0056] Serial number Layer Type Number of neurons Rate Activation Function 1 Input 2 Dense 128 ReLU 3 Dense 64 ReLU 4 Dense 1 sigmoid
[0057] For the training data formed by S2, all data features are used as model inputs, and the corresponding lmbda values are used as model labels to build a neural network regression model. The model indicator results of the neural network regression are shown in Table 3:
[0058] Table 3 Regression model evaluation indicators
[0059] Model MSE MAE <![CDATA[R 2 ]]> Neural Network Regression 0.17 0.16 0.98
[0060] After the model is built, the evaluation index of the regression algorithm is used to evaluate the model and obtain MSE, MAE and R2;
[0061] Among them, the calculation formulas of MSE, MAE and R2 are:
[0062]
[0063]
[0064]
[0065] Among them, y i represents the original dependent variable value, represents the predicted dependent variable value, represents the mean of the original dependent variable, m represents the number of samples, MSE is the mean square error, which is the square of the difference between the true value and the predicted value, and then the average of the sum, which is used to detect the deviation between the predicted value and the true value of the model; MAE is the average of the absolute error, which better reflects the actual situation of the predicted value error; R 2 is the coefficient of determination, which reflects the accuracy of the model fitting the data. 2 The range is from 0 to 1. The closer its value is to 1, the stronger the explanatory power of the variables in the equation for y, and the better the model fits the data.
[0066] S4. Calculate the descriptive statistics of the data of hospital B to be converted as the input variable of the model prediction, input the data characteristics of the data to be converted into the model, and make a prediction, and obtain the predicted result lmbda value of 0.62; calculate the data characteristics of the data to be converted to constitute the model input characteristics in step S4.
[0067] Table 4 Prediction results
[0068] Mean 28.09965802 median 23 Maximum 88 Minimum 0 Very bad 88 Standard Deviation 17.73734084 variance 314.6132602 Coefficient of dispersion 0.631229776 Skewness 1.256506321 Kurtosis 1.115018407
[0069] S5. Use Box_Cox to transform the data distribution form and compare the data distribution before and after the transformation. Input the prediction results in step S4 into the Box_Cox transformation to transform the data distribution and draw a comparison of the data distribution before and after the transformation. Compare the data distribution after the transformation with the data distribution before and after the transformation. The comparison results are as follows: Figure 2 .
[0070] Therefore, the present invention adopts the above-mentioned intelligent analysis and conversion of data distribution in medical data mining, makes method innovation in this field, predicts the parameters of Box-Cox data conversion according to data characteristics, and quickly converts to the target data distribution. Through intelligent analysis, the differences between data are eliminated to the greatest extent, and the distribution consistency of training set and test set in machine learning is improved.
[0071] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. An application of data distribution intelligent analysis and transformation in medical data mining, It is characterized in that The following steps are involved: S1. Extract the project data of Hospital A and Hospital B to obtain the original data set; Extract data from two different hospitals, one hospital as the target data distribution, the other hospital as the data to be converted distribution, and merge and organize the data of the two hospitals; S2, perform Box-Cox transformation on the original data set, and construct data features based on the transformed data set to form a sample set with the corresponding Box-Cox parameter lmbda; In step S2, the following steps are specifically included: S21, performing Box-Cox transformation on the data set of step S1, calculating the data characteristics of the transformed data, and simulating the relationship between the original data set and the Box-Cox transformation parameters; S22. Specific data characteristics include mean, median, maximum, minimum, range, standard deviation, variance, coefficient of dispersion, skewness, and kurtosis, a total of 10 statistics; S23, combining the calculated data features and lmbda parameters to form a new sample set; S3, select a neural network regression model to train the data set and evaluate the model; S4, inputting the data features of the data to be converted into the model for prediction; S5. Use Box_Cox to transform the data distribution and compare the data distribution before and after the transformation; In step S5, the prediction result in step S4 is input into the Box-Cox transformation to perform data distribution transformation, and a plot comparison is made between the data distribution before and after the transformation.
2. The application of the intelligent analysis and conversion of data distribution in medical data mining according to claim 1, It is characterized in that In step S3, it specifically includes: After the model is built, the evaluation index of the regression algorithm is used to evaluate the model and obtain MSE, MAE and R 2 ; Among them, MSE, MAE and R 2 The calculation formulas are: Among them, y i represents the original dependent variable value, represents the predicted dependent variable value, represents the mean of the original dependent variable, m represents the number of samples, MSE is the mean square error, which is the square of the difference between the true value and the predicted value, and then the average of the sum, which is used to detect the deviation between the predicted value and the true value of the model; MAE is the average of the absolute error, which better reflects the actual situation of the predicted value error; R 2 is the coefficient of determination, which reflects the accuracy of the model fitting the data. 2 The range is from 0 to 1. The closer its value is to 1, the stronger the explanatory power of the variables in the equation for y, and the better the model fits the data.
3. The application of the data distribution intelligent analysis and conversion in medical data mining according to claim 1, It is characterized in that In step S4, data features of the data to be converted are calculated to form model input features in step S4.
