A method and apparatus for analyzing results of medical laboratory tests
By constructing a hybrid machine learning model and using SHAP interpretability analysis, the problem of processing multi-source heterogeneous medical experimental data was solved, achieving efficient and interpretable analysis results and model self-optimization, thus improving the level of intelligence in medical research.
Patent Information
- Application Number
- CN202610046900.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-14
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies struggle to efficiently, accurately, and interpretably process multi-source heterogeneous medical experimental data. Analytical models have limited performance and lack self-optimization capabilities, leading to low efficiency and insufficient reliability of medical research results.
By constructing a hybrid machine learning model, combining weighted probability fusion of support vector machines and random forests, and integrating SHAP interpretability analysis, the system achieves automation and interpretability of data preprocessing, feature dimensionality reduction, and model training, thus building an intelligent analysis device.
It enables flexible adaptation to multi-source heterogeneous medical data, improves the universality and efficiency of the analysis framework, provides stable classification and prediction performance and interpretable decision-making process, supports model self-optimization and efficient resource utilization, and significantly improves the level of intelligence in medical research.
Smart Images

Figure CN122135862A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical laboratory test result processing technology, and in particular to a method and apparatus for analyzing medical laboratory test results. Background Technology
[0002] In the fields of life sciences and clinical medicine research, experimental testing is the core means of obtaining quantitative evidence of biological phenomena. With the rapid development of technologies such as high-throughput sequencing, mass spectrometry, flow cytometry, and digital pathological imaging, the experimental data generated by medical research has exploded in size and complexity, encompassing various modalities from numerical indicators (such as blood biochemical values) and sequence data (such as gene sequences) to high-dimensional images (such as tissue slide images) and time-series signals (such as electrophysiological recordings). These massive, heterogeneous, and high-dimensional experimental results contain crucial information for revealing disease mechanisms, discovering biomarkers, and evaluating drug efficacy. However, how to efficiently, accurately, and interpretably extract scientific insights from this complex data has become a key bottleneck restricting the efficiency and depth of medical research.
[0003] Currently, the analysis of medical experimental data typically relies on traditional biostatistical methods (such as t-tests and ANOVA) or basic machine learning models (such as logistic regression and single decision trees). Existing solutions and their prominent problems include: First, rigid data processing workflows. Existing methods are mostly designed for specific, homogeneous data types, lacking a unified, adaptive framework to handle multi-source, heterogeneous medical experimental data. Data preprocessing, feature engineering, and analytical models are often disconnected, requiring researchers to manually convert and connect them, which is inefficient and prone to introducing human error. Second, limited performance and insufficient robustness of analytical models. Faced with the common high dimensionality, small sample size, nonlinear relationships, and noise interference in medical data, traditional statistical methods have limited effectiveness, while single machine learning models (such as using support vector machines or random forests alone) often have shortcomings in generalization ability, stability, or adaptability to different data distributions, making it difficult to maintain high accuracy in complex and ever-changing real-world medical applications. Third, poor interpretability of analytical results. Many advanced ensemble or deep learning models, while improving predictive performance, operate like "black boxes" in their decision-making processes. Researchers struggle to understand which experimental metrics the model relies on and what logic leads to specific conclusions (such as disease classification). This lack of interpretability severely hinders the acceptance and validation of analytical results in rigorous scientific research and makes it difficult for models to provide reverse guidance for subsequent experimental design. Fourth, there is a lack of closed-loop optimization and automated management. Current analytical processes are mostly one-off or static, failing to form an effective feedback loop between model training and experimental result validation. When new experimental results deviate from model predictions, it is impossible to automatically use this new data to iteratively optimize the model. Furthermore, the entire analytical process lacks an intelligent central control unit to coordinate data flow, task scheduling, and parameter optimization, resulting in low resource utilization efficiency.
[0004] Therefore, the urgent technical problem to be solved in this field is: how to construct a comprehensive analysis scheme and device that can automatically process multi-source heterogeneous medical experimental data, integrate the advantages of multiple algorithms to improve analysis performance, provide clear decision interpretation, and achieve self-optimization and intelligent scheduling through feedback, thereby significantly improving the level of intelligence in medical research and the efficiency of scientific discovery. Summary of the Invention
[0005] The purpose of this invention is to provide a method and apparatus for analyzing medical experimental test results, so as to solve the problems existing in the prior art.
[0006] To achieve the above objectives, the present invention provides the following solution:
[0007] This invention provides a method for analyzing medical laboratory test results, comprising the following steps:
[0008] S1. Collect raw test data from multi-source medical experimental equipment, and perform data cleaning, normalization and missing value imputation on the raw test data to obtain preprocessed data;
[0009] S2. Extract multidimensional features from the preprocessed data, and perform dimensionality reduction processing on the extracted features to obtain a feature vector set;
[0010] S3. Based on the feature vector set of historical data, construct and train a hybrid machine learning model, which is composed of a support vector machine model and a random forest model through weighted probability fusion.
[0011] S4. Input the feature vector of the sample to be analyzed into the trained hybrid machine learning model to obtain the predicted probability, and output the classification result according to the preset decision threshold.
[0012] S5. Based on the confidence level of the predicted probability calculation results, the contribution of each feature to the classification result is analyzed using the SHAP interpretability method.
[0013] S6. Visualize and generate a report on the classification results, confidence level, and feature contribution.
[0014] Preferably, in step S1, the missing value interpolation process uses the K-nearest neighbor interpolation method, and the formula for calculating the interpolated value is:
[0015] ;
[0016] in, The preset number of nearest neighbor samples, The missing sample in the feature space The corresponding feature values of the nearest neighbor samples.
[0017] Preferably, in step S2, the dimensionality reduction process employs principal component analysis, and the formula for calculating the dimensionality-reduced data matrix is as follows:
[0018] ;
[0019] in, This is the preprocessed data matrix. From The first eigenvectors selected from the covariance matrix The projection matrix is formed by the eigenvectors corresponding to the largest eigenvalues, to ensure that the retained cumulative variance contribution rate is not lower than a preset threshold.
[0020] Preferably, in step S3, the support vector machine model uses a radial basis function as its kernel function, and its decision function is:
[0021] ;
[0022] in, For Lagrange multipliers, For sample labels, For radial basis kernel functions, , For kernel parameters, This is a bias term.
[0023] Preferably, in step S3, the specific method of weighted probability fusion is as follows:
[0024] ;
[0025] in, The normalized predicted probability output by the support vector machine model. This represents the normalized predicted probability output by the random forest model. and The fusion weights are determined through cross-validation grid search and satisfy the following conditions: + =1.
[0026] Preferably, in step S4, the preset decision threshold is determined through receiver operation characteristic curve analysis, and the classification rule is: if If the value is greater than or equal to θ, it is classified as a positive class; otherwise, it is classified as a negative class, where θ is a preset decision threshold.
[0027] Preferably, in step S5, the confidence level is calculated using the following formula:
[0028] ;
[0029] The confidence level ranges from [0, 1].
[0030] Preferably, in step S5, the formula for analyzing the contribution of each feature to the classification result using the SHAP interpretability method is:
[0031] ;
[0032] in, For the set of all features, For features not included Feature subset, For the model in feature subset The expected output.
[0033] Preferably, the method further includes the step of:
[0034] S7. Construct a control module that is based on state machine and Bayesian optimization algorithm to dynamically schedule the data acquisition, preprocessing, feature extraction, model training and analysis process, and to automate the hyperparameters of the hybrid machine learning model.
[0035] The present invention also provides an apparatus for implementing the aforementioned method for analyzing medical experimental test results, comprising:
[0036] The data acquisition and preprocessing module is used to acquire data from multiple sources and perform cleaning, normalization and interpolation.
[0037] The feature extraction and dimensionality reduction module is used to extract and filter key feature vectors from preprocessed data;
[0038] The hybrid model building and training module is used to build and train a machine learning model that combines a weighted fusion of support vector machines and random forests.
[0039] The intelligent analysis and decision-making module is used to perform classification prediction, confidence assessment, and interpretability analysis on new samples using a trained model;
[0040] The Results Visualization and Reporting module is used to generate visual charts and analysis reports;
[0041] The central control and scheduling module is used to coordinate and control the execution order and parameter configuration of each module.
[0042] The present invention achieves the following beneficial technical effects compared to the prior art:
[0043] This invention provides a method and apparatus for analyzing medical experimental test results. Through a unified data preprocessing and adaptive feature dimensionality reduction pipeline, it can flexibly adapt to multimodal experimental data such as blood, genes, and imaging, improving the versatility and efficiency of the analysis framework. It innovatively employs a weighted probability fusion strategy combined with the boundary clarity of support vector machines and the robustness of random forests, enabling the hybrid model to exhibit superior and stable classification and prediction performance compared to a single model when facing high-dimensional, small-sample medical data. By introducing interpretability analysis based on SHAP values, it can quantify and visualize the contribution of each experimental test indicator to the final conclusion, transforming the model decision-making process from a "black box" to a "white box," greatly enhancing the scientific credibility of the analysis results and their guiding value for subsequent research. This provides medical researchers with a powerful, easy-to-use, and insightful integrated intelligent analysis tool. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 The flowchart illustrates the method for analyzing medical experimental test results provided by this invention. Detailed Implementation
[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] The purpose of this invention is to provide a method and apparatus for analyzing medical experimental test results, so as to solve the problems existing in the prior art.
[0048] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0049] Example 1:
[0050] The following is combined Figure 1 This invention provides a method and apparatus for analyzing medical experimental test results, using the common medical research scenario of "liver cirrhosis risk classification based on multi-index blood test data" as a specific application scenario.
[0051] Step S1: Data Acquisition and Preprocessing
[0052] First, the data acquisition and preprocessing module obtains raw medical experimental data from multiple sources. In this scenario, the data sources include blood biochemistry analyzers in the hospital laboratory information system (providing numerical indicators such as ALT, AST, GGT, total bilirubin, albumin, and platelet count), FibroScan® devices in the radiology information system (providing liver stiffness measurements), and structured fields in electronic medical records (such as patient age and gender). These data constitute a multi-source, heterogeneous raw dataset.
[0053] Subsequently, the module performs automated preprocessing on the original dataset. Data cleaning follows the 3σ principle, automatically identifying and removing extreme outliers in each indicator that deviate from the mean by more than three standard deviations. Data normalization uses the Min-Max scaling method, linearly transforming the value of each indicator to the [0,1] interval to eliminate the influence of units. For missing values in the data, the module uses K-nearest neighbor interpolation to impute them.
[0054] Specifically, for a sample that has a missing value in a certain feature, the system searches for the most similar sample in the feature space. One complete sample (default) =5), and use this The average value of the nearest neighbor samples on this feature is used as the imputation value, calculated using the following formula:
[0055] ;
[0056] in, The preset number of nearest neighbor samples, The missing sample in the feature space The corresponding feature values of the nearest neighbor samples.
[0057] Step S2: Feature Extraction and Dimensionality Reduction
[0058] The feature extraction and dimensionality reduction module receives the preprocessed data. First, the module automatically calculates a series of advanced statistical features. For example, in addition to directly using the raw values of various biochemical indicators, it also calculates derived ratios such as the AST / ALT ratio and albumin-bilirubin score, which have proven to have significant clinical value in liver disease research. Furthermore, the module can extract temporal features or simple interaction features based on the data type, thereby constructing a high-dimensional feature space.
[0059] To avoid the "curse of dimensionality" and remove redundant information, the module uses principal component analysis for dimensionality reduction. This process first calculates the high-dimensional feature matrix. Find the covariance matrix and solve for its eigenvalues and eigenvectors. Then, select the first eigenvalues in descending order. The eigenvectors form the projection matrix. The new data matrix after dimensionality reduction Through formula Calculated. In this embodiment, The selection principle is to ensure that the cumulative variance contribution rate of the selected principal components reaches more than 95%, thereby significantly reducing the data dimensionality while preserving the original information to the maximum extent, and obtaining the final feature vector set.
[0060] Step S3: Hybrid Machine Learning Model Construction and Training
[0061] The hybrid model construction and training module builds a classification model based on a set of historical feature vectors with known labels (positive / negative for cirrhosis). One of the core innovations of this invention is the construction of a hybrid model formed by the fusion of support vector machines and random forests through weighted probabilities.
[0062] For the SVM sub-model, the radial basis function is chosen as the kernel function to handle the nonlinear relationships between features. Its decision function is:
[0063] ;
[0064] in, For Lagrange multipliers, For sample labels, For radial basis kernel functions, , For kernel parameters, This is the bias term. After model training, the decision output is converted into predicted probabilities using Platt scaling.
[0065] For the Random Forest (RF) submodel, the number of decision trees is set to t=100. Each tree is trained using Bootstrap sampling and random feature subset selection to enhance model diversity. The Random Forest outputs the final classification prediction by integrating the voting results of all trees, with the predicted probability calculated from the proportion of trees that voted for the positive class.
[0066] The key fusion steps are achieved through weighted averaging:
[0067] ;
[0068] in, The normalized predicted probability output by the support vector machine model. This represents the normalized predicted probability output by the random forest model. and The fusion weights are determined through cross-validation grid search and satisfy the following conditions: + =1, and It is not fixed, but rather combines grid search with... Cross-validation is optimized on the validation set with the goal of maximizing the AUC of the fusion model. This fusion mechanism effectively combines the advantages of SVM in clearly defining decision boundaries with the robustness of random forest in handling complex interactions and avoiding overfitting.
[0069] Step S4: Intelligent Analysis and Decision Making
[0070] The intelligent analysis and decision-making module is responsible for diagnosing new samples. After a new patient's test data is transformed into a feature vector through steps S1 and S2, the module inputs it into a trained hybrid model to calculate the final predicted probability of the patient having cirrhosis.
[0071] The module outputs classification results based on a preset decision threshold θ. The threshold θ is determined through ROC curve analysis of the training set, typically selecting the probability value corresponding to the point that maximizes the Youden exponent. The decision rule is: if... If the value is ≥θ, it is considered a high risk of cirrhosis (positive class); otherwise, it is considered a low risk (negative class).
[0072] Step S5: Confidence assessment and result interpretability analysis
[0073] To assess the reliability of a single prediction, the module calculates a confidence level based on the prediction probability:
[0074] This value ranges from 0 to 1. The closer it is to 1, the greater the model's confidence in the prediction; the closer it is to 0, the less certain the model is. High-confidence results can be directly used for clinical reference, while low-confidence results suggest that doctors need to combine them with other examinations for a comprehensive judgment.
[0075] More importantly, the module employs the SHAP (Shapley Additive exPlanations) framework to perform interpretability analysis on the model's decision-making process. For each prediction, the module calculates the SHAP value for each input feature. The calculation formula is as follows:
[0076] ;
[0077] in, For the set of all features, For features not included Feature subset, For the model in feature subset The expected output value. The contribution of feature ii to the specific prediction result relative to the baseline is quantified. A positive value indicates that the feature pushes the prediction towards the positive class, while a negative value indicates that it pushes the prediction towards the negative class. For example, the analysis report may show that for a patient's positive prediction, high liver stiffness and low platelet count are the main positive driving factors, while normal albumin levels have a certain offsetting effect. This provides physicians with intuitive and quantitative decision-making basis.
[0078] Step S6: Results Visualization and Report Generation
[0079] The Results Visualization and Reporting module integrates all the above information into a comprehensive report. The report displays ROC curves, feature importance ranking plots, and SHAP force waterfall plots for individual predictions in graphical form. Simultaneously, it generates a structured text report, clearly listing the prediction results, prediction probabilities, confidence levels, and key contributing features and their explanations. This report can be explored by researchers through an interactive interface or exported as a standard document.
[0080] Step S7: Central Control and Optimization
[0081] The entire system operates under the coordination of a central control and scheduling module. This module manages the data flow based on a finite state machine, executing sequentially from S1 to S6 and monitoring the status of each module. Its core optimization functions are reflected in two aspects: first, task scheduling, prioritizing the processing of analysis requests for urgent or high-priority samples; and second, continuous model optimization.
[0082] The system establishes a feedback loop: when new, gold-standard validated experimental results are inconsistent with the analytical model's predictions, this "new knowledge" is automatically converted into a standard format and added to the historical training set. The central control module then periodically or triggers the model retraining process when performance degrades. During retraining, the module uses a Bayesian optimization algorithm to search for the optimal combination of hyperparameters such as SVM and random forest, optimizing the objective function as the AUC on the independent validation set. In this way, the system achieves a closed loop from experimental validation to model optimization, enabling the analytical capabilities to continuously evolve with data accumulation, constantly improving its accuracy and adaptability in practical medical research applications.
[0083] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0084] It should be noted that the components mentioned in the above embodiments are all general standard parts or components known to those skilled in the art. Their structures and principles can be learned by those skilled in the art through technical manuals or conventional experimental methods.
[0085] This invention has illustrated its principles and implementation methods using specific examples. The descriptions of these embodiments are merely illustrative of the method and its core ideas; furthermore, those skilled in the art will recognize that modifications may be made to the specific implementation methods and application scope based on the principles of this invention. Therefore, the content of this specification should not be construed as limiting the invention.
Claims
1. A method for analyzing medical laboratory test results, characterized in that, Includes the following steps: S1. Collect raw test data from multi-source medical experimental equipment, and perform data cleaning, normalization and missing value imputation on the raw test data to obtain preprocessed data; S2. Extract multidimensional features from the preprocessed data, and perform dimensionality reduction processing on the extracted features to obtain a feature vector set; S3. Based on the feature vector set of historical data, construct and train a hybrid machine learning model, which is composed of a support vector machine model and a random forest model through weighted probability fusion. S4. Input the feature vector of the sample to be analyzed into the trained hybrid machine learning model to obtain the predicted probability, and output the classification result according to the preset decision threshold. S5. Based on the confidence level of the predicted probability calculation results, the contribution of each feature to the classification result is analyzed using the SHAP interpretability method. S6. Visualize and generate a report on the classification results, confidence level, and feature contribution.
2. The method for analyzing medical experimental test results according to claim 1, characterized in that, In step S1, the missing value imputation process uses the K-nearest neighbor interpolation method, and the formula for calculating the imputed value is: ; in, The preset number of nearest neighbor samples, The missing sample in the feature space The corresponding feature values of the nearest neighbor samples.
3. The method for analyzing medical experimental test results according to claim 1, characterized in that, In step S2, the dimensionality reduction process employs principal component analysis, and the formula for calculating the dimensionality-reduced data matrix is as follows: ; in, This is the preprocessed data matrix. From The first eigenvectors selected from the covariance matrix The projection matrix is formed by the eigenvectors corresponding to the largest eigenvalues, to ensure that the retained cumulative variance contribution rate is not lower than a preset threshold.
4. The method for analyzing medical experimental test results according to claim 1, characterized in that, In step S3, the support vector machine model uses a radial basis function as its kernel function, and its decision function is: ; in, For Lagrange multipliers, For sample labels, For radial basis kernel functions, , For kernel parameters, This is a bias term.
5. The method for analyzing medical experimental test results according to claim 1, characterized in that, In step S3, the specific method of weighted probability fusion is as follows: ; in, The normalized predicted probability output by the support vector machine model. This represents the normalized predicted probability output by the random forest model. and The fusion weights are determined through cross-validation grid search and satisfy the following conditions: + =1.
6. The method for analyzing medical experimental test results according to claim 1, characterized in that, In step S4, the preset decision threshold is determined through receiver operation characteristic curve analysis, and the classification rule is: if If the value is greater than or equal to θ, it is classified as a positive class; otherwise, it is classified as a negative class, where θ is a preset decision threshold.
7. The method for analyzing medical experimental test results according to claim 1, characterized in that, In step S5, the confidence level is calculated using the following formula: ; The confidence level ranges from [0, 1].
8. The method for analyzing medical experimental test results according to claim 1, characterized in that, In step S5, the formula for analyzing the contribution of each feature to the classification result using the SHAP interpretability method is as follows: ; in, For the set of all features, For features not included Feature subset, For the model in feature subset The expected output.
9. The method for analyzing medical experimental test results according to claim 1, characterized in that, It also includes the following steps: S7. Construct a control module that is based on state machine and Bayesian optimization algorithm to dynamically schedule the data acquisition, preprocessing, feature extraction, model training and analysis process, and to automate the hyperparameters of the hybrid machine learning model.
10. An apparatus for implementing the analytical method for medical experimental test results according to any one of claims 1-9, characterized in that, include: The data acquisition and preprocessing module is used to acquire data from multiple sources and perform cleaning, normalization and interpolation. The feature extraction and dimensionality reduction module is used to extract and filter key feature vectors from preprocessed data; The hybrid model building and training module is used to build and train a machine learning model that combines a weighted fusion of support vector machines and random forests. The intelligent analysis and decision-making module is used to perform classification prediction, confidence assessment, and interpretability analysis on new samples using a trained model; The Results Visualization and Reporting module is used to generate visual charts and analysis reports; The central control and scheduling module is used to coordinate and control the execution order and parameter configuration of each module.