Construction method and system of prostate cancer risk prediction model based on random forest and XGBoost

Through the prostate cancer risk prediction model based on random forest and XGBoost, the feature screening and model construction are used to use routine physical examination data to solve the problems of low specificity of PSA detection and unnecessary puncture, and the early screening of high accuracy and high reliability is achieved The diagnosis cost and unnecessary puncture rate are reduced.

CN117116477BActive Publication Date: 2024-12-13THE FIRST AFFILIATED HOSPITAL OF NAVAL MEDICAL UNIVERSITY OF CHINESE PEOPLES LIBERATION ARMY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310893011.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-20
Publication Date
2024-12-13
Estimated Expiration
2043-07-20

AI Technical Summary

Technical Problem

The existing prostate cancer diagnosis methods rely on low specificity of PSA detection, resulting in many men undergoing unnecessary prostate puncture examinations, and the puncture process brings discomfort and complications, and lacks efficient early risk prediction methods.

Method used

A prostate cancer risk prediction model based on random forests and XGBoost is adopted. By screening and building multiple complex data in a variety of complex data, and predicting it in combination with routine physical examination data, it reduces the data dimension and improves prediction accuracy.

Benefits of technology

Achieve high accuracy and high reliability early screening of prostate cancer, correctly identify 90.45% of prostate cancer cases and 84.50% of non-prostate cancer cases, reduce diagnostic costs and unnecessary puncture rates, improve diagnosis sensitivity and Specificity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117116477B_ABST
    Figure CN117116477B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for constructing a prostate cancer risk prediction model based on random forest and XGBoost. The construction method includes: step S1: collecting real original data of cases from various hospitals, cleaning, preprocessing, filling and standardizing the original data, and dividing it into a training set and a validation set according to a certain ratio; step S2: based on the training set, the prediction model combination with the best performance is selected according to the AUC value as a random forest algorithm combined with an XGBoost algorithm; step S3: using the random forest algorithm for feature screening, and using the XGBoost algorithm to construct a prediction model. The present invention uses the RF algorithm to extract multimodal information, and selects the most discriminative feature composition for the feature set used for modeling; and uses the XGBoost algorithm to construct a multimodal fusion classification model, and performs model training in the classifier. The present application can achieve an accuracy of 92% on the validation set, and can efficiently and quickly realize the risk prediction and diagnosis of prostate cancer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of disease risk prediction, and in particular to a method for predicting the risk of prostate cancer. Background Art

[0002] Prostate cancer is one of the common malignant tumors of the urogenital system in elderly men. It has rapidly become popular among Asian men in recent years. Among the national tumor registration areas, prostate cancer ranks first in the incidence of malignant tumors of the urogenital system in Chinese men. Its incidence and mortality rate rank second and fifth in the global incidence and mortality spectrum of male malignant tumors, respectively. The number of cases and deaths of prostate cancer in China accounts for 8.2% and 13.6% of the global number of cases and deaths of prostate cancer, respectively. It is a high-incidence disease that seriously threatens men's health. In recent years, with the aging of China's population and other reasons, the incidence and mortality of prostate cancer have shown a clear upward trend, with an annual growth rate of up to 7.2%, and the situation is not optimistic. Early prostate cancer is confined to the prostate capsule. Radical prostatectomy or radiotherapy is performed, and the 5-year survival rate is close to 100%. However, when the tumor spreads outside the capsule or metastasizes to distant sites, the treatment of the tumor becomes quite difficult, and the 5-year survival rate is only 28%. Therefore, early diagnosis of prostate cancer is crucial for its prevention and treatment.

[0003] Prostate-specific antigen (PSA) is the most recognized and widely used molecular diagnostic marker for prostate cancer, and plays an extremely important role in the diagnosis of prostate cancer. However, PSA is an organ-specific rather than tumor-specific molecular marker. When the patient's PSA is 4-20ng / ml, prostate biopsy may not be required, because its low specificity leads to clinical costs far higher than required. However, the positive rate of prostate biopsy in China is only 33%, which means that 67% of men have undergone prostate biopsy but have not found prostate cancer. At the same time, prostate biopsy itself is an interventional procedure that may cause discomfort and complications. It requires the ultrasound probe to be inserted into the patient's rectum and punctured 12 or more needles continuously under ultrasound guidance. Continuous punctures bring very uncomfortable feelings to patients. It may also be accompanied by certain risks such as pain, postoperative infection, and bleeding after puncture. Severe cases may cause septic shock and hemorrhagic shock in patients. The most common complication is bleeding after puncture, including hematuria and hematospermia, which may affect the patient's daily life and quality of life. Therefore, new prostate cancer risk prediction methods or systems are urgently needed in clinical practice to improve the specificity of existing PSA tests and the detection rate of prostate cancer, thereby reducing unnecessary prostate biopsies.

[0004] Artificial intelligence (AI) is an emerging technical science that is good at simulating, extending and expanding the theories, methods and technologies of human intelligence. The data in clinical information includes the patient's personal basic information, vital signs, disease description, diagnosis information, examination information, treatment information, medical records, doctor's orders, nursing records, surgical records, etc. There is unstructured text information, as well as graphic image information, which also contains many medical professional terms. With the rapid development of artificial intelligence, its powerful functions play a vital role in processing and integrating multi-parameter, multi-dimensional and complex information resources in clinical practice. However, before the implementation of the present invention, a prostate cancer risk prediction system based on AI technology combined with routine physical examination data has not yet been established. Summary of the invention

[0005] In order to overcome the above technical defects, the first aspect of the present invention provides a method for constructing a prostate cancer risk prediction model based on random forest and XGBoost (eXtreme Gradient Boosting, extreme gradient boosting tree), which comprises:

[0006] Step S1: Collect the real original data of cases from each hospital, clean, preprocess, fill and standardize the original data, and divide it into training set and validation set according to a certain ratio;

[0007] Step S2: Based on the training set, the prediction model combination with the best performance is selected according to the AUC value, which is the random forest algorithm combined with the XGBoost algorithm;

[0008] Step S3: Use the random forest algorithm to screen features and use the XGBoost algorithm to build a prediction model.

[0009] Furthermore, in step S1, first, the medical symbols in the data that cannot be recognized by the model are converted into digital symbols, and cases and features with 60% data completeness are retained; then, the missing values ​​of each feature are filled using the median filling method to remove data with low completeness in the original data; then, a new feature vector is further constructed through correlation analysis.

[0010] Furthermore, in step S2, the model selected by the present invention includes a feature selection method and a prediction classification method, and the selection is performed by the size of the AUC value on the case data through the combination of different feature selection methods and different prediction classification methods. The feature selection method includes random forest, extreme gradient boosting tree, sparse neural network, mutual information metric, LASSO regression, linear correlation metric and maximum correlation and minimum redundancy algorithm. The prediction classification method includes random forest classifier, extreme gradient boosting tree, adaptive classifier, K-nearest neighbor classifier, multilayer perceptron classifier, support vector machine classifier, and decision tree classifier. Finally, the feature selection method of random forest and the prediction classification method of XGBoost are selected as the best modeling combination.

[0011] Furthermore, in step S3, the method for feature screening using the random forest algorithm includes the following steps:

[0012] First, use the random forest algorithm to extract multimodal information from the data to obtain the importance of each feature.

[0013] In the random forest algorithm, for each decision tree, the corresponding out-of-bag data is selected to calculate the out-of-bag data error. Its basic form is shown in the following formula:

[0014]

[0015] In formula (1), N is the total number of samples, m is the number of misclassified samples,

[0016] Randomly add noise interference to the features of all samples of the out-of-bag data OBB, and calculate the out-of-bag data error again, denoted as err OBB 2. Assuming there are N trees in the forest, the importance of the feature is:

[0017] ∑(err OBB 1-err OBB 2) / N (2)

[0018] Calculate the importance of each feature according to formula (2);

[0019] Then, the features with high importance are screened out to form the modeling feature set, while reducing the data dimension.

[0020] Furthermore, in step S3, the method of establishing a prediction model using the XGBoost method includes the following steps:

[0021] First, based on the modeling feature set, the XGBoost algorithm is used to build the initial classification model of multimodal fusion, and the model is trained in the classifier. A new tree is added in each iteration. This tree is generated by efficiently searching in the feature space and selecting the optimal split point. After each new tree is added, the weight of each leaf node is adjusted according to the gradient of the objective function and the information of the Hessian matrix, so that each new tree attempts to correct the residual left by the previous tree to minimize the prediction error. The cross-validation strategy is used to evaluate and optimize the performance of the trained model to obtain the optimal prediction model.

[0022] This application uses a multimodal data fusion method for the first time, fusing data from different sources and types to provide more comprehensive information for model learning. This innovation enables the model to have excellent predictive performance when processing data with multivariate complexity, such as biomedical data.

[0023] When using the cross-validation strategy to evaluate and optimize the performance of the trained model, XGBoost is based on the gradient boosting framework and uses an ensemble of decision trees to work by iteratively adding decision trees to the ensemble, with each tree trying to correct the errors of the previous tree. XGBoost uses the gradient descent optimization strategy to minimize the loss function, thereby effectively optimizing the predictive power of the model.

[0024] Then, when the trained prediction model classifies a case, it will fall into a corresponding leaf node in each tree according to the characteristics of the case. Each leaf node corresponds to a score. The prediction scores corresponding to each tree are added together to obtain the disease risk value of the case.

[0025] In XGBoost, the objective function is simplified to:

[0026]

[0027] In formula (3), G j represents the sum of the first-order derivatives of all samples, H j represents the sum of the second-order derivatives of all samples, γ represents the adjustment function for this item, T represents the number of leaf nodes in a tree, and f t Represents the predicted output of the model for the input sample after the tth iteration.

[0028] A second aspect of the present invention provides a system for constructing a prostate cancer risk prediction model based on random forest and XGBoost, comprising:

[0029] A data collection and processing module is used to collect the real original data of each hospital case, clean, pre-process, fill and standardize the original data, and divide it into a training set and a validation set according to a certain ratio;

[0030] A screening module, wherein the screening module is used to screen out the best prediction model combination of random forest algorithm combined with XGBoost algorithm based on the training set according to the AUC value;

[0031] The model building module is used to use the random forest algorithm to perform feature screening and to build a prediction model using the XGBoost algorithm.

[0032] Furthermore, the data acquisition and processing module is used to: first, convert the medical symbols in the data that cannot be recognized by the model into digital symbols, retaining cases and features with 60% data completeness; then, use the median filling method to fill in the missing values ​​of each feature, and remove the data with low completeness in the original data; then, further construct a new feature vector through correlation analysis.

[0033] Furthermore, the screening module is used to select the AUC value on the case data through a combination of different feature selection methods and different prediction and classification methods. The feature selection methods include random forest, extreme gradient boosting tree, sparse neural network, mutual information metric, LASSO regression, linear correlation metric and maximum correlation and minimum redundancy algorithm. The prediction and classification methods include random forest classifier, extreme gradient boosting tree, adaptive classifier, K-nearest neighbor classifier, multilayer perceptron classifier, support vector machine classifier, and decision tree classifier. Finally, the feature selection method of random forest and the prediction and classification method of XGBoost are selected as the best modeling combination.

[0034] Furthermore, the model building module is used to perform feature screening using a random forest algorithm:

[0035] First, use the random forest algorithm to extract multimodal information from the data to obtain the importance of each feature.

[0036] In the random forest algorithm, for each decision tree, the corresponding out-of-bag data is selected to calculate the out-of-bag data error. Its basic form is shown in the following formula:

[0037]

[0038] In formula (1), N is the total number of samples, m is the number of misclassified samples,

[0039] Randomly add noise interference to the features of all samples of the out-of-bag data OBB, and calculate the out-of-bag data error again, denoted as err OBB2. Assuming there are N trees in the forest, the importance of the feature is:

[0040] ∑(err OBB 1-err OBB 2) / N (2)

[0041] Calculate the importance of each feature according to formula (2);

[0042] Then, the features with high importance are screened out to form the modeling feature set, while reducing the data dimension.

[0043] Furthermore, the model building module is used to establish a prediction model using the XGBoost method:

[0044] First, based on the modeling feature set, the XGBoost algorithm is used to build the initial classification model of multimodal fusion, and the model is trained in the classifier. A new tree is added in each iteration. This tree is generated by efficiently searching in the feature space and selecting the optimal split point. After each new tree is added, the weight of each leaf node is adjusted according to the gradient of the objective function and the information of the Hessian matrix, so that each new tree attempts to correct the residual left by the previous tree to minimize the prediction error. The cross-validation strategy is used to evaluate and optimize the performance of the trained model to obtain the optimal prediction model.

[0045] Then, when the trained prediction model classifies a case, it will fall into a corresponding leaf node in each tree according to the characteristics of the case. Each leaf node corresponds to a score. The prediction scores corresponding to each tree are added together to obtain the disease risk value of the case.

[0046] In XGBoost, the objective function is simplified to:

[0047]

[0048] In formula (3), G j represents the sum of the first-order derivatives of all samples, H j represents the sum of the second-order derivatives of all samples, γ represents the adjustment function for this item, T represents the number of leaf nodes in a tree, and f t Represents the predicted output of the model for the input sample after the tth iteration.

[0049] Compared with the prior art, the above technical solution has the following beneficial effects:

[0050] In the medical field of prostate cancer, this application proposes for the first time a method based on AI technology combined with routine physical examination data to predict the risk of prostate cancer. This application screens and identifies the most optimized early screening and accurate diagnosis model for prostate cancer based on clinical information, thereby establishing a representation model for clinical multimodal data, using the random forest method to analyze and extract clinical data features, extract multimodal information, effectively screen out the most discriminative features for modeling, and use the SHAP model to explain the rationality of feature selection, remove redundant features, and reduce data dimensions. The XGBoost algorithm is used to construct a multimodal fusion classification model, and the model is trained in the classifier. The XGBoost classification can effectively calculate the risk of prostate cancer in a case, and the prediction accuracy can reach 92%. Similar results have been obtained in other hospitals, and it has good robustness. In practice, the model can correctly identify 84.50% of non-prostate cancer cases while ensuring the correct identification of 90.45% of prostate cancer cases. Such results mean that the model has high accuracy and reliability, exceeding the performance of other related studies.

[0051] This application uses artificial intelligence methods to predict the risk of prostate cancer and classify it based on routine clinical data. The input of this model is the patient's routine physical examination data, etc., which means that its application does not require additional equipment or examinations. These data can be easily obtained in grassroots hospitals and will not bring additional burdens to patients, which also makes our model highly feasible and universal. Moreover, the model can be easily downloaded and applied online, which greatly reduces the cost of prostate cancer diagnosis and enables new diagnostic methods to be widely promoted. In addition, this model uses a large amount of clinical data from Asians for training, which can better adapt to the characteristics of Asians, thereby improving the accuracy of prediction in Asian populations. In short, the method and system achieve early diagnosis of prostate cancer in a non-invasive manner, improve the sensitivity, specificity and accuracy of diagnosis, and avoid unnecessary prostate puncture biopsy in clinical practice. This fast and accurate automatic prediction method is of great significance for the prevention and diagnosis of prostate cancer.

[0052] The input indicator for predicting the risk of prostate cancer using the prediction system of this application is the patient's routine physical examination data, which means that its application does not require additional equipment or examinations. These data can be easily obtained in grassroots hospitals and will not bring additional burdens to patients, which also makes our model highly feasible and universal. At the same time, routine physical examination data can provide enough information. The model can predict whether a patient may have prostate cancer by learning the relationship between these features and prostate cancer. Moreover, the model can be easily downloaded and applied online, which greatly reduces the cost of prostate cancer diagnosis and enables new diagnostic methods to be widely promoted. In practice, the model can correctly identify 84.50% of non-prostate cancer cases while ensuring that 90.45% of prostate cancer cases are correctly identified. Such results mean that the model has high accuracy and reliability. This result exceeds the performance of other related studies. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is a module structure diagram of a system for constructing a prostate cancer risk prediction model based on random forest and XGBoost of the present invention;

[0054] Figure 2 It is a flow chart of a method for constructing a prostate cancer risk prediction model based on random forest and XGBoost of the present invention;

[0055] Figure 3 It is a flow diagram of a method for constructing a prostate cancer risk prediction model based on random forest and XGBoost of the present invention;

[0056] Figure 4 It is a heat map of the prediction results of the construction method of the prostate cancer risk prediction model based on random forest and XGBoost of the present invention and the feature selection method and classification method combination prediction method of the system when screening the optimal prediction model combination, and the numerical value in the figure is the AUC value; the X-axis is the feature selection method, which includes random forest (RF), extreme gradient boosting tree (XGB), sparse neural network (SNN), mutual information metric (MI), LASSO regression (LASSO), linear correlation metric (LC) and maximum correlation and minimum redundancy algorithm (MRMR), and the Y-axis is the method of predicting whether the patient has prostate cancer, which includes extreme gradient boosting tree (XGBC), adaptive classifier (ADAC), random forest classifier (RFC), decision tree classifier (DTC), K neighbor classifier (KNC), support vector machine classifier (SVMC), multilayer perceptron classifier (MLPC);

[0057] Figure 5The present invention is a method for constructing a prostate cancer risk prediction model based on random forest and XGBoost, and the system thereof uses a random forest algorithm to perform feature screening, and the feature selection results and feature contribution; wherein the top five features in terms of weight include tumor area under ultrasound, gamma-glutamyl transferase, age, ratio of free PSA to PSA, and absolute value of serum PSA;

[0058] Figure 6 The ROC curve of the prostate cancer risk prediction model of the method and system for constructing the prostate cancer risk prediction model based on random forest and XGBoost of the present invention is trained and verified on the internal data of a tertiary hospital A;

[0059] Figure 7 The ROC curve of the prostate cancer risk prediction model of the method and system for constructing the prostate cancer risk prediction model based on random forest and XGBoost of the present invention is trained on the internal data of tertiary hospital A and verified on the data of tertiary hospital B;

[0060] Figure 8 The ROC curve of the prostate cancer risk prediction model of the method and system for constructing the prostate cancer risk prediction model based on random forest and XGBoost of the present invention is trained on the internal data of tertiary hospital A and verified on the data of tertiary hospital C;

[0061] Fig. 9 The present invention provides a method for constructing a prostate cancer risk prediction model based on random forest and XGBoost and a model interpretability Shap diagram of the system; wherein the top five features that influence the model output are gamma-glutamyl transferase, tumor area under ultrasound, age, ratio of free PSA to PSA, and alkaline phosphatase. DETAILED DESCRIPTION

[0062] The advantages of the present invention are further described below in conjunction with the accompanying drawings and specific embodiments. Those skilled in the art should understand that the following specific description is illustrative rather than restrictive, and should not be used to limit the scope of protection of the present invention.

[0063] Example: Construction process of prostate cancer risk prediction model

[0064] like Figure 1 As shown, this embodiment provides a system for constructing a prostate cancer risk prediction model based on random forest and XGBoost, which includes: a data collection and processing module 100, a screening module 200, and a model construction module 300.

[0065] like Figure 2 and Figure 3As shown, the method for constructing a prediction model using the above-mentioned prostate cancer risk prediction model construction system includes steps S1 to S3:

[0066] Step S1: Collect the real original data of each hospital case, clean, preprocess, fill and standardize the original data, and divide it into training set and validation set according to a certain ratio

[0067] 117 data of patients were collected through the hospital patient system (as shown in Table 1 below), and 7 different algorithms were used to further screen out 18 indicators most relevant to the diagnosis of prostate cancer, including age, urine specific gravity, tumor area under ultrasound, serum alkaline phosphatase, serum albumin, fPSA, PSA, fPSA / PSA, blood sugar, lymphocyte percentage, blood potassium, blood sodium, platelet distribution width, hematocrit, γ-glutamyl transpeptidase, blood lymphocyte absolute value, blood neutrophil absolute value and mean corpuscular hemoglobin. The characteristics of the 18 indicators are that the detection tools are mature, the acquisition cost is low, and the patients are easy to cooperate, but the value they contain is often overlooked. In the present invention, we use an artificial intelligence-assisted method to use the 18 indicators for auxiliary diagnosis of prostate cancer, which has not been reported in previous studies.

[0068] Table 1 117 categories of patient data collected through the hospital patient system

[0069]

[0070]

[0071]

[0072]

[0073]

[0074] The data collection and processing module 100 is used to collect the real original data of cases from various hospitals, and to clean, pre-process, fill and standardize the original data, and divide it into a training set and a validation set according to a certain ratio.

[0075] First, the medical symbols that the model cannot recognize in the data are converted into digital symbols, and the cases and features with 60% data integrity are retained. The present invention has collected a total of 4099 cases of case data from tertiary hospital A, tertiary hospital B, and tertiary hospital C (from Shanghai, Nanjing, and Suzhou, respectively). Because this application intends to use a machine learning method to classify and predict prostate cancer, first of all, for the medical symbols that the model cannot recognize in the data, such as "+", "positive", "±", etc., we convert them into digital symbols.

[0076] Then, the data with low integrity in the original data were removed. Since the collected case data was not complete, the method of retaining 60% of the data integrity was adopted, and the case data and feature data with insufficient data volume were deleted in the row and column directions. Finally, 3411 cases of data were obtained (including 2232 cases from tertiary hospital A, 875 positive cases; 633 cases from tertiary hospital B, 156 positive cases; 546 cases from tertiary hospital C, 190 positive cases), with a total of 117 features.

[0077] Then, the median filling method is used to fill the missing values ​​of each feature. The data obtained on the basis of the previous step still has some missing values. Since the missing data is completely missing at random (Missing Completely At Random), the mean filling method, median filling method, adjacent value filling method, mode filling method, and random sampling interpolation method are used to fill the missing values. According to the prediction results, the median filling method is finally used to fill the missing values ​​of each feature. In this way, a complete data table that can be used for classification and prediction is obtained.

[0078] Then, new feature vectors are further constructed through correlation analysis.

[0079] Finally, the data is divided into a training set and a validation set according to a certain ratio. The training set is used to build a prediction model; the validation set is used to verify the effect of the prediction model later. For example, the training set and validation set are divided in a ratio of 70%:30%.

[0080] Step S2: Based on the training set, the best prediction model combination is selected according to the AUC value, which is the random forest algorithm combined with the XGBoost algorithm.

[0081] The screening module 200 is used to screen out the prediction model combination with the best performance as the random forest algorithm combined with the XGBoost algorithm based on the AUC value based on the training set.

[0082] First, the model selected by the present invention includes a feature selection method and a prediction classification method, and is finally determined by the performance of a combination of different feature selection methods and prediction classification methods on case data.

[0083] Then, due to the high dimension of the data variables obtained by preprocessing and the large correlation between some variables, the model training effect will be affected during model training. Therefore, this paper first adopts the method of feature selection to reduce the number of features to be tested in different classifiers, and selects the features that contribute more to prostate cancer; on this basis, the selected features are used for subsequent model training, thereby improving the model operation rate and model prediction effect. Specifically, the following seven methods are used for feature selection, namely Random Forest (RF), Extreme Gradient Boosting Tree (XGBoost, XGB), Sparse Neural Network (SNN), Mutual Information (MI), LASSO Regression (Least absolute shrinkage and selection operator, LASSO), Linear Correlation (LC) and Maximum Relevance and Minimum Redundancy (MRMR) algorithm.

[0084] Secondly, the present invention realizes the prediction of whether or not a patient has prostate cancer, so it belongs to classification prediction. Therefore, we adopt a classification algorithm to perform classification prediction on the data set after the above feature selection. Specifically, the following seven classification prediction methods are adopted, namely, Random Forest Classifier (RFC), Extreme Gradient Boosting Tree (XGBoost Classifier, XGBC), Adaptive Classifier (Adaptive Boosting Classifier, ADAC), K Neighbors Classifier (KNC), Multilayer Perceptron Classifier (MLPC), Support Vector Machines Classifier (SVMC), and Decision Tree Classifier (DTC).

[0085] Finally, through the combination of the above feature selection method and prediction classification method, a total of 49 (7*7) combinations were tested, and the prediction effects were compared. Finally, the Random Forest (RF) feature selection method was used in combination with the Extreme Gradient Boosting Tree (XGBoost Classifier, XGBC) for modeling. Figure 4 As shown in Figure 2, the test accuracy of this combination on the case data set reached the highest 0.92. Figure 4 The numbers shown in the figure represent the prediction accuracy on the training set. Among the 49 combinations, the combination of random forest and extreme gradient boosting tree has the highest AUC value, indicating that this combination has the best model prediction effect.

[0086] Step S3: Use the random forest algorithm to screen features and use the XGBoost algorithm to build a prediction model

[0087] The model building module 300 is used to perform feature screening using the random forest algorithm and to build a prediction model using the XGBoost algorithm.

[0088] 1. The method for using the random forest algorithm to perform feature screening in the model building module 300 includes the following steps:

[0089] First, use the random forest algorithm to extract multimodal information from the data to obtain the importance of each feature.

[0090] In the random forest algorithm, for each decision tree, the corresponding out-of-bag data is selected to calculate the out-of-bag data error. Its basic form is shown in the following formula:

[0091]

[0092] In formula (1), N is the total number of samples, m is the number of misclassified samples, and noise interference is randomly added to the features of all samples of the out-of-bag data OBB, and the out-of-bag data error is calculated again, denoted as err OBB 2,

[0093] Assuming there are N trees in the forest, the importance of the feature is:

[0094] ∑(err OBB 1-err OBB 2) / N (2)

[0095] After adding random noise, err OBB 2 increases significantly, then this feature has a great impact on the prediction results of the sample, which means that the importance is relatively high. According to formula (2), the importance of each feature is calculated and sorted in descending order to reduce the data dimension. The features with low contribution are deleted to obtain 117 dimensions. The features with high importance are selected to form the modeling feature set. The feature selection results and feature contribution are shown in Figure 5 shown.

[0096] 2. The model building module 300 is also used to establish a prediction model using the XGBoost method, including the following steps:

[0097] First, based on the modeling feature set, the XGBoost algorithm is used to build the initial classification model of multimodal fusion, and the model is trained in the classifier. A new tree is added in each iteration. This tree is generated by efficiently searching in the feature space and selecting the optimal split point. After each new tree is added, the weight of each leaf node is adjusted according to the gradient of the objective function and the information of the Hessian matrix, so that each new tree attempts to correct the residual left by the previous tree to minimize the prediction error. The cross-validation strategy is used to evaluate and optimize the performance of the trained model to obtain the optimal prediction model.

[0098] Then, when the trained prediction model classifies the case, it will fall into a corresponding leaf node in each tree according to the characteristics of the case. Each leaf node corresponds to a score. The prediction scores corresponding to each tree are added together to obtain the disease risk prediction value of the case.

[0099] In XGBoost, the objective function is simplified to:

[0100]

[0101] In formula (3), G j represents the sum of the first-order derivatives of all samples, H j represents the sum of the second-order derivatives of all samples, γ represents the adjustment function for this item, T represents the number of leaf nodes in a tree, and f t Represents the predicted output of the model for the input sample after the tth iteration.

[0102] XGBoost in this application adds a regularization term to the objective function. The regularization term includes the number of leaf nodes in the tree, which can effectively prevent overfitting.

[0103] Verification Example 1: Verification of the effectiveness of the prostate cancer risk prediction model

[0104] First, the prediction results are shown in Table 2. The AUC value is an evaluation indicator in the field of machine learning. The closer the AUC is to 1, the better the model effect. Specificity and sensitivity are used to describe the performance of the classifier. NPV (Negative predictive value) and PPV (Positive predictive value) represent the prediction accuracy of negative and positive cases, respectively.

[0105] Table 2 Validation effect of the prediction model in different hospitals

[0106]

[0107] From Table 2, we can see that in the internal group validation and in the external independent validation, the prediction model we established can obtain excellent prediction accuracy, among which the diagnostic efficiency AUC: (area under the ROC curve) reached more than 0.80 in both internal and external validation, proving that the overall prediction effect of the model is good. Specifically, the sensitivity of the model is close to 80%-90%, that is, the ratio of the model judged as true positive in the samples that are actually positive reached 95% in the internal validation, and the external validation also obtained a good result of about 80%, proving that the model has good prediction sensitivity. Specificity: The ratio of the model judged as true negative in the samples that are actually negative reached 91% in the internal validation, and was close to 70% in the two external validation cohorts, indicating that the model has good prediction specificity. Negative predictive value (NPV): The ratio of the model predicted as negative in the results that are actually negative reached 94% in the internal validation, and reached 60% in the two external validation cohorts, indicating that its negative prediction ability is good. Positive predictive value (PPV): The proportion of true positive results predicted by the model exceeded 92% in internal validation and reached more than 80% in two external validation cohorts, indicating its excellent positive predictive ability.

[0108] Figure 6 , Figure 7 , Figure 8 They respectively represent the ROC curves output by the established model when trained and verified on the internal data of tertiary hospital A, trained on the data of tertiary hospital A and verified on the data of tertiary hospital B, and trained on the internal data of tertiary hospital A and verified on the data of tertiary hospital C. It can be seen that the curves are smooth, the AUC value is high, and the model performs well.

[0109] In order to verify the interpretability of the model, this paper uses the SHAP model for interpretative analysis. Fig. 9 As shown in the figure, the SHAP value of each feature is plotted for each sample, which can better understand the overall pattern and allow the discovery of predicted outliers. The shap graph consists of thousands of sample points, each row represents a feature, the horizontal axis is the SHAP value, which indicates the degree of influence of each feature on the prostate cancer grouping, and the positive semi-axis of the horizontal axis represents that the feature is positively correlated with the variable, approaching the 1-class label in the 0-1 classification. A point represents a sample, and the color represents the feature value, where red represents high and blue represents low values. It is worth noting that the shap interpretable model is based on the XGBoost model, and the variables on the horizontal axis represent the degree of influence on the biological activity value from top to bottom (the degree of influence here is not positive or negative, representing an absolute value ranking of importance). It can be seen that the model selected in this article is interpretable and the selected features have a good classification effect.

[0110] Verification Example 2: Clinical application of prostate cancer risk prediction model

[0111] When the prediction model constructed in Example 1 is used to predict the risk of prostate cancer, for example, this verification example 2 provides a device for predicting the risk of prostate cancer, which includes:

[0112] A database, the database is used to store real original data of prostate cancer cases and processed data sets thereof;

[0113] A memory, wherein the memory is used to store a computer program that can be run on a processor, and when the computer program is executed by the processor, the steps in the method for constructing a prostate cancer risk prediction model based on random forest and XGBoost in Example 1 are implemented;

[0114] A data calling system, which is directly connected to the hospital information system HIS, retrieves test data, B-ultrasound data, basic patient information, etc. through a specified address, obtains various indicators of the patient, and pre-processes the data so that the processor can quickly identify and calculate. A processor, which is used to call data in the database, run the computer program in the memory, generate a prostate cancer risk prediction model, and use the prostate cancer risk prediction model to calculate the input case data to obtain the prostate cancer risk prediction value of the case;

[0115] A display unit is used to output the predicted value of the prostate cancer risk of the case, and simultaneously display the assessment conclusion of the patient's prostate cancer risk and the suggestions for subsequent monitoring and diagnosis.

[0116] When using the above-mentioned prostate cancer risk prediction device to predict the risk of prostate cancer, it can directly retrieve 18 indicator data most relevant to the diagnosis of prostate cancer of the case from the hospital's HIS system (age, urine specific gravity, tumor area under ultrasound, serum alkaline phosphatase, serum albumin, fPSA, PSA, fPSA / PSA, blood sugar, lymphocyte percentage, blood potassium, blood sodium, platelet distribution width, hematocrit, γ-glutamyl transpeptidase, absolute value of blood lymphocytes, absolute value of blood neutrophils and mean corpuscular hemoglobin), and quickly output the prostate cancer risk prediction value of the case, and at the same time display the assessment conclusion of the patient's prostate cancer risk and suggestions for subsequent monitoring and diagnosis.

[0117] For example, 10,000 middle-aged and elderly men in a certain area took a health check-up, among which 1,000 patients had elevated traditional prostate cancer diagnostic indicators (elevated PSA). According to the traditional diagnosis and treatment model, all 1,000 people would need to undergo prostate puncture, which would result in an economic expense of about RMB 5,000 per person, but less than 400 of them would be diagnosed with prostate cancer, and the other 600 would undergo unnecessary prostate punctures and endure unnecessary pain.

[0118] However, the use of the artificial intelligence model proposed in the present invention will avoid 39% of unnecessary punctures, save 1.95 million yuan in direct economic expenses, reduce other expenses of corresponding patients and their families, and ensure that 90% of tumor patients are found, greatly reducing the proportion of patients who need punctures. Since the present invention is based on annual routine physical examination data, even if some patients cannot be effectively found and identified this year because the tumor is still in the early stage, due to the annual routine physical examination items, continuous detection can be made in subsequent annual physical examinations, and dynamic detection can be made, so that tumors can be more clearly found in the second year and later examinations.

[0119] Comparison with the effect of traditional prediction models: As shown in Table 3, compared with the prostate cancer risk prediction models developed in China and other Asian countries, the performance improvement of the present invention is significantly better than similar models. The diagnostic performance AUC of this model relative to PSA is improved by 0.164, which is significantly better than the Asian-ERSPC study (AUC improvement of 0.08, Prostate Cancer Prostatic Dis. 2017), Tang P et al.'s study (AUC improvement of 0.05, Asian J Androl. 2013), Chen et al.'s study (AUC improvement, Urol Oncol. 2016) Yoon et al.'s study (AUC improvement of 0.08, Prostate. 2012).

[0120] Table 3 Comparison of the prediction model of this application and the traditional prediction model

[0121]

[0122] It should be noted that the embodiments of the present invention have better practicability and do not impose any form of limitation on the present invention. Any technician familiar with the field may use the technical content disclosed above to change or modify it into an equivalent effective embodiment. However, any modification or equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A method for constructing a risk prediction model for prostate cancer in Asians based on random forest and XGBoost, characterized in that: include: Step S1: Collect the real original data of cases from each hospital, clean, preprocess, fill and standardize the original data, and divide it into training set and validation set according to a certain ratio; Step S2: Based on the training set, the prediction model combination with the best performance is selected according to the AUC value, which is the random forest algorithm combined with the XGBoost algorithm; Step S3: using the random forest algorithm to perform feature screening, and using the XGBoost algorithm to build a prediction model; wherein the 18 indicators most relevant to the diagnosis of prostate cancer screened out by the random forest algorithm include age, urine specific gravity, tumor area under ultrasound, serum alkaline phosphatase, serum albumin, fPSA, PSA, fPSA / PSA, blood glucose, lymphocyte percentage, blood potassium, blood sodium, platelet distribution width, hematocrit, γ-glutamyl transpeptidase, blood lymphocyte absolute value, blood neutrophil absolute value and mean corpuscular hemoglobin; In step S1, first, the medical symbols in the data that cannot be recognized by the model are converted into digital symbols, and the cases and features with 60% data completeness are retained; then, the missing values ​​of each feature are filled using the median filling method to remove the data with low completeness in the original data; then, a new feature vector is further constructed through correlation analysis; In step S2, the model selected by the present invention includes a feature selection method and a prediction classification method, and the AUC value of the combination of different feature selection methods and different prediction classification methods on the case data is selected, the feature selection method includes random forest, extreme gradient boosting tree, sparse neural network, mutual information metric, LASSO regression, linear correlation metric and maximum correlation and minimum redundancy algorithm, the prediction classification method includes random forest classifier, extreme gradient boosting tree, adaptive classifier, K neighbor classifier, multilayer perceptron classifier, support vector machine classifier, decision tree classifier, and finally the feature selection method of random forest and the prediction classification method of XGBoost are selected as the best modeling combination; In step S3, the method for feature screening using the random forest algorithm includes the following steps: First, use the random forest algorithm to extract multimodal information from the data to obtain the importance of each feature. In the random forest algorithm, for each decision tree, the corresponding out-of-bag data is selected to calculate the out-of-bag data error. Its basic form is shown in the following formula: In formula (1), N is the total number of samples, m is the number of misclassified samples, Randomly add noise interference to the features of all samples of the out-of-bag data OBB, and calculate the out-of-bag data error again, denoted as err OBB 2. Assuming there are N trees in the forest, the importance of the feature is: ∑(err OBB 1-err OBB 2) / N (2) Calculate the importance of each feature according to formula (2); Then, the features with high importance are selected to form the modeling feature set, while reducing the data dimension; In step S3, the method of establishing a prediction model using the XGBoost method includes the following steps: First, based on the modeling feature set, the XGBoost algorithm is used to build the initial classification model of multimodal fusion, and the model is trained in the classifier. A new tree is added in each iteration. This tree is generated by efficiently searching in the feature space and selecting the optimal split point. After each new tree is added, the weight of each leaf node is adjusted according to the gradient of the objective function and the information of the Hessian matrix, so that each new tree attempts to correct the residual left by the previous tree to minimize the prediction error. The cross-validation strategy is used to evaluate and optimize the performance of the trained model to obtain the optimal prediction model. Then, when the trained prediction model classifies a case, it will fall into a corresponding leaf node in each tree according to the characteristics of the case. Each leaf node corresponds to a score. The prediction scores corresponding to each tree are added together to obtain the disease risk value of the case. In XGBoost, the objective function is simplified to: In formula (3), G j represents the sum of the first-order derivatives of all samples, H j represents the sum of the second-order derivatives of all samples, γ represents the adjustment function for this item, T represents the number of leaf nodes in a tree, and f t Represents the predicted output of the model for the input sample after the tth iteration.

2. A system for constructing a prostate cancer risk prediction model for Asians based on random forest and XGBoost, characterized in that: include: A data collection and processing module is used to collect the real original data of each hospital case, clean, pre-process, fill and standardize the original data, and divide it into a training set and a validation set according to a certain ratio; A screening module, wherein the screening module is used to screen out the best performance prediction model combination based on the training set according to the AUC value, which is a random forest algorithm combined with an XGBoost algorithm; wherein the 18 indicators most relevant to the diagnosis of prostate cancer screened out by the random forest algorithm include age, urine specific gravity, tumor area under ultrasound, serum alkaline phosphatase, serum albumin, fPSA, PSA, fPSA / PSA, blood glucose, lymphocyte percentage, blood potassium, blood sodium, platelet distribution width, hematocrit, γ-glutamyl transpeptidase, absolute value of blood lymphocytes, absolute value of blood neutrophils, and mean corpuscular hemoglobin; Model building module, which is used to use the random forest algorithm to perform feature screening and use the XGBoost algorithm to build a prediction model; The data acquisition and processing module is used to: first, convert the medical symbols in the data that cannot be recognized by the model into digital symbols, retaining the cases and features with 60% data integrity; then, fill the missing values ​​of each feature with the median filling method, and remove the data with low integrity in the original data; then, further construct a new feature vector through correlation analysis; The screening module is used to select the AUC value size on the case data through the combination of different feature selection methods and different prediction and classification methods. The feature selection methods include random forest, extreme gradient boosting tree, sparse neural network, mutual information measurement, LASSO regression, linear correlation measurement and maximum correlation and minimum redundancy algorithm. The prediction and classification methods include random forest classifier, extreme gradient boosting tree, adaptive classifier, K-nearest neighbor classifier, multilayer perceptron classifier, support vector machine classifier, and decision tree classifier. Finally, the feature selection method of random forest and the prediction and classification method of XGBoost are selected as the best modeling combination; The model building module is used to perform feature screening using the random forest algorithm: First, use the random forest algorithm to extract multimodal information from the data to obtain the importance of each feature. In the random forest algorithm, for each decision tree, the corresponding out-of-bag data is selected to calculate the out-of-bag data error. Its basic form is shown in the following formula: In formula (1), N is the total number of samples, m is the number of misclassified samples, Randomly add noise interference to the features of all samples of the out-of-bag data OBB, and calculate the out-of-bag data error again, denoted as err OBB 2. Assuming there are N trees in the forest, the importance of the feature is: ∑(err OBB 1-err OBB 2) / N (2) Calculate the importance of each feature according to formula (2); Then, the features with high importance are selected to form the modeling feature set, while reducing the data dimension; The model building module is used to build a prediction model using the XGBoost method: First, based on the modeling feature set, the XGBoost algorithm is used to build an initial classification model of multimodal fusion, and the model is trained in the classifier. By continuously adding and splitting to grow a tree, a trained prediction model can be obtained. Then, when the trained prediction model classifies a case, it will fall into a corresponding leaf node in each tree according to the characteristics of the case. Each leaf node corresponds to a score. The prediction scores corresponding to each tree are added together to obtain the disease risk value of the case. In XGBoost, the objective function is simplified to: In formula (3), G j represents the sum of the first-order derivatives of all samples, H j represents the sum of the second-order derivatives of all samples, γ represents the adjustment function for this item, T represents the number of leaf nodes in a tree, and f t Represents the predicted output of the model for the input sample after the tth iteration.

Citation Information

Patent Citations

  • Construction method, system and application for disease data analysis and processing model

    CN108231201A

  • Heart disease prediction method based on dual feature selection and XGBoost algorithm

    CN111243751A

  • Blueberry yield prediction method based on machine learning

    CN112906298A

  • Prostate cancer prognosis prediction model construction method and device and storage medium

    CN116741378A