Method and system for constructing a two-stage cancer survival prediction model

Through the two-stage cancer survival prediction model, SVMSMOTE and random forest logistic regression classifiers are used to solve the problem of low cancer survival prediction accuracy in the prior art, more accurate survival prediction is achieved, and treatment effect and quality of life are improved.

CN119069140BActive Publication Date: 2025-09-02THE ACAD OF TIANJIN UNIV HEFEI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411193941.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-09-02
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

In the prior art, cancer survival prediction accuracy is low, especially in the 5-year survival prediction of high-mortality cancers, with low sensitivity.

Method used

A two-stage cancer survival prediction model was adopted. The first stage was used to predict whether the patient could survive for 5 years using a phase IV cancer survival imbalance classification method based on SVMSMOTE. The second stage was used to predict the specific survival time of patients who could not survive for 5 years.

Benefits of technology

It improves the accuracy and targetedness of cancer survival prediction, helping to improve treatment results and patient quality of life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119069140B_ABST
    Figure CN119069140B_ABST
Patent Text Reader

Abstract

This paper provides a method and system for constructing a two-stage cancer survival prediction model. In the first stage, a logistic regression classifier based on SVM (SMOTE) is used to predict whether patients will survive five years in the first stage. In the second stage, a random forest regression model is used to predict the specific survival time (in months) for patients who are not expected to survive five years. This research enables effective and targeted predictions based on unique patient data, helping to improve treatment outcomes and patient quality of life.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cancer survival prediction, and in particular to a method and system for constructing a two-stage cancer survival prediction model. Background Art

[0002] Cancer is a disease caused by the uncontrolled growth and spread of abnormal cells. These cells can invade surrounding normal tissues and form malignant tumors in various parts of the body. The causes of cancer are complex and diverse, often resulting from the interaction of multiple factors, including genetics, environmental factors, and lifestyle factors. One reason cancer can be so frightening is that most people are already feeling unwell by the time they discover they have cancer. This often leads to cancer being diagnosed at a late stage, when treatment is less effective and survival rates are lower. A patient's prognosis is a prediction of their expected survival and disease progression. Prognosis is typically assessed based on a variety of factors, including cancer type, stage, histology, genetics, patient age, and overall health. A favorable prognosis is crucial for patients and their doctors, influencing treatment choices, lifestyle adjustments, and rehabilitation plans. A favorable cancer prognosis generally means a longer survival and better quality of life, potentially requiring less treatment, and a lower risk of recurrence. A poor prognosis, on the other hand, indicates a greater treatment challenge, a shorter survival, and a higher likelihood of disease progression.

[0003] Survivability prediction, one of the three major tasks of cancer prognosis, aims to provide patients with information about their expected survival. To date, most studies have typically assessed and reported survival over a common five-year timeframe. This is because, in the field of cancer treatment, the five-year survival rate is widely used to assess patient prognosis, defining the number of patients still alive five years (60 months) from the date of diagnosis. The five-year survival rate is a key indicator commonly used in medicine to evaluate the effectiveness of surgery and treatment. In the early days of medicine, cancer survival predictions were based on the clinical characteristics of the malignant tumor and the physician's experience. There was no unified standard or scientific prediction theory, making it difficult to accurately assess the survival outcomes of different patients. Furthermore, if different physicians provided different predicted diagnoses for the same patient, patients would lack an accurate understanding of their condition. This uncertainty inevitably led to patient anxiety and reduced treatment effectiveness. With the continuous advancement of science and technology, cancer prognostics have become more accurate through techniques such as machine learning and deep learning. For example, the continuous advancement of medical informatization has led to the establishment of various medical information systems, which can significantly improve hospital operational efficiency. Vast databases can simultaneously collect and store millions of cancer data points, feeding this massive amount of data into various machine learning and deep learning models to predict different patient prognoses and survival outcomes. Furthermore, the increasing application of data mining in healthcare has enabled further development of this underutilized medical data. Machine learning models such as decision trees, logistic regression, support vector machines, linear regression, random forests, and neural networks have become popular tools. Using models trained on historical clinical data, they can identify useful patterns in patient data and use them to predict cancer survival. This approach offers the advantage of enabling effective and targeted predictions based on each patient's unique symptom data, thereby improving survival outcomes.

[0004] Currently, machine learning methods have been widely used in cancer survival research to construct predictive models, enabling more efficient and accurate medical decision-making. Previous studies have focused on improving the accuracy of cancer survival prediction models. Ali et al. summarized various data mining and machine learning methods for predicting breast cancer survival, demonstrating that these methods significantly outperformed traditional statistical systems in accuracy. Delen applied three popular machine learning methods—decision trees, artificial neural networks, and support vector machines—along with logistic regression, one of the most commonly used statistical methods, to predict prostate cancer survival. In 1994, Burke compared several statistical models with the TNM (Tumor Node Metastasis) staging system, which has been used to predict cancer prognosis since the early 1960s. Several statistical models significantly outperformed the TNM system in predicting 5-year breast cancer survival. Previous researchers have also proposed hybrid models. Khan et al. analyzed the feasibility of using fuzzy logic-based classifiers to predict cancer patient survival. They combined fuzzy set theory with decision trees to construct a weighted fuzzy decision tree (wFDT). Wang et al. combined the synthetic minority oversampling technique (SMOTE) with the particle swarm optimization algorithm (PSO) and one of three classification algorithms (logistic regression, k-Nearest Neighbor (KNN) k nearest neighbor and decision tree) to form a new breast cancer survival prediction classification method. Studies have shown that this hybrid algorithm can significantly improve the accuracy of breast cancer survival prediction.

[0005] In recent years, an ensemble training method has gained favor among researchers both domestically and internationally. This method trains a large number of weak classifiers (base learners) and combines their outputs with specific strategies to improve accuracy and efficiency. Edeki et al. applied six methods to the SEER breast cancer dataset, including logistic regression, decision trees, artificial neural networks (multilayer perceptrons), support vector machines, AdaBoost, bagging, and random forests. The results showed that the overall performance of each algorithm was dependent on other algorithmic characteristics of the algorithm, such as sample size, quality characteristics, and data representation. Random forests demonstrated relatively good accuracy in predicting cancer survival. Boughorbel et al. conducted a detailed comparison of several models that influence early breast cancer prognosis and found that random classification tree technology outperformed at least boosted trees, partial differential equation and least squares models, generalized linear models (GLMs), GLMNet, support vector machines, neural networks, and K-nearest neighbors (KNN) in evaluating model prediction ranking quality. Random classification tree forest technology achieved at least one optimal AUC (Area Under Curve) performance, an indicator for evaluating model prediction ranking performance. Zolbanin et al. used predictive models generated by logistic regression, artificial neural networks, decision trees, and random forests to predict overall survival rates for cancer comorbidities. The results showed that random forests had the highest accuracy.

[0006] While the aforementioned studies have used a wide variety of models for prediction and achieved high accuracy, many models suffer from low sensitivity due to using traditional classification methods for imbalanced data, particularly for predicting 5-year survival rates for high-mortality cancers. Therefore, data characteristics must be considered to improve overall predictive performance. To date, predicting survival time has proven to be extremely challenging, as large generalization errors often occur when using single-stage logistic regression classification models. Summary of the Invention

[0007] The technical problem to be solved by the present invention is to provide a method for constructing a high-precision prediction model in response to the problem of low accuracy in cancer survival prediction in the prior art.

[0008] The present invention solves the above technical problems through the following technical means:

[0009] A method for constructing a two-stage cancer survival prediction model comprises the following steps:

[0010] Step 1, build the dataset:

[0011] Step 1-1, the data set is from SEER;

[0012] Step 1-2: label the data set to construct a two-dimensional variable: survival months ≥ 60 months is labeled as 1, and survival months < 60 months is labeled as 0;

[0013] Steps 1-3, preprocessing the variables and records of the dataset and dividing the dataset: after basic preprocessing, retain a number of records for classification experiments;

[0014] Step 2, training data set:

[0015] Step 2-1: Use the Sigmoid function to train the data in step 1-2, compress and map the input feature values ​​so that the output value is between 0 and 1;

[0016] Step 2-2: Convert text-type categorical variables into numeric data variables and remove noise from the data. Categorical variables are divided into three categories: nominal variables, ordinal variables, and distance variables.

[0017] Step 3: Build and evaluate the logistic regression classification model: Use the original imbalanced sample to process the imbalanced data, use the SMOTE algorithm to process the imbalanced data, and use the SVM STOME algorithm to process the imbalanced data to build a logistic regression classification model respectively; after evaluation, the best logistic regression classification model is obtained;

[0018] Step 4: Build a predictive logistic regression classification model and evaluate it:

[0019] Step 4-1: Use the 932 records with survival months less than 60 months in Step 1-3 as the input data set, and train and test the data set;

[0020] Step 4-2: Build predictive logistic regression classification models for each algorithm, including random forest, ridge regression, LASSO regression, linear regression, and Xgboost regression tree, and calculate MSE, MAE, and R 2 The average value of the training set and the test set is determined based on K-fold cross validation; after analyzing the experimental results, the average values ​​of MSE and MAE of random forest are the lowest;

[0021] Step 4-3: Build a single-stage model and a two-stage model for the random forest prediction logistic regression classification model, and calculate the MSE, MAE, and R 2 The training set and test set are determined based on the K-fold cross validation.

[0022] In step 4-4, the Gini index is used to evaluate the results of feature importance screening using random forest;

[0023] The variables with higher impact on survival rate were analyzed through signature analysis.

[0024] Furthermore, in steps 1-3, only cases with stage IV cancer were screened out. After preprocessing, a total of 1,065 records were retained for classification experiments, including 133 records with survival months ≥ 60 months and 932 records with survival months < 60 months, which were used for the random forest regression prediction stage experiment.

[0025] Furthermore, in step 2-1, the Sigmoid function is introduced to train the data in step 1-2:

[0026]

[0027] Among them, x i is the i-th data of the test set, is a p-dimensional column vector, m t and a are parameters to be determined;

[0028] After training with the Sigmoid function, the input feature values ​​are compressed and mapped so that the output value is between 0 and 1, thereby improving the expressiveness and accuracy of the model.

[0029] Furthermore, the SVM STOME algorithm is used to process the imbalanced data, and its formula is shown in (2):

[0030]

[0031] Among them, L STOME (w,b,x,y)=exp(-y(w T x+b)), for samples that are correctly classified

[0032] L STOME (w,b,x,y)=exp(y(w T x+b)), for misclassified samples

[0033] C is a hyperparameter that controls the weights of correct and incorrect classifications.

[0034] Furthermore, in step 4-2, the 932 records of survival months < 60 months obtained after processing in steps 1-3 were input into the prediction logistic regression classification model of each algorithm, and the mean absolute error (MAE), root mean error (MSE) and determination coefficient (R) were used to calculate the mean absolute error (MAE), root mean error (MSE) and determination coefficient (R) of the patients. 2 Three indicators were used to evaluate the effect of regression methods on predicting cancer survival;

[0035]

[0036] in, is the predicted value of the i-th sample, y i is the actual value, m pis the number of samples.

[0037] Furthermore, in step 4-4, the Gini index is used to evaluate the feature importance screening results using random forest:

[0038] The calculation formula for the Gini index score of the feature is shown in (6), and the calculation formula for the importance index score of the variable is shown in (7):

[0039]

[0040] Among them, H represents H categories, q nh Represents the proportion of category h in node n, GI n1 and GI n2 Respectively represent the Gini index of the two new nodes after branching;

[0041] After feature analysis, the 12 best performing features were selected from the 15 features to analyze the variables that had a higher impact on survival rate.

[0042] The present invention also provides a two-stage cancer survival prediction model construction system, comprising:

[0043] The data set construction module has the following specific execution process:

[0044] Step 1-1, the data set is from SEER;

[0045] Step 1-2: label the data set to construct a two-dimensional variable: survival months ≥ 60 months is labeled as 1, and survival months < 60 months is labeled as 0;

[0046] Steps 1-3, preprocessing the variables and records of the dataset and dividing the dataset: after basic preprocessing, retain a number of records for classification experiments;

[0047] Training dataset module, the specific execution process is:

[0048] Step 2-1: Use the Sigmoid function to train the data in step 1-2, compress and map the input feature values ​​so that the output value is between 0 and 1;

[0049] Step 2-2: Convert text-type categorical variables into numeric data variables and remove noise from the data. Categorical variables are divided into three categories: nominal variables, ordinal variables, and distance variables.

[0050] Constructing a logistic regression classification model module: using the original unbalanced sample to process unbalanced data, using the SMOTE algorithm to process unbalanced data, and using the SVM STOME algorithm to process unbalanced data to construct logistic regression classification models respectively; after evaluation, the best logistic regression classification model is obtained;

[0051] Construct a predictive logistic regression classification model module. The specific execution process is as follows:

[0052] Step 4-1: Use the 932 records with survival months less than 60 months in Step 1-3 as the input data set, and train and test the data set;

[0053] Step 4-2: Build predictive logistic regression classification models for each algorithm, including random forest, ridge regression, LASSO regression, linear regression, and Xgboost regression tree, and calculate MSE, MAE, and R 2 The average value of the training set and the test set is determined based on K-fold cross validation; after analyzing the experimental results, the average values ​​of MSE and MAE of random forest are the lowest;

[0054] Step 4-3: Build a single-stage model and a two-stage model for the random forest prediction logistic regression classification model, and calculate the MSE, MAE, and R 2 The training set and test set are determined based on the K-fold cross validation.

[0055] In step 4-4, the Gini index is used to evaluate the results of feature importance screening using random forest;

[0056] The variables with higher impact on survival rate were analyzed through signature analysis.

[0057] Furthermore, in step 2-1, the Sigmoid function is introduced to train the data in step 1-2:

[0058]

[0059] Among them, x i is the i-th data of the test set, is a p-dimensional column vector, m t and a are parameters to be determined;

[0060] After training with the Sigmoid function, the input feature values ​​are compressed and mapped so that the output value is between 0 and 1, thereby improving the expressiveness and accuracy of the model.

[0061] Furthermore, the SVM STOME algorithm is used to process the imbalanced data, and its formula is shown in (2):

[0062]

[0063] Among them, LSTOME (w,b,x,y)=exp(-y(w T x+b)), for samples that are correctly classified

[0064] L STOME (w,b,x,y)=exp(y(w T x+b)), for misclassified samples

[0065] C is a hyperparameter that controls the weights of correct and incorrect classifications.

[0066] Furthermore, in step 4-2, the 932 records of survival months < 60 months obtained after processing in steps 1-3 were input into the prediction logistic regression classification model of each algorithm, and the mean absolute error (MAE), root mean error (MSE) and determination coefficient (R) were used to calculate the mean absolute error (MAE), root mean error (MSE) and determination coefficient (R) of the patients. 2 Three indicators were used to evaluate the effect of regression methods on predicting cancer survival;

[0067]

[0068] in, is the predicted value of the i-th sample, y i is the actual value, m p is the number of samples.

[0069] The advantages of the present invention are:

[0070] This study uses a two-stage cancer survival prediction model. In the first stage, a logistic regression classifier based on the SVMSMOTE-based classification method for stage IV cancer survival imbalance is used to predict whether patients will survive five years in the first stage. In the second stage, a random forest logistic regression classification model is used to predict the specific survival time (in months) for patients who are not expected to survive five years. This research can provide effective and targeted predictions based on the unique symptom data of each patient, helping to improve treatment efficacy and patient quality of life. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 is a flow chart of a method in an embodiment of the present invention;

[0072] Figure 2 Schematic diagram of the Sigmoid function image in an embodiment of the present invention;

[0073] Figure 3 shows the MAE, MSE, and R of the various algorithms in Example 1 of the present invention. 2 Figure 3(a) is the comparison result of MAE value of each algorithm, Figure 3(b) is the comparison result of MSE value of each algorithm, Figure 3(c) is the comparison result of R 2 Value comparison result graph;

[0074] Figure 4 This is a graph showing the ranking results of random forest feature importance in Example 1 of the present invention. DETAILED DESCRIPTION

[0075] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0076] Example 1

[0077] A method for predicting cancer survival based on logistic regression classifier and random forest, comprising the following steps:

[0078] Step 1: Build a dataset

[0079] Step 1-1: Prepare the dataset: The dataset is derived from the Surveillance, Epidemiology, and End Results (SEER) database, a resource created and maintained by the National Cancer Institute for the collection and dissemination of epidemiological and clinical data on cancer patients. The SEER database contains a wealth of cancer-related information, including patient characteristics, disease characteristics, treatment data, and outcome data. This data can be used for epidemiological studies, disease trend analysis, survival calculations, and treatment efficacy assessments.

[0080] In step 1-1, the dataset contains 134 variables with complete data record descriptions and can be obtained and used free of charge after signing the research data agreement. The present invention mainly extracts data from the lungs and bronchi for experiments;

[0081] Step 1-2 labels the extracted dataset described in step 1-1: In step 1-2, corresponding data variables are selected from the features according to the needs of the project of the present invention (as shown in Table 1). Since the amount of data required by the present invention is not large and frequent data access is not required, the data can be copied and pasted into a CSV file for storage. The model constructed later in the present invention reads the data from the CSV file. In order to implement algorithm prediction, all records with a survival time of more than 60 months since diagnosis are marked, that is, survival months ≥ 60 months are coded as 1, and conversely, survival months < 60 months are coded as 0.

[0082] The newly encoded variable above is used as the target variable for classification, and the target variable for regression is the data item of survival months. Although the specific coding rules for patient identification numbers in the SEER program are unknown, previous studies have found that patient identification numbers (Patient ID) contain some additional information about patients, often designated as related to certain characteristics or types of patients.

[0083] Step 1-3 Data preprocessing: In order to improve accuracy and efficiency and to fully consider the impact of different indicators on accuracy, the original lung cancer data set was preprocessed with variables and recorded data, and some variables were removed from the model. The present invention used cases with diagnosis time from 2004 to 2015. In addition, records with undetermined diagnosis date and follow-up end date and records of causes of death other than primary cancer were also excluded, and only cases with cancer stage (AJCC Stage Group) belonging to stage IV (the most advanced tumor) were screened out. After basic preprocessing, a total of 1,065 records were retained for classification experiments, including 133 records with survival months ≥ 60 months, 932 records with survival months < 60 months, and 932 records with survival months < 60 months for experiments in the random forest regression prediction stage.

[0084] The data characteristics after rough screening are shown in Table 1:

[0085] Table 1 Data variable type list

[0086] Label variable Variable Description Variable abbreviation 1 Patient Id Patient number d 2 SEX gender sex 3 Age recode age age 4 Survival months Survival months months 5 Derived AJCC Stage Group, 6th ed(2004-2015) Tumor staging stage 6 Total number of in situ / malignant tumors for patient Number of tumors otal 7 CS tumor size (2004-2015) Lymphoma size size 8 ICD-O-3 Hist / behavior, malignant Pathological type histology 9 Grade Organizational hierarchy grade 10 CS extension (2004-2015) Degree of infiltration extension 11 CS lymph nodes (2004-2015) Degree of lymph node involvement nodes 12 CS mets at dx (2004-2015) Distant metastasis mets 13 RX Summ--Scope Reg LN Sur(2003+) Lymph node removal scope 14 Regional nodes examined(1988+) Number of lymph nodes examined examined 15 Regional nodes positive(1988+) Number of positive lymph nodes positive

[0087] Step 2: Training dataset

[0088] Step 2-1 uses the Sigmoid function to train the data in step 1-2, thereby obtaining data that meets the requirements for training the model. The Sigmoid function is also called the Logistic function, and its value range is (0, 1). The formula of the Sigmoid function is shown in (1):

[0089]

[0090] Where e is the natural logarithm base and x is the input value.

[0091] In the actual prediction process, the Sigmoid function formula is shown in (2):

[0092]

[0093] Among them, x i is the i-th data of the test set, is a p-dimensional column vector, m t and a are parameters to be determined.

[0094] After training with the Sigmoid function, the input feature values ​​are compressed and mapped so that the output values ​​are between 0 and 1, thereby improving the expressiveness and accuracy of the logistic regression classification model.

[0095] Step 2-2 converts the data items that are text-type categorical variables into digital data variables and removes noise from the data: Since some data are text-type categorical variables, it is necessary to convert them into digital data variables to facilitate model training. Categorical variables can be divided into three categories:

[0096] Nominal variables: There is no connection between them. For example, the sex attribute in Table 1 in steps 1-3 can be processed using one-hot encoding.

[0097] Ordered variables: They are not completely independent of each other, but have certain connections, but cannot be transformed into each other through numerical operations, such as the organizational level (grade) attribute in Table 1 in steps 1-3;

[0098] Distant variables: can be transformed through mathematical calculations, such as the lymph node removal status (scope) attribute in the data. Two categories can be converted to each other by adding or subtracting a certain number, and are processed using sequential coding.

[0099] Next, the triple standard deviation principle is used for noise removal. The principle is that for data that obeys a normal distribution, under the 3σ principle, values ​​in a set of measured values ​​that deviate from the mean by more than 3 times the standard deviation will be defined as outliers. In this experiment, these outliers will be eliminated.

[0100] Step 3: Build a logistic regression classification model and evaluate it

[0101] Building a logistic regression classification model includes: using the original unbalanced sample to process the unbalanced data, using the SMOTE algorithm to process the unbalanced data, and using the SVM STOME algorithm to process the unbalanced data to build a logistic regression classification model respectively.

[0102] Sample imbalance refers to a situation in which the number of training examples of different categories in a classification task varies greatly. Generally, a sample imbalance occurs when the ratio of sample categories (majority class vs. minority class) is significantly greater than 1:1. The data used in this paper totals 1,065 items, including 133 records with survival months ≥ 60 months and 932 records with survival months < 60 months. The ratio is obviously unbalanced, so adaptive processing of the imbalanced data is required because the classification boundary in the case of class imbalance will "invade" the minority class area.

[0103] Step 3-1 uses the original imbalanced samples to process the imbalanced data by adjusting the classification threshold. By lowering the threshold (for example, from 0.5 to 0.3 or lower), the model is more likely to predict samples as belonging to the minority class (positive samples), thereby improving its ability to detect the minority class. By adjusting the threshold, the model's prediction results can be changed, making the model pay more attention to minority class samples, increasing the model's recall rate, and thus improving the model's performance on imbalanced datasets.

[0104] Step 3-2 uses the STOME algorithm to process imbalanced data. For each sample x in the minority class, the distance from it to all samples in the minority class sample set is calculated using the Euclidean distance as the standard to obtain its k nearest neighbors. A sampling ratio is set according to the sample imbalance ratio to determine the sampling magnification N. For each minority class sample x, several samples are randomly selected from its k nearest neighbors. Assume that the selected nearest neighbors are For each randomly selected neighbor And the minority class sample x constructs a new sample according to formula (3):

[0105]

[0106] Step 3-3 uses the SVM STOME algorithm to process unbalanced data. Its formula is shown in (4):

[0107]

[0108] Among them, L STOME (w,b,x,y)=exp(-y(w T x+b)), for samples that are correctly classified

[0109] L STOME (w,b,x,y)=exp(y(w T x+b)), for misclassified samples

[0110] C is a hyperparameter that controls the weights of correct and incorrect classifications.

[0111] Step 3-4: Determine the evaluation index: Perform a five-fold cross-validation on the data set in step 1-2. First, divide the data into five parts, select four parts as the training set Train, and the remaining part as the test set Test. Train five classifiers and take the average of the test set results of the five classifiers as the final evaluation result of the model as shown in Table 2:

[0112] Table 2 Results of logistic regression model processing unbalanced data

[0113]

[0114] The experimental results show that the regression bias value of the logistic regression classification model constructed by the SVM STOME algorithm is low, the AUC value is close to 1, the classification effect is good, and the model prediction is more accurate.

[0115] Step 4: Build and evaluate the predictive logistic regression classification model

[0116] The 932 records of survival months less than 60 months in steps 1-3 were used to train and test the logistic regression classification model.

[0117] Step 4-1 Build the prediction logistic regression classification model of each classic algorithm including: Random Forest, Ridge Regression, LASSO Regression, Linear Regression and Xgboost Regression Tree, select from the mean absolute error (MAE mean absoluteerror), root mean error (MSE mean square error) and determination coefficient (R 2 The regression method is evaluated by three indicators: coefficient of determination. is the predicted value of the i-th sample, y i is the actual value, m p is the number of samples, and the formulas of the three indicators are shown in (5)(6)(7):

[0118]

[0119]

[0120] R 2 Indicates the extent to which the model can explain the variability of the target variable and measures how well the model can predict new samples. It can be negative when the model is very poor.

[0121] Through experiments, the evaluation results of the three indicators of each algorithm are shown in Table 3:

[0122] Table 3 Evaluation results of each algorithm model

[0123]

[0124] In order to make a more intuitive comparison, the data are analyzed using a bar graph, as shown in Figure 3.

[0125] From the analysis of experimental results, the random forest MSE and MAE average values ​​are the lowest, R 2 The average value is the highest, and the difference between the predicted survival time and the actual survival time using the random forest prediction model is not much. Since the months are divided by 10 during data processing, the average difference between the predicted value and the actual value is 9.235 months, which is the best prediction effect for cancer survival. 2The values ​​indicate that the random forest logistic regression classification model has the best explanation rate for the difference in survival months.

[0126] Step 4-2: Build a single-stage model and a two-stage model for the random forest prediction logistic regression classification model, and calculate the MSE, MAE, and R 2 The training set and test set are determined based on the K-fold cross validation.

[0127] Through experiments, the evaluation results of the three indicators of the single-stage logistic regression classification model and the two-stage logistic regression classification model are shown in Table 4:

[0128] Table 4 5-fold cross validation results of the random forest single-stage regression model and the two-stage regression model

[0129]

[0130] In this embodiment, single-stage refers to using random forest for training and testing. Double-stage refers to using random forest for secondary modeling and then training a random forest logistic regression classification model. From the analysis of experimental results, it can be concluded that the MAE and MSE of the double-stage model are lower than those of the single-stage model, while R 2 This indicates that not only the average prediction error is reduced, but also the interpretability of the model is improved, thus verifying that the two-stage model is a better prediction model for cancer survival time than the single-stage model.

[0131] Step 4-3 uses the Gini index to evaluate the results of feature importance screening using random forest: the calculation formula of the feature Gini index score (GI) is shown in (6), and the calculation formula of the variable importance index score (VIM variable importance measures) is shown in (7):

[0132]

[0133]

[0134] Among them, H represents H categories, q nh Represents the proportion of category h in node n, GI n1 and GI n2 Respectively represent the Gini index of the two new nodes after branching.

[0135] After feature analysis, the 12 best performing features were selected from the 15 features, as shown in the attached figure. Figure 4As shown in the figure, among the features used in the logistic regression classification model, tissue grade (grade) and CS extension (extension) are the most important. This result indicates that in lung cancer, the extent of cancer cell spread is closely associated with poor survival. Lymph node involvement (nodes), distant metastasis (mets), and lymph node tumor size (size) appear among the top five important variables. Lymph node involvement (nodes) records the exact number of regional lymph nodes found to have metastases by pathologists. Distant metastasis (mets), also known as malignant metastasis, represents the extent to which tumor cells have spread from the primary site to other parts of the body and continue to grow. And lymph node tumor size (size) records the specific size of the tumor at its current state. Lung cancer has a high recurrence and metastasis rate. Metastasis is a major reason why lung cancer is difficult to cure after radical resection. Therefore, these three variables have a significant impact on lung cancer survival. Using the sex-related attributes sex_F and sex_M, we can see that sex does not significantly affect lung cancer survival. However, this does not deny that sex plays an important role in predicting survival for other cancers. We then analyze the variables that have a significant impact on survival.

[0136] In this example, the data set obtained in steps 1-2 (survival months ≥ 60 months are marked as 1, and survival months < 60 months are marked as 0) is input into the logistic regression classification model described in step 3. The model is trained and evaluated according to the method of step 3 above. The test set evaluation results PRE, REC, ACC, F1-score and AUC of each fold described in steps 3-4 are retained, and the average value of the 5-fold cross validation is taken as the final result of each logistic regression classification model.

[0137] The calculation method of accuracy (ACC), precision (PRE), recall (REC), and F1 value (F1-score) of each fold is as follows:

[0138]

[0139] Among them, TP, FP, TN and FN represent true positive, false positive, true negative and false negative, respectively.

[0140] Following the model evaluation method in step 3 above, five-fold cross-validation was used to evaluate model performance. The results are shown in Table 2 for steps 3-4. Experimental data for the three logistic regression classification models showed that the logistic regression classification model constructed using the SVM STOME algorithm had a low regression bias value, an AUC value close to 1, better classification results, and more accurate model predictions.

[0141] This embodiment proposes a two-stage IV cancer survival prediction model. The first stage is to predict whether the patient can survive for more than 5 years, and the second stage is to predict the exact survival time of patients who cannot survive for 5 years or more, in months. The first stage adopts the classification method of logistic regression considering unbalanced data. In the second stage, after using various classic algorithm models for prediction, the random forest two-stage regression prediction model widely used in various fields was finally selected to predict cancer survival time. The model was verified on the test data set of this project and has good results, indicating that the method of predicting cancer survival based on logistic regression classifier and random forest has a high prediction accuracy.

[0142] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for constructing a two-stage cancer survival prediction model, characterized in that: The following steps are included: Step 1, build the dataset: Step 1-1, the data set is from SEER; Step 1-2: label the data set to construct a two-dimensional variable: survival months ≥ 60 months is labeled as 1, and survival months < 60 months is labeled as 0; Steps 1-3, preprocessing the variables and records of the dataset and dividing the dataset: after basic preprocessing, retain a number of records for classification experiments; Step 2, training data set: Step 2-1: Use the Sigmoid function to train the data in step 1-2, compress and map the input feature values ​​so that the output value is between 0 and 1; Step 2-2: Convert text-type categorical variables into numeric data variables and remove noise from the data. Categorical variables are divided into three categories: nominal variables, ordinal variables, and distance variables. Step 3: Build and evaluate the logistic regression classification model: Use the original imbalanced sample to process the imbalanced data, use the SMOTE algorithm to process the imbalanced data, and use the SVM STOME algorithm to process the imbalanced data to build a logistic regression classification model respectively; after evaluation, the best logistic regression classification model is obtained; Step 4: Build a predictive logistic regression classification model and evaluate it: Step 4-1: Use the 932 records with survival months less than 60 months in Step 1-3 as the input data set, and train and test the data set; Step 4-2: Build predictive logistic regression classification models for each algorithm, including random forest, ridge regression, LASSO regression, linear regression, and Xgboost regression tree, and calculate MSE, MAE, and R 2 The average value of the training set and the test set is determined based on K-fold cross validation; after analyzing the experimental results, the average values ​​of MSE and MAE of random forest are the lowest; Step 4-3: Build a single-stage model and a two-stage model for the random forest prediction logistic regression classification model, and calculate the MSE, MAE, and R 2 The training set and test set are determined based on the K-fold cross validation. In step 4-4, the Gini index is used to evaluate the results of feature importance screening using random forest; The variables with higher impact on survival rate were analyzed through signature analysis.

2. The method for constructing a two-stage cancer survival prediction model according to claim 1, wherein: In steps 1-3, only cases with stage IV cancer were screened. After preprocessing, a total of 1,065 records were retained for classification experiments, including 133 records with survival months ≥ 60 months and 932 records with survival months < 60 months, which were used for the random forest regression prediction stage experiment.

3. The method for constructing a two-stage cancer survival prediction model according to claim 1, wherein: In step 2-1, the Sigmoid function is introduced to train the data in step 1-2: Among them, x i is the i-th data of the test set, is a p-dimensional column vector, m t and a are parameters to be determined; After training with the Sigmoid function, the input feature values ​​are compressed and mapped so that the output value is between 0 and 1, thereby improving the expressiveness and accuracy of the model.

4. The method for constructing a two-stage cancer survival prediction model according to claim 1, wherein: The SVMSTOME algorithm is used to process unbalanced data, and its formula is shown in (2): Among them, L STOME (w,b,x,y)=exp(-y(w T x+b)), for samples that are correctly classified L STOME (w,b,x,y)=exp(y(w T x+b)), for misclassified samples C is a hyperparameter that controls the weights of correct and incorrect classifications.

5. The method for constructing a two-stage cancer survival prediction model according to claim 1, wherein: In step 4-2, the 932 records of survival months < 60 months obtained after processing in steps 1-3 are input into the prediction logistic regression classification model of each algorithm, and the mean absolute error (MAE), root mean error (MSE) and determination coefficient (R) are used to calculate the predicted logistic regression classification model. 2 Three indicators were used to evaluate the effect of regression methods on predicting cancer survival; in, is the predicted value of the i-th sample, y i is the actual value, m p is the number of samples.

6. The method for constructing a two-stage cancer survival prediction model according to claim 1, wherein: In step 4-4, the Gini index is used to evaluate the results of feature importance screening using random forest: The calculation formula for the Gini index score of the feature is shown in (6), and the calculation formula for the importance index score of the variable is shown in (7): Among them, H represents H categories, q nh Represents the proportion of category h in node n, GI n1 and GI n2 Respectively represent the Gini index of the two new nodes after branching; After feature analysis, the 12 best performing features were selected from the 15 features to analyze the variables that had a higher impact on survival rate.

7. A two-stage cancer survival prediction model construction system, characterized by: The following steps are included: The data set construction module has the following specific execution process: Step 1-1, the data set is from SEER; Step 1-2: label the data set to construct a two-dimensional variable: survival months ≥ 60 months is labeled as 1, and survival months < 60 months is labeled as 0; Steps 1-3, preprocessing the variables and records of the dataset and dividing the dataset: after basic preprocessing, retain a number of records for classification experiments; Training dataset module, the specific execution process is: Step 2-1: Use the Sigmoid function to train the data in step 1-2, compress and map the input feature values ​​so that the output value is between 0 and 1; Step 2-2: Convert text-type categorical variables into numeric data variables and remove noise from the data. Categorical variables are divided into three categories: nominal variables, ordinal variables, and distance variables. Constructing a logistic regression classification model module: using the original unbalanced sample to process unbalanced data, using the SMOTE algorithm to process unbalanced data, and using the SVM STOME algorithm to process unbalanced data to construct logistic regression classification models respectively; after evaluation, the best logistic regression classification model is obtained; Construct a predictive logistic regression classification model module. The specific execution process is as follows: Step 4-1: Use the 932 records with survival months less than 60 months in Step 1-3 as the input data set, and train and test the data set; Step 4-2: Build predictive logistic regression classification models for each algorithm, including random forest, ridge regression, LASSO regression, linear regression, and Xgboost regression tree, and calculate MSE, MAE, and R 2 The average value of the training set and the test set is determined based on K-fold cross validation; after analyzing the experimental results, the average values ​​of MSE and MAE of random forest are the lowest; Step 4-3: Build a single-stage model and a two-stage model for the random forest prediction logistic regression classification model, and calculate the MSE, MAE, and R 2 The training set and test set are determined based on the K-fold cross validation. In step 4-4, the Gini index is used to evaluate the results of feature importance screening using random forest; The variables with higher impact on survival rate were analyzed through signature analysis.

8. The two-stage cancer survival prediction model construction system according to claim 7, characterized in that: In step 2-1, the Sigmoid function is introduced to train the data in step 1-2: Among them, x i is the i-th data of the test set, is a p-dimensional column vector, m t and a are parameters to be determined; After training with the Sigmoid function, the input feature values ​​are compressed and mapped so that the output value is between 0 and 1, thereby improving the expressiveness and accuracy of the model.

9. The method for constructing a two-stage cancer survival prediction model according to claim 1, wherein: The SVMSTOME algorithm is used to process unbalanced data, and its formula is shown in (2): Among them, L STOME (w,b,x,y)=exp(-y(w T x+b)), for samples that are correctly classified L STOME (w,b,x,y)=exp(y(w T x+b)), for misclassified samples C is a hyperparameter that controls the weights of correct and incorrect classifications.

10. The method for constructing a two-stage cancer survival prediction model according to claim 1, wherein: In step 4-2, the 932 records of survival months < 60 months obtained after processing in steps 1-3 are input into the prediction logistic regression classification model of each algorithm, and the mean absolute error (MAE), root mean error (MSE) and determination coefficient (R) are used to calculate the predicted logistic regression classification model. 2 Three indicators were used to evaluate the effect of regression methods on predicting cancer survival; in, is the predicted value of the i-th sample, y i is the actual value, m p is the number of samples.

Citation Information

Patent Citations

  • Cancer gene classification method and device based on two-stage depth feature selection and storage medium

    CN112926640A

  • Predictive test for identification of early stage nsclc patients at high risk of recurrence after surgery

    CN113711313A