A liver cancer survival prediction method based on constrained whale optimization algorithm
Through the constrained whale optimization algorithm and Gaussian function weighted KNN classifier, the accuracy of feature screening and classification in liver cancer survival prediction was solved, and high-accurate liver cancer survival prediction was achieved, which significantly improved the accuracy and classification of liver cancer survival prediction. Effect.
Patent Information
- Application Number
- CN202210304179.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-26
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2042-03-26
AI Technical Summary
There is a lack of effective liver cancer survival prediction scheme in the prior art, and WOA algorithms are prone to problems of premature convergence and local optimization, making it difficult to achieve high accuracy in screening and classification of liver cancer survival characteristics.
The constrained whale optimization algorithm is used combined with the Gaussian function weighted KNN classifier to achieve screening and accurate classification of liver cancer survival characteristics through data feature selection and classification error rate optimization.
Improve the accuracy of liver cancer survival prediction, and the classification accuracy of the constrained whale optimization algorithm reaches 87.88%. The effect of the Gaussian weighted KNN classifier is significantly higher than that of other algorithms, solving the problems of premature convergence and local optimization, and providing more Effective liver cancer survival prediction program.
Smart Images

Figure CN114758771B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of liver cancer survival prediction, and in particular to a liver cancer survival prediction method based on a constrained whale optimization algorithm. Background Art
[0002] Cancer is one of the major diseases that endanger the health of the Chinese people. If we can use artificial intelligence technology to explore the occurrence and development of cancer, and provide fast, effective and accurate methodological means for early screening, clinical diagnosis, precision treatment and survival prediction of cancer, we can reduce the incidence and mortality of cancer to some extent.
[0003] According to statistics, liver cancer is the sixth most commonly diagnosed cancer in the world and the second leading cause of death from cancer-related diseases. It is a health problem that the world has to face. Faced with such a high incidence and high mortality rate, survival prediction is crucial. It is one of the most challenging tasks currently faced by the medical research community, involving a large amount of clinical data analysis. It is necessary to draw corresponding patterns and conclusions from these data and use them to determine the survival ability of the corresponding patient with a specific disease in that specific time period. However, even experienced experts find it difficult to directly judge the survival rate of patients based on some of their reactions or treatment conditions. This is extremely irresponsible behavior and the reliability of the diagnosis cannot be guaranteed. In addition, it is unimaginable for expert doctors to analyze a large amount of complex test data without computer guidance. Therefore, many research works attempt to automate the survival prediction process to help medical staff better formulate later treatment plans for patients.
[0004] Survival prediction of liver cancer is a critical step in its treatment process. Its greatest significance lies in providing effective scientific basis for medical staff and their families to make medical decisions and avoid excessive and ineffective treatment. Machine learning methods can be used to analyze a large amount of complex test data to assist doctors in formulating later treatment plans. The consequences of delayed treatment of liver cancer are unimaginable, so we urgently need to explore machine learning methods suitable for liver cancer survival prediction. At the same time, correct predictions can also help patients better plan their remaining lives, make full use of time to realize some wishes, and make life more complete. Studies have shown that machine learning algorithms can be effectively applied to the survival prediction of liver cancer, which is of great significance for its later diagnosis and treatment. Summary of the invention
[0005] The technical problem to be solved by the present invention is: in view of the lack of solutions for liver cancer survival prediction in the prior art and the problem that the WOA algorithm is prone to premature convergence and local optimality, a constrained whale optimization algorithm is proposed to find more useful liver cancer survival features, and a KNN classifier with Gaussian function weighting is used for classification.
[0006] The technical solution adopted by the present invention is: a liver cancer survival prediction method based on a constrained whale optimization algorithm comprises the following steps:
[0007] S1. Data collection and preprocessing: Collect patients' medical qualitative indicators and medical quantitative indicators to establish a data set, and divide the data set into a training set and a test set in proportion;
[0008] S2. Use the constrained whale optimization algorithm to select features of qualitative and quantitative indicators in the data set, use the training set to establish a classification model, and use the test set to verify the classification model;
[0009] The constrained whale optimization algorithm includes:
[0010] S21, surrounded prey;
[0011] Humpback whales first identify the location of prey and then surround them; in the Whale Optimization Algorithm (WOA), whales assume that the target prey is the best candidate location and they try to move towards the best hunting agent as shown below:
[0012] X(t+1)=Xgb(t)-A·D (1)
[0013] D=|C·Xgb(t)-X(t)| (2)
[0014] Where X is the position of the whale, Xgb is the best hunting position, A and C are coefficient vectors, and t is the number of iterations; the calculation process of the coefficient vectors of A and C is as follows:
[0015] A=2a1·r1-a1 (3)
[0016] C=2·r2 (4)
[0017] Among them, r1 and r2 are two random vectors in the interval [0,1], and a1 is a parameter that decreases linearly from 2 to 0;
[0018] S22, bubble net attack;
[0019] Humpback whales also use bubble nets to attack prey; in the process, they establish a shrinking and encircling strategy and a spiral position update strategy;
[0020] The reduction of the encirclement strategy is achieved by reducing a1, especially the fluctuation of the range of A values also reduces a1; that is, by setting the value of A to the interval [-1,1], the new position of the whale can be arbitrarily defined within the interval between the original position and the best candidate position;
[0021] The spiral update position strategy is that the whale updates its position according to the spiral upward direction; this strategy can be modeled as follows:
[0022] X(t+1)=E·exp(b·t)·cos(2πl)+Xgb(t) (5)
[0023] E=Xgb(t)-X(t) (6)
[0024] Where E is the distance between the whale's position and the best hunting position, X(t) is the position of the whale in the tth iteration, Xgb(t) is the best hunting position of the whale in the tth iteration; b is a constant 1, which is used to limit the shape of the spiral motion of the search individual; l is a random number ranging from [-1,1], and t is the number of iterations;
[0025] When the coefficient vector |A|<1, the algorithm searches for individuals in a shrinking encirclement, and the search individuals will attack or encircle the prey with a 50% probability:
[0026]
[0027] Where p is a random variable in the interval [0,1];
[0028] S23, Searching for Prey
[0029] WOA performs a global search based on the change of parameter vector A. When the coefficient vector |A|>=1, the whale performs a random search outside the shrinking encirclement. Unlike the local search performed by the WOA algorithm within the shrinking encirclement, the reference for searching for individual position updates is no longer the current best search agent, but the position information of a search agent randomly selected from the search population. When searching for prey, the search agent of the WOA algorithm is in the global search stage. The calculation process of the whale's position update is as follows:
[0030] X(t+1)=Xr-A·D (8)
[0031] D=|C·Xr-X| (9)
[0032] Where Xr is the position of a whale randomly selected from the population, D represents the absolute value of the distance between the search individual and Xr, X is the whale position, and C is the coefficient vector;
[0033] The WOA algorithm can easily solve global optimization problems. Although WOA has proven its ability to handle different optimization problems, it also has some disadvantages, such as premature convergence and avoidance of local optimality. These problems occur when most whales try to update their positions based on the current best whale position. In addition, the performance of WOA may degrade when applied to challenging combinatorial optimization problems. This is because complex combinatorial problems usually contain a large number of local optimal values, which increases the chance of the whale algorithm being trapped in a local solution. Intuitively, weak local optimal avoidance and premature convergence are the main factors that lead to the performance degradation of WOA. Therefore, different strategies can be embedded in WOA to improve its performance in high-dimensional optimization.
[0034] S24, create a spatial constraint mechanism;
[0035] In the constrained whale optimization algorithm, the dimension of each solution is limited by two parameters: the maximum dimension (dmax) and the minimum dimension (dmin);
[0036] dmin: If only one feature (the first feature) is selected for a solution, and the minimum dimension is specified as 2, an additional feature (randomly selected from the feature vector) is assigned to this solution;
[0037] dmax: In contrast, if 4 features are selected in a solution and the maximum dimension is specified as 3, an additional feature is randomly deleted from the solution;
[0038] First, create a spatial pool to store the maximum dimension ratio (fmax), that is, the ratio of the maximum dimension to the total dimensions; the minimum dimension ratio (fmin), that is, the ratio of the minimum dimension to the total dimensions; without prior knowledge and experience, it is difficult to determine the initial optimal value; therefore, different fmax and fmin are pre-defined and stored in the spatial pool, and the minimum dimension ratio fmin is calculated as follows:
[0039]
[0040] Where Np is the total number of fmax in the spatial pool. Formula (10) is used to construct the spatial pool as follows:
[0041] In the spatial pool, a spatial value is initially assigned to a set of fmax and fmin, and the spatial value is used to measure the quality of the maximum and minimum dimensions of this set; the lower the spatial value, the higher the quality of the set, because our goal is to select the minimum number of effective features in the data set; therefore, a set of lower fmax and fmin is given a smaller spatial value; conversely, a set of higher fmax and fmin is given a higher spatial value, and the initial spatial values of all dimension ratio groups are initialized to 0 to 1 (the spatial value of the set with the lowest dimension ratio is set to 0, and the spatial value of the set with the highest dimension ratio is set to 1, and the distribution from low to high conforms to the arithmetic distribution);
[0042] The spatial pool consists of multiple groups of maximum dimension ratios fmax and minimum dimension ratios fmin, each of which has a selected spatial value. By randomly selecting several groups of different dimension ratios from the spatial pool and comparing their spatial values, the group with the smallest spatial value is taken as the maximum and minimum dimension ratios, and applied to the best position of the whale, that is, the optimal solution.
[0043] After selecting a set of dimensions in the spatial pool, the spatial bounding process follows, and for each solution, the maximum and minimum dimensions are calculated as follows:
[0044] dmax=fix(fmax·F) (13)
[0045] dmin=ceil(fmin·F) (14)
[0046] Among them, F is the total number of features, which is the sum of qualitative indicators and quantitative indicators; fix and ceil are two rounding operators; two conditions need to be considered in this spatial boundary process. If the number of features of the solution exceeds the maximum dimension, it is adjusted to the maximum dimension range; if the number of features of the solution is less than the minimum dimension, it is adjusted to the minimum dimension range;
[0047] At the end of each iteration, the spatial value is updated; the update of the spatial value is completed by the average of the spatial value before this iteration and the fitness value obtained by the solution. If the selected feature provides a better fitness value, the updated spatial value will become smaller, indicating that the corresponding dimension set can make the whale's position better, so it should have a higher chance of being selected in the next iteration;
[0048] Constrained WOA is applied to feature selection and classification problems. For each solution, the total number of dimensions is equal to the number of features, and each dimension represents the index of the corresponding feature. In each solution, the dimension is limited to the range of [0, 1]. In order to determine whether a feature will be selected, a static threshold of 0.5 is used, as shown in formula (15).
[0049]
[0050] in, is the i-th solution of dimension d, dimension d belongs to the total set of dimensions, and the set of solutions represents the selected feature set;
[0051] S25, determining optimization parameters and fitness function based on a specific feature selection method;
[0052] The classification error rate (CEE) is used as the objective function to evaluate the performance of the features selected by the constrained WOA algorithm. The fitness function (Fit) is as follows:
[0053]
[0054] That is, fitness value = number of classification errors / total number of samples;
[0055] S26. According to the fitness function (Fit), the fitness value of each whale, the optimal position of the individual, and the global optimal position of all whales are calculated, and the optimal position of the whale is adjusted according to the spatial pool constraint;
[0056] S27, using the iteration of the whale to update the optimal position of each whale and the global optimal position, wherein the update of the spatial value is completed by the average value of the spatial value of the last iteration and the fitness value obtained by solving;
[0057] S28, repeat steps S22 to S27 until the maximum number of iterations is reached;
[0058] S29, output the optimal position, that is, the optimal feature combination;
[0059] S3, classification using the optimal feature combination;
[0060] The weighted KNN classifier is used for classification prediction. When KNN makes classification prediction, the majority voting method is generally selected, that is, the K samples with the closest characteristics to the prediction sample in the training set are selected, and the category of the prediction sample is the category with the largest number of categories among these K samples;
[0061] The KNN algorithm is mainly divided into the following steps:
[0062] 1) Calculate the distance between the test data and each training data;
[0063] 2) Sort by increasing distance;
[0064] 3) Select K points with the smallest distance, where K is usually an integer not greater than 20;
[0065] 4) Calculate the frequency of each category in these K points;
[0066] 5) Return the category with the highest frequency among the K points as the predicted category of the test data;
[0067] The KNN algorithm has the advantages of being simple, easy to use, and highly accurate. It is insensitive to outliers and is suitable for numerical and discrete data. However, it is very susceptible to sample imbalance, which results in large deviations in prediction results. To solve this problem, the distance weighting method is used.
[0068] Distance weighting is to add a weight to the distance of each point. The weight of neighbors close to the sample is large, and the weight of neighbors far away from the sample is relatively small. By taking the distance factor into account, it can avoid misjudgment due to too many samples of a certain category.
[0069] There are two ways to weight:
[0070] 1) Inverse function
[0071] The simplest form of this method is to return the inverse of the distance, but when encountering exactly the same or very close points, the weight will become very large or even close to infinity; therefore, when calculating the inverse of the distance, a constant is usually added to the distance. This method will assign a large weight to the points in the neighborhood, and the weight value will decrease very quickly when it is slightly farther away. Although this is the expected result, this method will make the algorithm very sensitive to noisy data;
[0072] 2) Gaussian function
[0073] The Gaussian function overcomes the defects of the previous function. Its calculation form is shown in formula (17):
[0074]
[0075] Among them, a represents the height of the function curve, b represents the offset of the center line of the curve on the x-axis, and c is the width of the distance between half of the function peak value;
[0076] The difference between the Gaussian function and the inverse function is that the weight of the Gaussian function is 1 when the distance is 0, and the weight will decrease accordingly as the distance increases, but will not drop to 0; the weight of the inverse function will drop to 0 or below 0 when the distance increases to a certain extent; the maximum value of the Gaussian function is the vertex value, and it will not be 0 no matter how small it is, which can well overcome the influence of noise to a certain extent, so the present invention adopts the Gaussian function;
[0077] The weighted KNN classifier first obtains the sorted distance values, and then takes the K elements with the closest distance. It is slightly different when processing discrete data and numerical data. When processing discrete data, K data are treated differently with weights. The probability that the predicted result is the same as the label of the nth data is calculated as follows:
[0078]
[0079] When processing numerical data, instead of simply averaging the K data, a weighted average is performed; by multiplying the distance value of each item by the corresponding weight, then adding them up, and then dividing the sum by the sum of all weights. The calculation formula is as follows:
[0080]
[0081] Among them, D i Represents the distance between the neighboring point i and the predicted value x, W i Represents the weight of the i-th point.
[0082] Beneficial effects of this method:
[0083] 1. The constrained whale optimization algorithm proposes a spatial boundary strategy, which effectively solves the problems of premature convergence and local optimality in the whale optimization algorithm, thereby screening out more effective features and verifying its effectiveness in the liver cancer survival prediction dataset, providing a new technical solution for the correct classification of liver cancer survival prediction.
[0084] 2. The classification accuracy of the constrained whale optimization algorithm is 87.88%, while the accuracy of the non-whale optimization algorithm is 69.13%, which verifies the effectiveness of the constrained whale optimization algorithm in feature selection;
[0085] 3. The accuracy of the weighted KNN classifier using the Gaussian algorithm was 87.88%, which was significantly higher than the SVM algorithm (61.81%) and the integrated RUSboosted algorithm (69.1%), verifying the effectiveness of the weighted KNN classifier using the Gaussian algorithm in liver cancer survival classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] Figure 1 It is a flow chart of the liver cancer survival prediction method based on the constrained whale optimization algorithm of the present invention;
[0087] Figure 2 It is the accuracy comparison before and after feature processing;
[0088] Figure 3 It is the accuracy comparison of different classifiers;
[0089] Figure 4 It is a graph of the relationship between fitness value and number of iterations. DETAILED DESCRIPTION
[0090] The present invention is further described below in conjunction with the accompanying drawings and embodiments. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore it only shows the components related to the present invention.
[0091] like Figure 1 As shown, a liver cancer survival prediction method based on a constrained whale optimization algorithm includes the following steps:
[0092] S1. Data collection and preprocessing: Collect patients' medical qualitative indicators and medical quantitative indicators to establish a data set, and divide the data set into a training set and a test set in a ratio of 7:3;
[0093] In this example, the dataset collects data on liver cancer patients from the Hospital Affiliated to the University of Coimbra, involving areas such as demographics, risk factors, and labor analysis. A total of 165 liver cancer patients' feature data are collected. The dataset contains 49 features, which are collected according to the clinical practice guidelines of EASL-EORTC. The patients in the dataset are experimented with using the most appropriate treatment strategy. This is a heterogeneous dataset with 23 quantitative variables and 26 qualitative variables; missing data accounts for 10.22% of the entire dataset, and only 8 patients have complete information fields (4.85%). The survival target variable is encoded as a binary variable, with values of 0 and 1 indicating that the patient is not alive and alive, respectively; this work focuses on the 1-year survival prediction of liver cancer, so the category distribution of the dataset shows that 63 cases are marked as 0 (death) and the remaining 102 cases are marked as 1 (survival). The 49 features are shown in Table 1:
[0094] Table 1 23 quantitative variables and 26 qualitative variables
[0095]
[0096]
[0097] S2. Use the constrained whale optimization algorithm to select features of the data set. The settings of the constrained whale algorithm are as follows: the number of whales is set to 15, the number of iterations is set to 200, the optimization algorithm selects the KNN classifier, and takes 30% of the data as the training set.
[0098] S24, create a spatial constraint mechanism;
[0099] In the constrained whale optimization algorithm, the dimension of each solution is limited by two parameters: the maximum dimension (dmax) and the minimum dimension (dmin); a spatial pool is created to store the maximum dimension ratio fmax (the ratio of the maximum dimension to the total dimension) and the minimum dimension ratio fmin (the ratio of the minimum dimension to the total dimension). Without prior knowledge and experience, it is difficult to determine the initial optimal value; therefore, different fmax and fmin are pre-defined and stored in the spatial pool; in this embodiment, fmax is increased from 0.1 to 0.5 with a step size of 0.05, and the construction of the spatial pool is as follows;
[0100]
[0101] Space value = [00.1110.2220.3330.4440.5560.6670.7780.8891]
[0102] The spatial pool consists of multiple groups of maximum dimension ratios fmax and minimum dimension ratios fmin, each of which has a selected spatial value. By randomly selecting 3 groups of different dimension ratios from the spatial pool and comparing their spatial values, the group with the smallest spatial value is taken as the maximum and minimum dimension ratios, and applied to the best position of the whale, that is, the optimal solution.
[0103] S25, determining optimization parameters and fitness functions based on a specific feature selection method; using classification error rate (CEE) as an objective function to evaluate the performance of the features selected by the solution;
[0104] S26. According to the fitness function, the fitness of each whale, the optimal position of the individual, and the global optimal position of all whales are calculated, and the optimal position (optimal solution) of the whale is adjusted according to the spatial pool constraint;
[0105] S27, using the iteration of the whale to update the optimal position of each whale and the global optimal position, wherein the update of the spatial value is completed by the average value of the spatial value of the last iteration and the fitness value obtained by solving;
[0106] S28, repeat steps S22 to S27 until the maximum number of iterations is reached. The fitness value Fit changes with the number of iterations as shown in Figure 4 As shown;
[0107] S29, output the optimal solution, that is, the optimal feature combination; according to the order from top to bottom in Table 1, the features selected by the whale optimization algorithm are as follows:
[0108] selected_features = [127811141727 32333639404247 4849];
[0109] S3, classification using the optimal feature combination;
[0110] The present invention uses the whale optimization algorithm to select features to maximize the accuracy of liver cancer survival prediction. The classification result bar chart before and after feature processing is as follows: Figure 2 As shown, the classification accuracy of the constrained whale optimization algorithm is 87.88%, while the accuracy of directly using the weighted KNN algorithm to classify the data before feature processing is only 69.13%.
[0111] At the same time, in order to select a classifier that is more suitable for liver cancer survival prediction, the present invention compares the recognition effect of two data sets when using three different classifiers. Figure 3 As shown, the data recognition accuracy after feature processing by the whale optimization algorithm using weighted KNN in the present invention reaches 87.88%, which is significantly higher than that of the SVM and integrated RUSboosted algorithms.
[0112] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A liver cancer survival prediction method based on a constrained whale optimization algorithm, characterized in that: The following steps are involved: S1. Data collection and preprocessing: Collect patients' medical qualitative indicators and medical quantitative indicators to establish a data set, and divide the data set into a training set and a test set in proportion; S2. Use the constrained whale optimization algorithm to select features from the data set and obtain the optimal feature combination; Use the training set to build a classification model, and use the test set to verify the classification model; The constrained whale optimization algorithm includes: S21, surrounded prey; In the constrained whale optimization algorithm, assuming that the target prey is the best candidate location, the whale moves towards the best hunting agent as follows: ; Where X is the position of the whale, Xgb is the best hunting position, A and C are coefficient vectors, and t is the number of iterations; the calculation process of the coefficient vectors of A and C is as follows: ; in, and are two random vectors in the interval [0,1], is a parameter that decreases linearly from 2 to 0; S22, bubble net attack; Establish shrinking and encircling strategy and spiral position updating strategy; S23, search for prey; The constrained whale optimization algorithm performs a global search based on the change of the coefficient vector A. When the coefficient vector |A|>=1, the whale performs a random search outside the shrinking encirclement and updates the whale's position. The calculation process of the position update is as follows: ; Among them, Xr is the position of a whale randomly selected from the population, and D represents the absolute value of the distance between the search individual and Xr; S24, create a spatial constraint mechanism; First, create a spatial pool to store the maximum dimension ratio fmax and the minimum dimension ratio fmin, where fmax is the ratio of the maximum dimension to the total dimension; The minimum dimension ratio fmin is calculated as follows: ; in, is the total number of fmax in the spatial pool; In the spatial pool, a spatial value is initially assigned to a set of fmax and fmin. The spatial value is used to measure the quality of the maximum and minimum dimensions of this set. The lower the spatial value, the higher the quality of the set. The initial spatial values of all dimension ratio groups are initialized to 0 to 1. Secondly, the spatial pool is composed of multiple groups of maximum dimension ratios fmax and minimum dimension ratios fmin, each of which has a selected spatial value; by randomly selecting several groups of different dimension ratios from the spatial pool and comparing their spatial values, the group with the smallest spatial value is taken as the maximum dimension ratio and the minimum dimension ratio, and applied to the best position of the whale; Again, after selecting a set of dimensions in the spatial pool, the spatial bounding process follows, and for each solution, the maximum and minimum dimensions are calculated as follows: ; ; in, F is the total number of features, which is the sum of qualitative and quantitative indicators; fix and ceil are two rounding operators; two conditions need to be considered in this spatial boundary process: if the number of features of the solution exceeds the maximum dimension, it is adjusted to the maximum dimension range; if the number of features of the solution is less than the minimum dimension, it is adjusted to the minimum dimension range; Finally, update the spatial value. The update of the spatial value is completed by the average of the spatial value before this iteration and the fitness value obtained by solving the problem. For each solution, the total dimension is equal to the number of features, and each dimension represents the index of the corresponding feature. In each solution, the dimension is limited to the range of [0, 1]. In order to determine whether a feature will be selected, a static threshold of 0.5 is used, as shown in formula (15). ; in, is the i-th solution of dimension d, dimension d belongs to the total set of dimensions, and the set of solutions represents the selected feature set; S25, determining optimization parameters and fitness function based on a specific feature selection method; The classification error rate CEE is used as the objective function to evaluate the performance of the features selected by the constrained whale optimization algorithm. The fitness function Fit is as follows: ; That is, fitness value = number of classification errors / total number of samples; S26. According to the fitness function, the fitness value of each whale, the optimal position of the individual, and the global optimal position of all whales are calculated, and the optimal position of the whale is adjusted according to the spatial pool constraint; S27, using the iteration of whales to update the optimal position of each whale and the global optimal position; S28, repeat steps S22 to S27 until the maximum number of iterations is reached; S29, outputting the optimal feature combination; S3, classification using the optimal feature combination; The classification using the optimal feature combination is to use a weighted KNN classifier of a Gaussian function for classification prediction.
2. The method for predicting liver cancer survival based on the constrained whale optimization algorithm according to claim 1 is characterized in that: The shrink wrap strategy is to reduce To achieve the reduction The new position of the whale is arbitrarily defined within the interval between the original position and the best candidate position by setting the value of A to the interval [-1,1].
3. The method for predicting liver cancer survival based on the constrained whale optimization algorithm according to claim 2, characterized in that: The spiral update position strategy is that the whale updates its position according to the spiral ascending direction. The model is: ; Where E is the distance between the whale's position and the optimal hunting position, X is the whale's position, Xgb is the optimal hunting position, and b is a constant of 1, which is used to limit the shape of the spiral motion of the search individual; is a random number in the range of [-1,1]. When the coefficient vector |A|<1, the algorithm searches for individuals to wander in the shrinking encirclement. At this time, the search individuals will attack or encircle the prey with a 50% probability: ; Where p is a random variable in the interval [0,1].
