Method for constructing acute pancreatitis severity prediction model based on liquid neural network
Data preprocessing and feature selection are solved through the method based on liquid neural network, and the accuracy and generalization ability of the prediction model of acute pancreatitis severity in the case of small sample size and data imbalance, achieving a high accuracy and interpretability prediction model.
Patent Information
- Application Number
- CN202411949427.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-16
AI Technical Summary
The existing prediction model for acute pancreatitis severity is small and data imbalanced. The prediction accuracy decreases and the generalization ability is poor, making it difficult to adapt to new data predictions.
Data preprocessing and feature selection are used based on liquid neural networks, machine learning is performed through liquid neural networks, the best prediction model is obtained, and imaged interpretation results are generated through SHAP visual analysis.
With small sample size and unbalanced data, high-accurate prediction of acute pancreatitis severity is achieved, improving the generalization ability and interpretability of the model.
Smart Images

Figure CN120015340A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data analysis, and in particular to a method for constructing a prediction model for the severity of acute pancreatitis based on a liquid neural network. Background Art
[0002] Acute pancreatitis (AP) is a common digestive tract disease with a worldwide incidence of approximately 4.9 to 73.4 / 100,000. As the disease progresses, its severity and prognosis vary. The AP severity prediction model based on traditional machine learning has several disadvantages: 1) The accuracy of the prediction model is too dependent on a large sample size of data. If the sample size is small and the categories are unbalanced, the prediction accuracy of the model will decrease. 2) The accuracy of the prediction model is too dependent on the quality of the sample data and the adjusted model parameters. If the model parameters are not well trained, overfitting is likely to occur, resulting in a decrease in prediction accuracy, poor generalization ability, and inability to adapt to new data predictions.
[0003] In addition, existing AP severity prediction models rarely use deep learning methods, because deep learning must rely on large sample sizes of data for training. As the number of layers in the learning model increases, the hyperparameters set in the model will also increase dramatically, which will increase the complexity of the algorithm and the difficulty of implementation. In the case of small sample data, training complex neural networks may lead to overfitting, that is, the model will remember the training samples instead of learning the underlying patterns.
[0004] Constructing a prediction model for the severity of acute pancreatitis that is relatively accurate even with a small sample size and unbalanced data will be of great help to medical staff in their diagnosis work. Summary of the invention
[0005] The purpose of the present invention is to provide a method for constructing a prediction model for the severity of acute pancreatitis based on a liquid neural network, and to construct a prediction model with high accuracy under the conditions of small sample size and data imbalance.
[0006] To achieve the above object, the present invention provides a method for constructing a prediction model for the severity of acute pancreatitis based on a liquid neural network, comprising the following steps:
[0007] Step 1: Collect patient data based on inclusion and exclusion criteria;
[0008] Step 2: Data preprocessing and feature selection;
[0009] Step 3: Perform machine learning with liquid neural network as the core to obtain the best prediction model;
[0010] Step 4: Obtain evaluation indicators through prediction performance comparison;
[0011] Step 5: Perform SHAP visualization analysis to generate graphical explanation results.
[0012] Optionally, the inclusion criteria in step 1 include the following:
[0013] Meet the diagnostic criteria for acute pancreatitis;
[0014] Aged 18 or above;
[0015] Admit to hospital and complete the indicators of required examinations;
[0016] Exclusion criteria were the following:
[0017] Under 18 years old;
[0018] Women who are breastfeeding or pregnant;
[0019] Patients with various malignant tumors;
[0020] Patients with coagulation system diseases;
[0021] Patients with chronic pancreatitis;
[0022] Patients with a large number of missing test results after admission.
[0023] Optionally, in step 1, the duration of organ failure in patients for ≥48 hours during the course of the disease is used as the predictive endpoint of severe acute pancreatitis. The corresponding manifestations and parameters are as follows:
[0024] Respiratory failure: PaO 2 / Fi O 2 ≤300;
[0025] Circulatory failure: systolic blood pressure <90 mm Hg or mean arterial pressure <70 mm Hg, and vasoactive drugs are required;
[0026] Renal failure: serum creatinine ≥170umol / L or >3 times the baseline or urine volume <0.5ml / kg / h for more than 24 hours or anuria for 12 hours.
[0027] Optionally, the execution process of step 2 includes the following steps:
[0028] Use One-Hot encoding to perform feature vectorization;
[0029] Use K nearest neighbor algorithm to handle missing data;
[0030] Select the maximum and minimum values for normalization;
[0031] Use SMOTE technology to deal with category imbalance problems;
[0032] A mixture of multiple feature selection methods is used for feature selection.
[0033] Optionally, the machine learning models used in step 3 include Logistic regression, decision tree, random forest, XGBoost algorithm, LSTM and liquid neural network, among which liquid neural network is the core algorithm model, and other models are used for comparison and verification;
[0034] Specifically, a five-fold cross-validation was used to train the model and obtain the optimal hyperparameters of the model. By comparing the AUC values under the ROC curve, the optimal feature combination under each machine learning model was obtained to obtain the best prediction model.
[0035] Optionally, in step 4, the following method is used to evaluate and compare the model prediction performance;
[0036] According to the results of the confusion matrix, the area under the receiver operating curve AUC, accuracy, precision, recall, F1 score, and specificity were used to evaluate the performance of the model;
[0037] Comparison of prediction performance of models with and without feature index selection;
[0038] Comparison of prediction performance of models using SMOTE technology and without SMOTE technology;
[0039] By continuously adjusting the ratio of training set and test set, AUC is used to reflect the generalization ability of prediction models of different methods.
[0040] Optionally, SHAP visualization analysis is based on Shapley value theory and provides global and local interpretability for the model by decomposing the prediction results into the influence of each feature.
[0041] The present invention provides a method for constructing a prediction model for the severity of acute pancreatitis based on a liquid neural network. First, the patient data needs to be extracted and preprocessed. The preprocessing includes quantization of the features of the medical data, data missing processing, normalization processing, and processing of the class imbalance problem. Then, the AP patients are divided into a severe AP group and a mild AP group, and the feature indicators with differences between the two groups are screened by non-parametric test analysis to carry out the next step of machine learning modeling. Among the selected differential feature indicators, correlation analysis is first used to obtain the degree of correlation of each feature indicator. The features are sorted in descending order according to the degree of correlation, and the AUC value in each case is calculated in the form of gradually increasing features in this order, so that the feature indicators that cause the AUC value to decrease can be directly visualized. The most representative feature indicator quantity can be screened out by deleting the feature indicators that cause the AUC value to decrease, so as to improve the correlation of the prediction and reduce redundancy. In order to prevent overfitting, a five-fold cross-validation is used to train the model, and the best feature combination under each machine learning model (liquid neural network, decision tree, random forest, Logistic regression, XGBoost algorithm) is obtained by comparing the AUC values under the ROC curve. Then, the best prediction models obtained through training were validated against the validation data, and the effectiveness and superiority of the liquid neural network model were demonstrated by comparing different evaluation indicators and the number of training sets. Finally, SHAP (a machine learning model interpretation tool based on Shapley values) was used to analyze and visualize the influence weights of different features in the liquid neural network model, providing intuitive prediction references for users such as doctors. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 The present invention is a schematic flow chart of the steps of a method for constructing a prediction model for the severity of acute pancreatitis based on a liquid neural network.
[0044] Figure 2 It is a schematic diagram of the principle framework of the liquid neural network of the present invention.
[0045] Figure 3 It is a flowchart diagram of the overall logical relationship between the steps of the present invention.
[0046] Figure 4 It is a schematic diagram of the relationship between the AUC value of the Logistic regression algorithm and the number of characteristic index combinations in a specific embodiment of the present invention.
[0047] Figure 5 It is a schematic diagram of the relationship between the AUC value of the Logistic regression algorithm and the number of characteristic index combinations in a specific embodiment of the present invention.
[0048] Figure 6 It is a schematic diagram of the relationship between the AUC value of the decision tree algorithm and the number of feature index combinations in a specific embodiment of the present invention.
[0049] Figure 7 It is a schematic diagram of the relationship between the AUC value of the random forest algorithm and the number of feature index combinations in a specific embodiment of the present invention.
[0050] Figure 8 It is a schematic diagram of the relationship between the AUC value of the XGBoost algorithm and the number of feature index combinations in a specific embodiment of the present invention.
[0051] Fig. 9 It is a schematic diagram of the relationship between the AUC value of the liquid neural network algorithm and the number of characteristic index combinations according to a specific embodiment of the present invention.
[0052] Fig.10 4 is a schematic diagram of ROC curve comparison of five algorithm models in a specific embodiment of the present invention.
[0053] Fig.11 It is a comparison chart of AUC values of different algorithm models in a specific embodiment of the present invention after feature selection and without feature selection.
[0054] Fig.12 It is a comparison chart of AUC values of different algorithm models in a specific embodiment of the present invention when the SMOTE oversampling technology is adopted and when the SMOTE oversampling technology is not adopted.
[0055] Fig.13 It is a SHAP analysis influence diagram of the acute pancreatitis severity prediction model based on liquid neural network according to a specific embodiment of the present invention. DETAILED DESCRIPTION
[0056] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0057] See also Figure 1 The present invention provides a method for constructing a prediction model for the severity of acute pancreatitis based on a liquid neural network, comprising the following steps:
[0058] S1: Collect patient data based on inclusion and exclusion criteria;
[0059] S2: data preprocessing and feature selection;
[0060] S3: Perform machine learning with liquid neural network as the core to obtain the best prediction model;
[0061] S4: Obtain evaluation indicators through prediction performance comparison;
[0062] S5: Perform SHAP visualization analysis to generate graphical interpretation results.
[0063] The following is further described in conjunction with specific embodiments and execution steps:
[0064] Step S1 is the process of collecting patient data.
[0065] For the collection of patient data, inclusion criteria and exclusion criteria should be formulated. The inclusion criteria proposed by the present invention are:
[0066] 1. Meet the diagnostic criteria for acute pancreatitis; 2. Age ≥ 18 years old; 3. Be admitted to the hospital and complete the required examination indicators;
[0067] The proposed exclusion criteria are:
[0068] 1. Age < 18 years old; 2. Women who are breastfeeding or pregnant; 2. Patients with various malignant tumors; 3. Patients with coagulation system diseases; 4. Patients with chronic pancreatitis; 5. Patients with a large number of missing test results after admission.
[0069] The definition of severe acute pancreatitis is based on the definition of severe acute pancreatitis in the 2012 Atlanta classification standard, and combined with the actual data collection situation, the patient's organ failure time ≥ 48 hours during the course of the disease is used as the prediction endpoint of severe acute pancreatitis, specifically:
[0070] ① Respiratory failure: Pa O 2 / Fi O 2 ≤300.
[0071] ②Circulatory failure: (systolic blood pressure <90 mm Hg or mean arterial pressure <70 mm Hg) and the need for vasoactive drugs.
[0072] ③ Renal failure: serum creatinine ≥170umol / L or >3 times the baseline or urine volume <0.5ml / kg / h for more than 24 hours or anuria for 12 hours.
[0073] Step S2 is the process of data preprocessing and feature selection, which includes the following steps:
[0074] ① Feature vectorization processing
[0075] Some features in medical data need to be vectorized, mainly using One-Hot encoding. For example, in the severity status feature of acute pancreatitis, "0" represents mild symptoms and "1" represents severe symptoms. In the gender feature, "0" represents male and "1" represents female. Through this processing step, the patient's features are reasonably represented in vector form.
[0076] ②Data missing processing
[0077] Feature variables with more than 40% missing data are deleted. Feature indicators with less than 40% missing data are supplemented. The problem of completely random data loss is usually solved using statistical knowledge. When using statistical knowledge to fill missing values, the most commonly used filling method is the variance and mean method, which is suitable for missing variables with small variance. However, for patients with acute pancreatitis with obvious individual differences, the mean and variance interpolation method is no longer suitable for solving the problem of missing data. The present invention uses the K nearest neighbor algorithm for completion and filling. This method is based on the assumption that "similar inputs have similar outputs". By calculating the distance between a given data point and other points in the training data set, the K closest neighbors are found, and then predictions are made based on the categories or values of these neighbors.
[0078] ③ Normalization
[0079] The present invention uses the maximum and minimum normalization method, that is, using the maximum and minimum values of the feature variables to convert the original data into data in the range of [0,1], thereby eliminating the dimension effect and making different features comparable. The maximum and minimum normalization method is specifically shown in the following formula:
[0080]
[0081] Among them, x′ is the normalized eigenvalue, x is the original eigenvalue, min is the minimum value of the feature, and max is the maximum value of the feature. When the maximum value is substituted into the above formula, 1 is obtained; when the minimum value is substituted into the above formula, 0 is obtained. Therefore, after the feature normalization process, the range of the patient data feature values is between 0 and 1.
[0082] ④ Dealing with the problem of imbalanced categories
[0083] Class imbalance is a common problem in medical data. It means that in a given data set, some categories have more data, some categories have less data, and there is a large gap between the categories with a larger proportion and the categories with a smaller proportion. This problem will cause the model to pay different attention to different categories, affecting the final prediction effect and causing deviation. Therefore, the problem of data class imbalance needs to be dealt with before building a model.
[0084] To address the class imbalance problem, this paper uses synthetic minority oversampling technology (SMOTE), which can increase the sample size of source data through data augmentation, so that the model can obtain better generalization ability. SMOTE is a complex oversampling method that generates synthetic instances from minority classes. Instead of just copying instances, it selects two or more similar instances (using a distance metric such as Euclidean distance) and perturbs one instance along the line segment connecting the cases.
[0085] ⑤Feature selection
[0086] In order to select appropriate features and improve the prediction effect of the model, the present invention adopts a combination of multiple feature selection methods. First, AP patients are divided into severe AP group and mild AP group, and the feature indicators with differences between the two groups are screened by non-parametric test analysis for the next step of machine learning modeling. Among the selected differential feature indicators, correlation analysis is first used to obtain the degree of correlation of each feature indicator. The features are sorted in descending order according to the degree of correlation, and the AUC value in each case is calculated in this order by gradually increasing the features. In this way, the feature indicators that cause the AUC value to decrease can be directly visualized. By deleting the feature indicators that cause the AUC value to decrease, the most representative feature indicator quantity can be screened out to improve the correlation of the prediction and reduce redundancy. In the feature increasing selection, the AUC value under the ROC curve is used as the evaluation indicator.
[0087] Step S3 is the process of establishing and training the machine learning model.
[0088] The following is an explanation of the principle and implementation process. The machine learning models that need to be implemented in the present invention include Logistic regression, decision tree, random forest, XGBoost algorithm, LSTM and liquid neural network, among which liquid neural network is the core algorithm model of the present invention, and other models are used for comparison and verification. The principles of each model are:
[0089] ①Logistic regression
[0090] Logistic regression is a linear classification model based on probability. It combines the features of the sample linearly, and then maps the result of the linear combination to a probability value between 0 and 1 through a sigmoid function, that is, converts the linear prediction result into a probability value that the sample belongs to a certain category. The advantage is that the model is simple, easy to implement and explain, and is suitable for processing linearly separable classification problems. However, its disadvantage is that it performs poorly for nonlinear problems and is easily affected by abnormal data and outliers. The present invention adopts the Logistic Regression machine learning method for classification, and the model parameters are set as follows: the regularization factor C is 1, the number of iterations (max iter) is adjusted to 100, the regularization type (penalty) is L2, and the convergence measure (tol) is 0.0001.
[0091] ②Decision Tree
[0092] The decision tree algorithm is a machine learning technique that builds a tree model by recursively selecting the optimal features and split points for classification and regression tasks. It starts from the root node and gradually splits downward until the preset stopping conditions are met, such as reaching the maximum tree depth, the number of node samples, or the node purity is high enough. At each node, the algorithm evaluates all features and split points, selects the features and values that can best distinguish the data, and then splits the data set into subsets based on the selected features and split points, and repeats this process on each subset. Decision trees are intuitive, easy to interpret, and can handle nonlinear relationships and high-dimensional data, but they are prone to overfitting, sensitive to noise, and may ignore small patterns.
[0093] ③ Random Forest
[0094] Random forest uses repeated sampling and feature random sampling techniques to build multiple decision trees and integrate their prediction results to improve the accuracy of the model. Repeated sampling technology can build multiple models on a limited data set to avoid overfitting problems; while feature random sampling can reduce the model's dependence on certain features and improve the generalization ability of the model. The advantages are high accuracy and interpretability, ability to handle high-dimensional data and nonlinear relationships, and a certain tolerance for abnormal data and missing values. However, its training time is long, and the model complexity is high, requiring large computing resources when processing large-scale data sets. The present invention uses a random forest classifier machine learning method for classification, and the model parameters are set as follows: the metric (criterion) is gini, the minimum bifurcation purity gain (learning rate) is adjusted to 0.0, and the number of trees (n_estimators) is 20.
[0095] ④XGBoost algorithm
[0096] XGBoost uses gradient boosting decision as the basic model, and improves the accuracy of the model by integrating multiple weak learners. Its training process gradually adds new weak learners and updates the weights and bias values of the model in an iterative manner to minimize the loss function and improve the predictive ability of the model. The advantage is that it has high accuracy and generalization ability, and performs well when processing large-scale data and high-dimensional data. However, the training process of XGBoost is more complicated, requires more time and computing resources, and is prone to overfitting problems when processing unbalanced data sets and abnormal data. The present invention adopts the XGB classifier machine learning method for classification, and the model parameters are set: the optimization objective function (objective) is binary:logistic, the learning rate (learning rate) is adjusted to 0.300000012, the maximum tree depth (max depth) is 6, the minimum bifurcation weight and (min child weight) is 1, and the L2 regularization coefficient is 1.
[0097] ⑤Liquid Neural Network
[0098] Liquid Neural Networks (LNN) is an advanced neural network whose design concept is borrowed from the working mechanism of the human brain. LNN can process data sequentially and can adapt to changes in data in real time. Liquid Neural Network is a time-continuous recurrent neural network (RNN). LNN not only processes input information sequentially, but also retains the memory of past inputs, adjusts its behavior according to new inputs, and has the ability to process variable-length inputs, which significantly improves its understanding of tasks. The adaptability of LNN gives it the ability to continuously learn and adapt to environmental changes. Especially in processing time series data, LNN has shown higher efficiency and stronger performance than traditional neural networks. Its principle framework is as follows Figure 2 As shown:
[0099] The structure mainly consists of three layers: input layer, liquid layer and output layer. The input layer is the input layer of the network. All the input data we want to train the model will be provided to this layer. This layer feeds the input data to the liquid layer. The liquid layer contains a large recursive network composed of neurons. They are initialized with synaptic weights. The input data is converted into a rich nonlinear space. The output layer is composed of output neurons. It receives information from the liquid layer. The most critical one is the liquid layer. The liquid layer is different from the hidden layer of the traditional neural network. It is regarded as an ordinary differential equation (ODE) and a more complex time step to approximate the expression of continuous dynamics. Therefore, the state quantity of the intermediate liquid layer is obtained by solving the ODE. For example, Figure 2Given a one-dimensional time series input signal I(t) with m features and a time step length of t m×1 , the hidden state vector X with D hidden units (D×1) (t), and a time-invariant parameter vector The liquid layer state of the liquid neural network can be transformed into a solution to the following differential equation:
[0100]
[0101] Where A is the bias vector, f is a nonlinear fluid function with parameter θ, and the parameters θ and A are system parameters, indicating that the coefficients of X(t) can vary as a function of state and input.
[0102] By comparing the above five methods, the data set is randomly divided into 70% training set and 30% test set to prevent data information leakage. The training set is used to build the model and adjust the hyperparameters, and the test set is used to evaluate the generalization performance of the model. A five-fold cross-validation is used to train the model to obtain the optimal hyperparameters of the model. By comparing the AUC values under the ROC curve, the best feature combination under each machine learning model (liquid neural network, LSTM algorithm, random forest, decision tree, Logic regression, XGBoost algorithm) is obtained, and the best prediction model is obtained. Specifically, the correlation analysis of the initial screening feature indicators is first performed, and the correlation is sorted from large to small, and then the number of feature quantities is increased in sequence. The AUC value is used to determine which features will cause the AUC value to decrease, so as to eliminate these feature quantities and obtain the best feature combination. The construction of the four models uses Python 3.8.5, scikit-learn package 0.23.2 and PyTorch 2.4.1 deep learning package.
[0103] In step S4, the performance evaluation index is obtained by comparison, including the following four comparison methods:
[0104] The first comparison: Based on the results of the confusion matrix, the area under the receiver operating curve (AUC), accuracy, precision, recall, F1 score, and specificity were used to evaluate the performance of the model.
[0105] The second comparison: Comparison of model prediction performance with and without feature index selection
[0106] The third comparison: Comparison of prediction performance of models using SMOTE technology and without SMOTE technology
[0107] The fourth comparison is the comparison of generalization performance: by continuously adjusting the ratio of training set and test set, the AUC is used to reflect the generalization ability of the prediction models of different methods.
[0108] Step S5 performs an explanatory analysis on the prediction model.
[0109] SHAP (SHapleyAdditive exPlanations) is a method for explaining prediction results. It is based on the Shapley value theory and provides global and local interpretability for the model by decomposing the prediction results into the influence of each feature. The core idea of SHAP is to distribute the contribution of the feature value to different features, calculate the Shapley value of each feature, and multiply it with the feature value to obtain the contribution of the feature to the prediction result. SHAP can be used for machine learning models, including classification and regression models, and can generate graphical and quantitative explanation results to help users explain the decision-making process of the model. The present invention uses the SHAP tool to perform explanatory analysis on the prediction model constructed based on the liquid neural network and generate graphical explanation results.
[0110] The overall logical relationship flow chart between the corresponding steps is as follows Figure 3 shown.
[0111] Furthermore, in order to illustrate the advantages of the prediction model architecture method of the present invention, the present invention is also described through specific embodiments:
[0112] According to the inclusion and exclusion criteria, 722 patients with acute pancreatitis from the Second Affiliated Hospital of Guilin Medical College from January 2020 to June 2024 were selected, and the routine examination indicators of the patients within 24 hours of admission were sorted out. They were divided into MAP group and SAP group, with 402 males and 183 females in the MAP group; 83 males and 54 females in the SAP group. There was no statistical difference between the two groups. After the characteristic index quantity was characterized and the missing value was processed, the P value of each characteristic index parameter was obtained by non-parametric test as shown in Table 1.
[0113] Table 1. P values of each characteristic index
[0114]
[0115]
[0116]
[0117] The characteristic index quantities were initially screened based on the indicators with a P value less than 0.05, and 46 initial screening characteristic index quantities were obtained. These 46 initial screening characteristic index quantities were normalized, and then the correlation analysis of these 46 initial screening characteristic index quantities was performed through the Python statistical database, and the correlation analysis heat map was obtained as shown below: Figure 4 As shown:
[0118] According to the correlation degree of the heat map, the characteristic indicators are arranged in descending order, and the obtained characteristic indicators are: "HBDH", "LDH", "CRP", "NEU#", "WBC", "INR", "LYM%", "NEU%", "CREA", "CA", "UREA", "FIB", "AMY", "EOS%", "CK-MB", "EOS#", "HGB", "MON#", "HDL-C", "AST / ALT", "ALB", "A / G", "HCT", "BAS%", "PCT", "TG", "PT%", "APTT", "RDW-SD", "GLOB", "RBC", "CHE", "LYM#", "LDL-C", "RDW-CV", "NA", "MON%", "MCH", "TBIL", "PT", "PA", "DBIL", "AST", "TP", "CO2-L", "TBA". Then, the AUC value of the model algorithm corresponding to each combination of increasing feature index is calculated by increasing the feature index, and the relationship between the AUC value of each model algorithm and the number of feature index combinations is obtained as follows: Figures 5 to 9 shown.
[0119] According to the relationship diagram between AUC value and the number of feature index combinations, the feature indexes that cause the AUC value to decrease are eliminated one by one, and the optimal feature index combination corresponding to each model algorithm can be obtained.
[0120] Right now
[0121] Logistic regression model: "HBDH", "LDH", "CRP", "NEU#", "INR", "LYM%", "NEU%", "CA", "UREA", "AMY", "EOS%", "EOS#", "HGB", "AL B","BAS%","PCT","TG","APTT","RDW-SD","GLOB","CHE","LYM#","NA","MON%","MCH","TBIL","TP","CO2-L"
[0122] Decision tree model: "HBDH", "LDH", "NEU#", "WBC", "CA", "FIB", "AMY", "CK-MB", "MON#", "HDL-C", "A / G", "HCT", "BAS%", "TG", "RDW-SD", "CHE", "LDL-C", "MCH", "DBIL", "AST", "TP", "CO2-L"
[0123] Random forest model: "HBDH", "LDH", "CRP", "NEU#", "WBC", "INR", "NEU%", "CREA", "CA", "AMY", "EOS%", "CK-MB", "HGB", "HDL-C", "A / G", "BAS%", "TG", "APTT", "RDW-SD", "GLOB", "CHE", "RDW-CV", "MON%", "TBIL", "PA", "DBIL", "TP", "CO2-L", "TBA"
[0124] XGBoost algorithm model: "HBDH", "LDH", "CRP", "NEU#", "WBC", "INR", "NEU%", "CREA", "CA", "UREA", "AMY", "EOS%", "CK-MB", "EOS#", "HGB", "HDL-C", " ALB","A / G","BAS%","PCT","PT%","APTT","RDW-SD","GLOB","CHE","LYM#","RDW-CV","MCH","TBIL","PTT","DBIL","AST","TP","CO2-L"
[0125] LNN algorithm model (present invention): "HBDH", "CRP", "NEU#", "WBC", "INR", "CREA", "CA", "UREA", "FIB", "AMY", "EOS%", "HGB", "HDL-C", "A / G", "BAS%", "TG", "APTT", "RDW-SD", "RBC", "CHE", "LDL-C", "RDW-CV", "MON%", "MCH", "PT", "DBIL", "CO2-L"
[0126] The above completes the selection of feature indicators, and then compares the performance of each model algorithm. The algorithms are all implemented in Python. According to the ratio of 7:3, all the data are divided into training set and validation set, and the ROC curve comparison of the six algorithms can be obtained. Fig.10 As shown:
[0127] The comparison of the area under the receiver operating curve (AUC), accuracy, precision, recall, F1 score and specificity value of the six algorithms is shown in Table 2 (the algorithm of the method of the present invention is denoted as LNN).
[0128] Table 2. Performance comparison of five model algorithms
[0129] Model Name Accuracy Accuracy Recall F1 score Specificity AUC value Logistic Regression 0.840456 0.878049 0.8 0.837209 0.883041 0.891033 Decision Tree 0.843305 0.865497 0.822222 0.843305 0.865497 0.868372 Random Forest 0.843305 0.878788 0.805556 0.84058 0.883041 0.92245 XGBoost 0.803419 0.803279 0.816667 0.809917 0.789474 0.907489 LNN 0.903134 0.910112 0.9 0.905028 0.906433 0.965854
[0130] In order to verify that the present invention has a better prediction effect for small sample data, a numerical experiment is further designed to gradually increase the proportion of the training set from 5% to 70%, and verify it on the test set, using AUC as the evaluation index to compare the six model algorithms. The results are shown in Table 3.
[0131] Table 3. Comparison of AUC values of five model algorithms under different training sets
[0132]
[0133] Secondly, the prediction performance of the model with and without feature index selection was compared. Fig.11 As shown in Figure 2, the prediction performance of the model using SMOTE technology and the model without SMOTE technology is compared. Fig.12 As shown in the figure, the comparison is all AUC values, and the training set and test set are allocated according to 3:7.
[0134] After comparing the performance of different algorithm models, SHAP analysis is used to analyze the LNN-based prediction model for interpretability, and the important influence of the characteristic index in the model is analyzed. The obtained SHAP analysis diagram is shown in the figure below. Fig.13 shown.
[0135] In summary, the prediction model of the present invention has the following advantages:
[0136] 1) High prediction accuracy:
[0137] according to Fig.10 The ROC curve comparison chart shows that the LNN model has the highest AUC value among all models, reaching 0.965854, which is much higher than other models such as logistic regression (0.891033), decision tree (0.868372), random forest (0.92245) and XGBoost (0.907489). This shows that the LNN model of the present invention has extremely high prediction accuracy and can effectively distinguish between severe and mild acute pancreatitis patients.
[0138] 2) Excellent performance indicators:
[0139] The performance comparison of the five model algorithms listed in Table 2 shows that the LNN model outperforms other models in key performance indicators such as accuracy, precision, recall, F1 score, and specificity. In particular, its specificity reached 0.906433, which means that the LNN model has a lower false alarm rate when predicting severe acute pancreatitis.
[0140] 3) Strong generalization ability:
[0141] Table 3 shows the AUC value comparison of each model under different training set sizes. The LNN model maintains a high AUC value under all training set ratios. Even when the training set ratio is low (such as 5%), its AUC value still reaches 0.844692, showing strong generalization ability. This shows that the LNN model can maintain stable prediction performance in the case of small sample data, which is particularly important for actual clinical applications.
[0142] 4) Impact of feature selection:
[0143] Fig.11 The prediction performance comparison of the model with and without feature selection is shown. The AUC value of the LNN model is significantly improved after feature selection, which further proves the effectiveness of the feature selection method in the present invention. This helps to improve the prediction accuracy of the model and reduce the complexity of the model.
[0144] 5) Application effect of SMOTE technology:
[0145] Fig.12 The prediction performance comparison of the model using SMOTE technology and that without SMOTE technology is shown. The AUC value of the LNN model is further improved after using SMOTE technology, indicating the effectiveness of SMOTE technology in dealing with class imbalance problems. It also proves the robustness of the LNN model when dealing with oversampled data.
[0146] 6) Model interpretability:
[0147] Fig.13 The SHAP analysis influence diagram shows the influence weights of different features in the LNN model, providing an intuitive explanation for the model's predictions. This interpretability is crucial for clinicians to understand and trust the model's predictions, and helps the model be used in actual medical decision-making.
[0148] What is disclosed above is only a preferred embodiment of the present invention, and it certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.
Claims
1. A method for constructing a prediction model for the severity of acute pancreatitis based on a liquid neural network, characterized in that: The following steps are involved: Step 1: Collect patient data based on inclusion and exclusion criteria; Step 2: Data preprocessing and feature selection; Step 3: Perform machine learning with liquid neural network as the core to obtain the best prediction model; Step 4: Obtain evaluation indicators through prediction performance comparison; Step 5: Perform SHAP visualization analysis to generate graphical explanation results.
2. The method for constructing a prediction model for the severity of acute pancreatitis based on a liquid neural network according to claim 1, characterized in that: Inclusion criteria in step 1 included the following: Meet the diagnostic criteria for acute pancreatitis; Aged 18 or above; Admit to hospital and complete the indicators of required examinations; Exclusion criteria were the following: Under 18 years old; Women who are breastfeeding or pregnant; Patients with various malignant tumors; Patients with coagulation system diseases; Patients with chronic pancreatitis; Patients with a large number of missing test results after admission.
3. The method for constructing a prediction model for the severity of acute pancreatitis based on a liquid neural network according to claim 1, characterized in that: In step 1, the patient's organ failure duration of ≥48 hours during the course of the disease is used as the prediction endpoint of severe acute pancreatitis. The corresponding manifestations and parameters are as follows: Respiratory failure: Pa O2 / FiO2 ≤ 300; Circulatory failure: systolic blood pressure <90 mm Hg or mean arterial pressure <70 mm Hg, and vasoactive drugs are required; Renal failure: serum creatinine ≥170umol / L or >3 times the baseline or urine volume <0.5ml / kg / h for more than 24 hours or anuria for 12 hours.
4. The method for constructing a prediction model for the severity of acute pancreatitis based on a liquid neural network according to claim 3, characterized in that: The execution process of step 2 includes the following steps: Use One-Hot encoding to perform feature vectorization; Use K nearest neighbor algorithm to handle missing data; Select the maximum and minimum values for normalization; Use SMOTE technology to deal with category imbalance problems; A mixture of multiple feature selection methods is used for feature selection.
5. The method for constructing a prediction model for the severity of acute pancreatitis based on a liquid neural network according to claim 4, characterized in that: The machine learning models used in step 3 include Logistic regression, decision tree, random forest, XGBoost algorithm, LSTM and liquid neural network. Liquid neural network is the core algorithm model, and other models are used for comparison and verification. Specifically, a five-fold cross-validation was used to train the model and obtain the optimal hyperparameters of the model. By comparing the AUC values under the ROC curve, the optimal feature combination under each machine learning model was obtained to obtain the best prediction model.
6. The method for constructing a prediction model for the severity of acute pancreatitis based on a liquid neural network according to claim 5, characterized in that: In step 4, the following methods are used to evaluate and compare the model prediction performance; According to the results of the confusion matrix, the area under the receiver operating curve AUC, accuracy, precision, recall, F1 score, and specificity were used to evaluate the performance of the model; Comparison of prediction performance of models with and without feature index selection; Comparison of prediction performance of models using SMOTE technology and without SMOTE technology; By continuously adjusting the ratio of training set and test set, AUC is used to reflect the generalization ability of prediction models of different methods.
7. The method for constructing a prediction model for the severity of acute pancreatitis based on a liquid neural network according to claim 6, characterized in that: SHAP visualization analysis is based on the Shapley value theory and provides global and local interpretability for the model by decomposing the prediction results into the influence of each feature.
Citation Information
Cited By
Acute pancreatitis early stage grading prediction method
CN121260481A
Deep learning prospecting model fair comparison evaluation method and system based on multiple constraints
CN122064922A
Fair comparison evaluation method and system for deep learning ore prospecting model based on multiple constraints
CN122064922B