Survival prediction method for esophageal squamous cell carcinoma based on improved ant lion algorithm and BP neural network
By improving the ant lion algorithm and BP neural network, combined with PCA dimensionality reduction and cross mutation operator, the survival prediction model of esophageal squamous cell carcinoma was optimized, solving the problems of low diagnostic efficiency and complex calculation in the existing technology, and achieving a more efficient and stable Predict the results.
Patent Information
- Application Number
- CN202210358247.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-06
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-04-06
AI Technical Summary
The existing survival prediction methods for esophageal squamous cell carcinoma have low diagnostic efficiency and complex calculations. The optimized BP neural network has poor convergence ability and low accuracy.
The improved ant lion algorithm (IALO) and BP neural network were used to process esophageal squamous cell carcinoma data through PCA dimensionality reduction. Combining the cross mutation operator and nonlinear dynamic weight strategy, the ant lion algorithm was optimized to improve the convergence speed and accuracy of the model, and PCA was constructed. -IALO-BP model for survival prediction.
It significantly improves the diagnostic efficiency and accuracy of esophageal squamous cell carcinoma survival prediction, improves the feasibility and stability of the model, reduces the impact on dimensional changes, and enhances high-dimensional solving capabilities.
Smart Images

Figure CN114724705B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of survival prediction of esophageal squamous cell carcinoma, and in particular to a survival prediction method of esophageal squamous cell carcinoma based on an improved ant lion algorithm and a BP neural network. Background Art
[0002] In recent years, with the emergence of big data technology in the medical industry, the level of digitalization in the medical field has continued to improve, and the data on esophageal squamous cell carcinoma has become more comprehensive. The data on esophageal squamous cell carcinoma itself contains various hidden information and rules, and the significance of the data lies in the need for appropriate tools to more intuitively express the deep-level information. With the rapid development of big data technology, computer-assisted data mining and modeling have become a hot topic in the current diagnosis and treatment of esophageal squamous cell carcinoma. More and more countries around the world attach importance to the combination and application of big data technology and medical data technology.
[0003] The ability to quickly and effectively analyze and predict the survival level of patients with esophageal squamous cell carcinoma is the basis for achieving precision medical treatment for patients. The research on the prediction of the survival period of patients with esophageal squamous cell carcinoma is mainly based on clinical phenotypes and blood indicators. At present, the main methods for predicting the survival level of patients with esophageal squamous cell carcinoma at home and abroad include Elman neural network, regression analysis, linear support vector machine (SVM), etc. The bionic algorithms for optimizing BP neural networks can be divided into two categories: evolutionary algorithms and swarm intelligence algorithms. Evolutionary algorithms imitate the concept of evolution in nature. Among these algorithms, the most commonly used by researchers is genetic algorithm, which simulates the concept of Darwin's theory of evolution. In the idea of genetic algorithm, the optimization problem starts from a set of specific random solutions. After evaluating the solution through the objective function, the variables of the solution are modified according to the fitness value of the solution. Principal component analysis (PCA) is for data simplification, which can effectively reduce the dimension of blood indicators of patients with esophageal squamous cell carcinoma and the influence of redundant information in the blood. BP neural network is to establish a prediction model for the survival level of patients with esophageal squamous cell carcinoma. In order to optimize the poor convergence ability and low accuracy of BP neural network, many metaheuristics are currently used to optimize BP neural network.
[0004] The Antlion (ALO) algorithm is an intelligent algorithm designed by Australian scholar Mirjalili by imitating antlion larvae preying on ants. The ALO algorithm can enhance the diversity of the population. Summary of the invention
[0005] In view of the technical problems of low diagnostic efficiency and complex calculation of existing esophageal squamous cell carcinoma survival prediction methods, the present invention proposes an esophageal squamous cell carcinoma survival prediction method based on an improved ant lion algorithm and a BP neural network. The esophageal squamous cell carcinoma data is preprocessed based on PCA (principal component analysis), the ALO (ant lion optimization) algorithm is improved with a mutation operator and a nonlinear weight strategy, and a BP neural network model is constructed using the optimal weights and thresholds obtained by the improved ALO algorithm. The esophageal squamous cell carcinoma data is trained with the BP neural network model, which has good feasibility, significantly improved optimization accuracy and convergence speed, is little affected by dimensionality changes, and has stronger and more stable high-dimensional solution capabilities.
[0006] In order to achieve the above object, the technical solution of the present invention is implemented as follows: a method for predicting survival of esophageal squamous cell carcinoma based on an improved ant lion algorithm and a BP neural network, the steps of which are as follows:
[0007] Step 1: Use the PCA method to reduce the dimension of the collected esophageal squamous cell carcinoma data, and extract the characteristic values of the esophageal squamous cell carcinoma data by importance arrangement to form sample data;
[0008] Step 2: Determine the topological structure of the BP neural network based on the sample data, pre-process the sample data and input it into the BP neural network, and calculate the global error of the BP neural network;
[0009] Step 3: Add the crossover mutation operator and nonlinear dynamic weight to the standard ALO algorithm to obtain the IALO algorithm. Use the global error of step 2 as the fitness function of the IALO algorithm to save and update the position of the elite ant lion.
[0010] Step 4: Use the elite antlion individuals obtained in step 3 as the optimal weights and thresholds of the BP neural network to construct an esophageal cancer risk prediction model, and use the sample data to train the esophageal cancer risk prediction model. Use the trained esophageal cancer risk prediction model to perform survival analysis and prediction on esophageal squamous cell carcinoma data.
[0011] The PCA method calculates the covariance matrix of the matrix composed of esophageal squamous cell carcinoma data, and then obtains the eigenvalues and eigenvectors of the covariance matrix, and selects the matrix composed of the eigenvectors corresponding to the p eigenvalues with the largest eigenvalues as the sample data.
[0012] The method for obtaining sample data is as follows: composing esophageal squamous cell carcinoma data into a matrix X, and obtaining the covariance matrix of the matrix X; using linear algebra to obtain the eigenvalues and eigenvectors of the covariance matrix; calculating the variance contribution rate and cumulative variance contribution rate corresponding to each eigenvalue; arranging the variance contribution rate and cumulative variance contribution rate into a matrix according to the corresponding size from top to bottom, and the cumulative variance contribution rate T i ≥0.85, then select the data of the rows corresponding to the first p eigenvalues to form the matrix L;
[0013] The data after dimensionality reduction is
[0014] Among them, l pp represents the value of the pth index of the pth variable, x p Indicates the pth row of the matrix X that contains the esophageal squamous cell carcinoma data.
[0015] Each group of data of esophageal squamous cell carcinoma includes 17 kinds of blood index information and survival information; the 17 kinds of blood index information are white blood cell count, lymphocyte count, monocyte count, neutrophil count, eosinophil count, basophil count, red blood cell count, hemoglobin concentration, platelet count, total protein, albumin, globulin, prothrombin time, international normalized ratio, activated partial thromboplastin time, thrombin time, and fibrinogen; the survival information is survival time, and the range of survival time is 0.26 months to 137.00 months.
[0016] The input of the PCA method is 17 groups of data, and 5 groups of data are obtained after dimensionality reduction processing; the structure of the BP neural network is a 5-10-1 structure, that is, the input layer has 5 neurons, the hidden layer has 10 neurons, and the output layer is a 1-layer neural network.
[0017] The method for calculating the global error of the BP neural network in step 2 is:
[0018] S1. Normalizing each blood index information of each patient;
[0019] S2, using random numbers to randomly set the initial connection weight vector w between the hidden layer and the input layer of the BP neural network ih , the connection weight w between the hidden layer and the output layer ho , set the maximum number of cycles t max ;
[0020] S3, inputting the blood index of each patient as an input vector into the input layer of the BP neural network;
[0021] S4, calculating the Euclidean distance between the connection weight vector of the hidden layer and the input vector, and finding the neuron that is most similar to the input vector as the winning neuron h according to the size of the connection weight;
[0022] S5, labeling the winning neurons corresponding to the blood index until all blood indexes are input;
[0023] S6. Determine whether the global error meets the requirements: When the global error reaches the preset accuracy or the number of iterations is greater than the set maximum number t max, the global error is used as the fitness function of the IALO algorithm; otherwise, the next sample data and the corresponding expected output are selected, and steps S3 to S6 are executed cyclically.
[0024] The global error is:
[0025]
[0026] Among them, q is the number of input vectors in the BP neural network input layer, d o (K) is the expected input vector, m represents the number of input vectors, y o (K) is the actual input vector.
[0027] In the IALO algorithm, walking around the elite ant lion and walking around the ant lion selected by roulette are parallel searches;
[0028] The crossover mutation operator is reinitialized with a certain probability after each position update, that is, if rand>0.7, then x(i,:)=rands(1,D); where rand represents a random number between (0,1), x(i,:) represents the positions of all dimensional spaces of the i-th ant, and D represents the number of influencing factors;
[0029] The roulette wheel selection method is: the probability of individual selection
[0030] Among them, f i is the fitness of the individual, N represents the number of individuals in the population;
[0031] Define the obtained optimal antlion fitness value as the elite antlion, and assume that each ant randomly walks within the range of the roulette wheel and the elite antlion:
[0032] in, is the step length of the random walk of the ant selected by roulette in the tth iteration; is the step length of an ant randomly walking in the elite antlion colony in the tth iteration; represents the position of the i-th ant in the t-th iteration;
[0033] The implementation method of the nonlinear dynamic weight is: Where: ω_I is the adaptive weight; ω max is the maximum value of the weight; ω min is the minimum value of the weight, t represents the current number of iterations, T max Indicates the maximum number of iterations;
[0034] After the improvement, the position of the ants changes to:
[0035] In the IALO algorithm, the population of ants and ant lions is initialized, and the ant individuals, i.e., the esophageal cancer data, are used to represent the initial weights and thresholds of the BP neural network. The prediction error of the BP neural network initialized by the individual is used as the fitness value of the individual to determine the threshold and number of weights of the esophageal cancer risk prediction model;
[0036] Sort the obtained fitness values by size and select the best ant lion individual; compare the best ant lion individual and the elite ant lion individual obtained in each iteration. If the obtained best ant lion has a better fitness value than the elite ant lion group, replace the elite ant lion;
[0037] Determine whether the IALO algorithm has reached the maximum number of iterations initially set. If it has reached the maximum number of iterations, the output elite ant lion is the optimal weight and threshold corresponding to the BP neural network; if it has not reached the maximum number of iterations, the number of iterations is increased by 1, and the IALO algorithm is continued to cycle until the maximum number of iterations T is reached. max ;
[0038] In the training of the esophageal cancer risk prediction model, when the output population error is less than the set error, the calculation ends; otherwise, the calculation is repeated until the global error output by the BP neural network is less than the initial set error.
[0039] The esophageal squamous cell carcinoma survival prediction model is:
[0040]
[0041] Among them, RH is the prediction model for esophageal cancer survival; x i is the input layer of the BP neural network; ω ij and ν jl are the weights between the input layer and hidden layer, and between the hidden layer and output layer of the BP neural network; a j and b l They are the thresholds between the input layer and hidden layer, and between the hidden layer and output layer of the BP neural network respectively; tanh is the activation function of the hidden layer in the BP neural network, and q and m both represent the number of input vectors.
[0042] The invention performs PCA dimensionality reduction processing on esophageal cancer sample data, determines the values of the input layer, the hidden layer and the output layer of the BP neural network according to the processed data, and initializes the population of ants and ant lions, and uses the prediction error of the BP neural network initialized by the individual as the fitness value of the individual, and then determines the fitness function; sorts the obtained fitness values to select the optimal ant lion individual; compares the optimal ant lion individual and the elite ant lion individual obtained in each iteration, and if the optimal ant lion obtained in each iteration has a better fitness value than the elite ant lion group, replaces the elite ant lion group, optimizes all weights and thresholds of the entire BP neural network contained in each individual in the training set by using the IALO (improved ALO) algorithm, and saves and updates the elite ant lion by using crossover mutation and adaptive weights; when the maximum number of iterations set initially set is reached, the optimal weight corresponding to the ant lion elite is output; otherwise, returns to continue the cycle until the maximum number of iterations is reached; uses the optimized optimal weight and threshold to build a BP neural prediction model; and uses the BP neural network model that has been determined to perform survival analysis prediction on esophageal squamous cell carcinoma data.
[0043] The main idea of the improved algorithm (IALO) of the present invention is operator crossover mutation, which is a part of the differential evolution algorithm. The mutation operator is introduced into the ALO algorithm to enhance the diversity of the population, improve the global search ability of the ALO algorithm, avoid the ALO algorithm from falling into the local optimum, and construct a PCA-IALO-BP model to predict the survival level of patients with esophageal squamous cell carcinoma. And the present invention:
[0044] (1) PCA was used to reduce the dimensionality of blood indicators of patients with esophageal squamous cell carcinoma and remove redundancy.
[0045] (2) Using standard ALO, a PCA-ALO-BP prediction model was established.
[0046] (3) Improve the standard ALO algorithm and establish the PCA-IALO-BP prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 It is a schematic diagram of the overall process of the present invention.
[0049] Figure 2 The figure is a specific implementation flow chart of the present invention.
[0050] Figure 3 This is the convergence diagram of the F1-F7 function.
[0051] Figure 4 This is the convergence diagram of the F8-F13 function.
[0052] Figure 5 This is the convergence diagram of the F14-F23 function. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in 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. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] like Figure 1 As shown, the embodiment of the present invention provides a method for predicting survival of esophageal squamous cell carcinoma based on an improved ant lion algorithm and a BP neural network, and the steps are as follows:
[0055] Step 1: Use the PCA method to reduce the dimension of the collected esophageal squamous cell carcinoma data, arrange the reduced esophageal squamous cell carcinoma data by importance and extract eigenvalues to form sample data.
[0056] The data of multiple influencing factors of esophageal squamous cell carcinoma were processed by PCA analysis. The original data set of the present invention is 501 groups of data, each group of data includes 17 kinds of blood index information and survival information; the 17 kinds of blood index information are white blood cell count, lymphocyte count, monocyte, neutrophil count, eosinophil count, basophil count, red blood cell count, hemoglobin concentration, platelet count, total protein, albumin, globulin, prothrombin time, international normalized ratio, activated partial thromboplastin time, thrombin time, fibrinogen; the survival information refers to the survival time, and the range of the survival time is 0.26 months to 137.00 months.
[0057] The PCA method was used to process the esophageal squamous cell carcinoma data, and the processed sample data was divided into training data and test data. According to the PCA method, the data was processed for dimensionality reduction to find the most important change direction in descending order of importance, so as to reduce the dimension of the data of influencing factors of esophageal squamous cell carcinoma.
[0058] The PCA method of the present invention calculates the covariance matrix of the matrix composed of esophageal squamous cell carcinoma data, and then obtains the eigenvalues and eigenvectors of the covariance matrix, and selects the matrix composed of the eigenvectors corresponding to the p eigenvalues with the largest eigenvalue (i.e., the largest variance) as the sample data. The specific operation method of the PCA method is as follows:
[0059] The original data of esophageal squamous cell carcinoma are organized into a matrix P with i rows and j columns, where i represents 17 kinds of blood index information, namely white blood cell count, lymphocyte count, monocyte count, neutrophil count, eosinophil count, basophil count, red blood cell count, hemoglobin concentration, platelet count, total protein, albumin, globulin, prothrombin time, international normalized ratio, activated partial thromboplastin time, thrombin time and fibrinogen.
[0060] Find the covariance matrix of matrix P: The calculation formula for the covariance matrix of two-dimensional data is as follows:
[0061]
[0062] Among them, Cov(X,Y) is a one-dimensional covariance matrix, x i for all values in column i, is the mean value of the i-th column, y j for all values in the jth column, is the mean value of the jth column. The range of J is the number of sample data, X and Y are different columns in the matrix. n represents the number of columns of data.
[0063] If the data is j-dimensional, then the covariance matrix is
[0064]
[0065] When the covariance is positive, Cov(X 1 ,X 2 ) is positive, indicating that the matrix X 1 and X 2 It is a positive correlation. When the covariance is negative, Cov(X 1 ,X 2 ) is negative, indicating that the matrix X 1 and X 2 It is a negative correlation; when the covariance is 0, it means that the matrix X 1 and X 2 are independent of each other. Covariance Cov(X 1 ,X 1 ) is the variance of matrix X. When the sample data is n-dimensional data, their covariance is actually the covariance matrix (symmetric matrix).
[0066] The covariance matrix of esophageal squamous cell carcinoma data was calculated, and the eigenvalues and eigenvectors were obtained using linear algebra methods.
[0067] The variance contribution rate and cumulative variance contribution rate are obtained from the eigenvalues. The variance contribution rate is:
[0068]
[0069] Among them, Fi represents the variance contribution rate of the i-th row, λ i is the i-th eigenvalue, λ k is the kth eigenvalue.
[0070] Variance contribution rate F i It refers to the proportion of the variance of a principal component to the total variance, which is actually the proportion of a certain eigenvalue to the total amount of all eigenvalues. The larger the variance contribution rate, the stronger the information of the original variable contained in the principal component.
[0071] The cumulative variance contribution rate of the kth variable is
[0072]
[0073] Among them, λ k is the kth eigenvalue, and p is the critical variable.
[0074] The cumulative variance contribution rate determines the number of principal components to be selected. Generally, the cumulative variance contribution rate is required to reach more than 85% as the principal component, so as to ensure that the comprehensive variable can include most of the information of the original variable. The proportion of each component is obtained through the variance contribution rate and the cumulative variance contribution rate.
[0075] The variance contribution and cumulative variance contribution rate are arranged in rows from top to bottom according to the corresponding size into a matrix, that is, the cumulative variance contribution rate T i ≥0.85, then the data of the rows corresponding to the first p indicator variables are selected to form the matrix L.
[0076] The data after dimensionality reduction is Z = LX, and
[0077]
[0078] Among them, l pp represents the value of the pth index of the pth variable, x p represents the pth row of the original data, and each column in the matrix Z represents the eigenvector corresponding to the eigenvalue of the variable affecting the esophageal squamous cell carcinoma factor.
[0079] The input of the PCA method is 17 groups of data, 17 groups are the number of columns, 501 groups are the number of rows, and 5 groups of data are obtained after dimensionality reduction processing. They are white blood cell count, monocytes, neutrophils, PT, and INR international normalized ratio. The structure of the BP neural network is a 5-10-1 structure. The 5-10-1 structure refers to a neural network model with 5 neurons in the input layer, 10 neurons in the hidden layer, and 1 layer in the output layer.
[0080] Step 2: Determine the topological structure of the BP neural network based on the sample data, pre-process the sample data and input it into the BP neural network, and calculate the global error of the BP neural network.
[0081] The method of clustering blood indicators using BP neural network is:
[0082] S31. Use the "mapminmax" function to normalize the 501 patient information of i types of blood index information:
[0083]
[0084] Among them, x d,min is the minimum value of the dth blood index, x d,max is the maximum value of the dth blood index, x d is the dth blood index, and blood index p=(p 1 ,p 2 ,p 3 …,p m ), y d is the normalized value of the d-th blood index information.
[0085] S32, using random numbers to randomly set the vector w of the initial connection weight value between the hidden layer and the input layer ih and the connection weight w between the hidden layer and the output layer ho , set the maximum number of cycles T max .
[0086] S33, input the blood index as an input vector to the input layer, input vector p = (p 1 ,p 2 ,p 3 …,p m ), where the training sample K a =(K a,1 ,K a,2 ,K a,3 ,…,K a,501 ).
[0087] S34, calculate the Euclidean distance between the weight vector of the hidden layer and the input vector: select a set of training samples x i =(x i,1 ,x i,2 ,x i,3 ,…,x i,501 ), each time the training data is input, the neuron that is closest to the input vector is found as the winning neuron h through the size of the connection weight, and the error function E is defined 1 is the distance between the input vector and the connection weight vector:
[0088]
[0089] Error function E 1The function is to calculate the initial weights and thresholds, q represents the number of input vectors in the input layer, d o (1) is the initial expected input vector, y o (1) is the actual initial input vector.
[0090] S35, label the winning neurons corresponding to the blood index, blood index type p+1, and return to step S34 until all blood indexes are input;
[0091] S36, judging whether the global error meets the requirements: when the error reaches the preset accuracy or the number of learning times is greater than the set maximum number of times t max , the algorithm ends and the global error value is used as the fitness function of the IALO algorithm. Otherwise, the next learning sample and the corresponding expected output are selected, and steps S33 to S36 are executed cyclically. The global error is:
[0092]
[0093] Among them, m is the number of input vectors, d is the number of o (K) is the expected input vector, y o (K) is the actual input vector.
[0094] Step 3: Use the global error of step 2 as the fitness function of the IALO algorithm, add the crossover mutation operator and nonlinear dynamic weight to the standard ALO algorithm to obtain the IALO algorithm, and save and update the position of the elite ant lion.
[0095] like Figure 2 As shown, the initial parameters are set, the sample data is processed by PCA method for dimensionality reduction, the fitness function is the called benchmark function, and the walk around the elite ant lion and the walk around the ant lion selected by roulette are parallel searches, T max Indicates the maximum number of iterations.
[0096] The influencing factors and data of IALO-BP esophageal squamous cell carcinoma are used as the thresholds and weights of the initial BP neural network. The individual fitness is calculated through the fitness function, and the individual corresponding to the optimal fitness value is found through the ant lion optimization algorithm, that is, the optimal threshold and weight are found, and the optimal solution is found.
[0097] The Antlion Optimization Algorithm is an intelligent algorithm proposed based on the hunting mechanism principle of a single-handed larva trapping ants. The standard Antlion Optimization (ALO) algorithm is based on the interaction between antlions and ants, using the fact that antlions with larger cone pits or holes are more likely to capture ants and have higher fitness values. In the ALO algorithm, the positions of antlions and ants are randomly initialized, and
[0098]
[0099] Among them, X(t) represents the position of the ant, cumsum is the cumulative sum function, t is the current iteration number, T max represents the maximum number of iterations, and r(t) is a random function defined as follows:
[0100]
[0101] Here, rand is a random number uniformly distributed in the interval [0,1].
[0102] Initialize the population of ants and ant lions in the Ant Lion Optimization Algorithm (ALO algorithm), and the random walks of ant lions and ants are based on formula (7). Ants update their positions in a random walk in each step of optimization. Since each search space has a boundary (the range of variables), formula (7) cannot be used directly to update the positions of ants. In order to keep the random walk within the search space, the following formula is used to normalize formula (7):
[0103]
[0104] Among them, a k and b k are the minimum and maximum values of the random walk of the kth ant; and are the minimum and maximum values of the kth ant at the tth iteration respectively. It is represented as the position of the kth ant after the tth iteration.
[0105] Walking around a selected antlion According to the currently proposed mechanism, antlions are able to build traps proportional to their fitness, and ants need to move randomly. However, once the ants realize that there are ants in the trap, they eject sand from the center of the pit outwards, a behavior that slides off trapped ants that try to escape. To mathematically model this behavior, the radius of the ant's random walk hypersphere is adaptively reduced. In this regard, the following equation is proposed:
[0106]
[0107]
[0108] constant t is the current iteration number, T max is the total number of iterations, and ω is a constant. t is the minimum value of all variables at the tth iteration, d t is the maximum value of all variables at the tth iteration.
[0109] The random walk of ants is affected by the ant traps. To mathematically model this hypothesis, the following equation was proposed:
[0110]
[0111]
[0112] Among them, c t and d t They represent the minimum and maximum values of all data variables at the tth iteration respectively. represents the position of the kth ant lion in the nth iteration. These two equations ensure the effectiveness of the attack by reducing the radius of the ants. The elite ant lion obtained by fitness calculation is compared with the best ant lion obtained in each iteration by formula (17). If the best ant lion obtained in each iteration has a larger fitness value than the elite ant lion, the elite ant lion is replaced. This selection procedure ensures that the ant is suitable for the ant lion.
[0113]
[0114] In the formula, represents the position of the jth antlion at the tth iteration, represents the position of the t-th ant at the j-th iteration.
[0115] Introducing operator crossover mutation: The basic idea is to reinitialize with a certain probability after each position update. The pseudo code is as follows:
[0116]
[0117] Wherein, rand represents a random number between (0, 1); x(i,:) represents the position of the ant in all dimensions; D represents the number of influencing factors, which is 5 in the present invention.
[0118] The roulette search method is used, and the individual selection probability is expressed using the following formula:
[0119]
[0120] Among them, P i is the individual's choice probability, f i is the fitness of the individual, and N is the number of individuals in the population.
[0121] The cumulative probability of an individual is:
[0122]
[0123] If the fitness value of an individual is high, the probability of individual selection will be greater. By calculating Q(x i) and the minimum value obtained after sorting is defined as the elite ant lion. Here, it is assumed that each ant randomly walks in the range of the roulette wheel and the elite ant lion. The formula is as follows:
[0124]
[0125] In the formula, is the step length of the random walk of the ant selected by roulette in the tth iteration; is the step length of an ant randomly walking in the elite antlion colony in the tth iteration; AntP i t Indicates the position of the i-th ant in the t-th iteration. The NDSW (nonlinear dynamic weight strategy) is introduced into the local development performance of the standard ALO algorithm to improve the constraint speed of the ALO algorithm. The formula is as follows:
[0126]
[0127] Where: ω_I is the adaptive weight; ω max is the maximum value of the weight; ω min is the minimum value of the weight, t represents the current number of iterations and T max Indicates the maximum number of iterations. In the ALO algorithm, the maximum weight is set to ω max =1, the minimum weight is set to ω min =0.001. The improved formula for the change of ant position is as follows:
[0128]
[0129] The introduction of NDSW will improve the global search performance of the ALO algorithm and the local development performance of the ALO algorithm, thereby improving the constraint speed of the ALO algorithm.
[0130] Initialize the population of ants and ant lions, use individual ants (i.e. esophageal cancer data) to represent the initial weights and thresholds of the BP neural network, use the prediction error of the BP neural network initialized by the individual as the fitness value of the individual, and determine the threshold and number of weights of the esophageal cancer risk prediction model.
[0131] Update elite ant lions: Sort by the obtained fitness and select the best ant lion individuals; compare the best ant lion individuals and elite ant lion individuals obtained in each iteration. If the best ant lion obtained in each iteration has a better fitness value than the elite ant lion group, replace the elite ant lion. The position of the elite ant lion is saved and updated through the crossover mutation operator and nonlinear dynamic weight.
[0132] Determine whether the IALO algorithm has reached the maximum number of iterations T set initially max, if the maximum number of iterations T set has been reached max , then the output ant lion elite is the optimal weight and threshold corresponding to the BP neural network. If it is not reached, the number of iterations is increased by 1, and the IALO algorithm is continuously calculated until the maximum number of iterations T is reached. max .
[0133] Step 4: Use the elite antlion individuals obtained in step 3 as the optimal weights and thresholds of the BP neural network to construct an esophageal cancer risk prediction model, and use the sample data to train the esophageal cancer risk prediction model. Use the trained esophageal cancer risk prediction model to perform survival analysis and prediction on new esophageal squamous cell carcinoma data.
[0134] The optimal elite ant lion individual obtained by the IALO algorithm is used as the optimal weight and threshold of the BP neural network. When the output error is less than the set error, the calculation ends. Otherwise, the above process is calculated repeatedly until the error output by the BP neural network is less than the initial set error, and the calculation is terminated. The BP neural network model that has been determined is used to perform survival analysis and prediction on esophageal squamous cell carcinoma data.
[0135] As the initial weights and thresholds to construct a BP neural network, the data Z of the influencing factors of esophageal squamous cell carcinoma after dimension reduction (the sample data processed by the PCA method in step 1) is substituted into the BP neural network for training, and the global error is used for the fitness function of the IALO algorithm. The basic idea of the present invention is to use the initial weights and thresholds of the individual representative BP neural network and the prediction error of the BP neural network initialized by the individual value as the fitness value of the individual, and find the optimal solution through training, that is, the optimal individual is used as the initial weight of the optimal BP neural network.
[0136] The improved ant lion algorithm is used to optimize the BP neural network weights and global errors, and sigmoid is selected as the kernel function to train the sample data. The implementation method of establishing the esophageal cancer risk prediction model is as follows:
[0137] S1: Initialize the population, encode the individuals in the population, use the gene sequence as weights and errors, and generate a random population.
[0138] S2: Set the maximum number of iterations T max , use the PCA method to optimize and screen the individuals in the population, divide the sample data into training samples and test samples, the training samples are used for training, and the test samples are used to test the established model. The training samples are trained, and the fitness of the individuals in the population is calculated through the fitness function.
[0139] S3: When the optimal individual in the population reaches the termination iteration, the optimization process is exited and the optimal solution is obtained. Step S5 is executed, otherwise step S4 is executed.
[0140] S4: Perform fitness value comparison on the contemporary surviving population, compare the elite ant lion group with the best ant lion obtained in each iteration, if the best ant lion obtained in each iteration has a larger fitness value than the elite ant lion group, replace the elite ant lion group and execute step S3.
[0141] S5: Get the optimal weight and the optimal global error, and bring the optimal weight and the optimal global error into the BP neural network. Through the determined BP neural network model, the survival prediction model of esophageal squamous cell carcinoma is constructed, and thus the model is proposed:
[0142]
[0143] Among them, RH is the prediction model for esophageal cancer survival; x i is the input layer of the BP neural network; ω ij and ν jl are the weights between the input layer and hidden layer, and between the hidden layer and output layer of the BP neural network; a j and b l They are the thresholds between the input layer and hidden layer, and between the hidden layer and output layer of the BP neural network respectively; tanh is the activation function of the hidden layer in the BP neural network, and the domain and range of the function are (-∞, +∞) and (-1, +1) respectively.
[0144] Variable definition:
[0145] Input vector: p = (p 1 ,p 2 ,p 3 …,p m ) (twenty one)
[0146] Hidden layer input vector: hi = (hi 1 ,hi 2 ,…,hi c ) (twenty two)
[0147] Hidden layer output vector: ho = (ho 1 ,ho 2 ,…,ho c ) (twenty three)
[0148] Output layer input vector: yi=(yi 1 ,yi 2 ,…,yi q ) (twenty four)
[0149] Output layer output vector: yo = (yo 1 ,yo 2 ,…,yo q ) (25)
[0150] Expected output vector: do = (d 1 ,d 2 ,…,d q ) (26)
[0151] Number of sample data: K i =(K i,1 ,K i,2 ,K i,3 ,…,K i,501 ,) (27)
[0152] Among them, p is the sample data after dimensionality reduction, the hidden layer input vector = each input vector related to it * the connection weight between the input layer and the hidden layer, the output vector of the hidden layer is used as the input vector of the output, and the output layer output vector = the output layer input vector related to it * the connection weight between the hidden layer and the output layer.
[0153] Parameter initialization of BP neural network: set the number of nodes in the input layer, hidden layer, and output layer of the BP neural network to n, c, and q.
[0154] Assign a random number in the interval (-1,1) to each connection weight, and give the error function E 1 , given the calculation accuracy value and the maximum number of learning times T max , the error function is:
[0155]
[0156] Among them, d o (K) is the expected output function, yo(K) is the actual output function
[0157] Randomly select the Kth sample data and the corresponding expected output. The input sample data and the corresponding expected output are:
[0158] p(K)=(p 1 (K),p 2 (K),…,p m (K)) (29)
[0159] d o (K)=(d 1 (K),d 2 (K),…,d q (K)) (30)
[0160] Calculate the input and output of each neuron in the hidden layer
[0161]
[0162] ho h (K) = f(hi h(K))h=1,2,…,p (32)
[0163]
[0164] yo o (K) = f(yi o (K))o=1,2,…q (34)
[0165] Among them, w ih is the connection weight between the input layer and the hidden layer, w ho is the connection weight between the hidden layer and the output layer, b h is the threshold of each neuron in the hidden layer, b o is the threshold of each neuron in the output layer, and f() is the activation function sigmoid function.
[0166] Using the expected output and actual output of the network, calculate the partial derivative of the error function with respect to each neuron in the output layer (find the lowest point in the error surface), and calculate the partial derivative formula of the error function with respect to each neuron in the output layer:
[0167]
[0168]
[0169]
[0170] Using the connection weights from the hidden layer to the output layer, the δ o (k) and the output of the hidden layer to calculate the partial derivative δ of the error function with respect to each neuron in the hidden layer h (k):
[0171]
[0172]
[0173]
[0174]
[0175] Using the δ of each neuron in the output layer o (k) and the output of each neuron in the hidden layer to modify the link weight w ho (k):
[0176]
[0177]
[0178] Using the δ of each neuron in the hidden layer h (k) and the input-corrected connection weights of each neuron in the input layer.
[0179]
[0180]
[0181] Calculate the global error
[0182]
[0183] when At this time, Δw ho <0 (47)
[0184] When the partial derivative of the error with respect to the weight is greater than zero, the weight adjustment is negative, the actual output is greater than the expected output, and the weight is adjusted in the direction of reduction, so that the difference between the actual output and the expected output is reduced.
[0185] when At this time, Δw ho >0 (48)
[0186] When the partial derivative of the error with respect to the weight is less than 0, the weight adjustment amount is positive, the actual output is less than the expected output, and the weight is adjusted in the direction of increase so that the difference between the actual output and the expected output is reduced.
[0187] Determine whether the network error meets the requirements. When the error reaches the preset accuracy or the number of learning times is greater than the set maximum number, the algorithm ends and the global error value calculated by formula (46) is used for the fitness function of the IALO algorithm. Otherwise, select the next learning sample and the corresponding expected output to enter the next round of learning.
[0188] The error between the network and the expected output is calculated by formula (48), and the weights and thresholds are updated using formulas (42), (43), (44), and (45). The 5-dimensional test data after PCA dimension reduction is substituted into the trained BP neural network model to predict the survival of esophageal cancer patients.
[0189] Function test experiment and result analysis:
[0190] (1) Parameter settings:
[0191] The present invention selects the Ant Lion Optimization Algorithm (ALO), the Salp Squid Algorithm (SSA), the Adaptive Ant Lion Optimization Algorithm (AALO), the Mutation Operator Ant Lion Optimization Algorithm (MALO) and the Dragonfly Algorithm (DA). In order to make the algorithm fair, the population and the number of iterations of the compared algorithms are set to be unified. The population is set to 30 and the number of iterations is set to 500.
[0192] (2) Test function:
[0193] The present invention selects 23 benchmark functions to conduct comparative analysis on 6 algorithms, 1-8 are single-peak benchmark functions, 9-14 are multi-peak functions, and 14-23 are mixed functions.
[0194] Table 1 Benchmark function test
[0195]
[0196]
[0197] (3) Experimental results and analysis
[0198] The Ant Lion Optimization Algorithm (ALO), Salp Sciate Algorithm (SSA), Adaptive Ant Lion Optimization Algorithm (AALO), Mutation Operator Ant Lion Optimization Algorithm (MALO) and Dragonfly Algorithm (DA) were selected to compare the results of function optimization with the Improved Ant Lion Optimization Algorithm (IALO) of the present invention to verify the performance of the IALO algorithm. The mean value and standard deviation of the fitness of the benchmark function are calculated respectively. The mean value can reflect the optimization accuracy of each algorithm, and the standard deviation can intuitively reflect the robustness and stability of each algorithm. According to the experimental results, it can be seen that for all test functions F1-F23, the mean value and standard deviation of the IALO algorithm of the present invention are all significantly better than those of ALO, SSA, AALO, MALO and DA algorithms. Figure 3 , Figure 4 , Figure 5 As shown in Table 2, except for some functions, the convergence curves of the IALO algorithm are larger than those of other algorithms. The remaining convergence curves of the IALO algorithm are better than those of other algorithms, and it shows that the IALO algorithm has fast optimization speed and high stability.
[0199] Table 2 Results of test functions
[0200]
[0201] The present invention uses PCA to reduce the dimension of esophageal squamous cell carcinoma data; initializes relevant parameters, processes sample data, and determines the fitness function of the IALO algorithm by initializing the initial weights and thresholds of the BP neural network under the premise of determining the topological structure of the BP neural network; initializes the population of ants and ant lions; sorts by fitness; saves and updates the elite ant lions by crossover mutation and adaptive weights; when the maximum number of iterations set initially is reached, the optimal weight corresponding to the ant lion elite is output. If not reached, the number of iterations is increased by 1, and the cycle is returned to continue until the maximum number of iterations is reached; the BP neural network is constructed using the optimal weights and thresholds; the network and expected output errors are calculated, and when the output error is less than the set error, the calculation is terminated, and the trained BP neural network is used for survival prediction of esophageal squamous cell carcinoma.
[0202] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A survival prediction method for esophageal squamous cell carcinoma based on improved ant lion algorithm and BP neural network, characterized in that: The steps are as follows: Step 1: Use the PCA method to reduce the dimension of the collected esophageal squamous cell carcinoma data, and extract the characteristic values of the esophageal squamous cell carcinoma data by importance arrangement to form sample data; Step 2: Determine the topological structure of the BP neural network based on the sample data, pre-process the sample data and input it into the BP neural network, and calculate the global error of the BP neural network; Step 3: Add the crossover mutation operator and nonlinear dynamic weight to the standard ALO algorithm to obtain the IALO algorithm. Use the global error of step 2 as the fitness function of the IALO algorithm to save and update the position of the elite ant lion. In the IALO algorithm, walking around the elite ant lion and walking around the ant lion selected by roulette are parallel searches; The crossover mutation operator is reinitialized with a certain probability after each position update, that is, if rand>0.7, then x(i,:)=rands(1,D); where rand represents a random number between (0,1), x(i,:) represents the positions of all dimensional spaces of the i-th ant, and D represents the number of influencing factors; The roulette wheel selection method is: the probability of individual selection Among them, f i is the fitness of the individual, N represents the number of individuals in the population; Define the obtained optimal antlion fitness value as the elite antlion, and assume that each ant randomly walks within the range of the roulette wheel and the elite antlion: in, is the step length of the random walk of the ant selected by roulette in the tth iteration; is the step length of an ant randomly walking in the elite antlion colony in the tth iteration; AntP i t represents the position of the i-th ant in the t-th iteration; The implementation method of the nonlinear dynamic weight is: Where: ω_I is the adaptive weight; ω max is the maximum value of the weight; ω min is the minimum value of the weight, t represents the current number of iterations, T max Indicates the maximum number of iterations; After the improvement, the position of the ants changes to: Step 4: Use the elite antlion individuals obtained in step 3 as the optimal weights and thresholds of the BP neural network to construct an esophageal cancer risk prediction model, and use the sample data to train the esophageal cancer risk prediction model. Use the trained esophageal cancer risk prediction model to perform survival analysis and prediction on esophageal squamous cell carcinoma data.
2. The method for predicting survival of esophageal squamous cell carcinoma based on improved ant lion algorithm and BP neural network according to claim 1, characterized in that: The PCA method calculates the covariance matrix of the matrix composed of esophageal squamous cell carcinoma data, and then obtains the eigenvalues and eigenvectors of the covariance matrix, and selects the matrix composed of the eigenvectors corresponding to the p eigenvalues with the largest eigenvalues as the sample data.
3. The method for predicting survival of esophageal squamous cell carcinoma based on improved ant lion algorithm and BP neural network according to claim 2, characterized in that: The method for obtaining the sample data is as follows: composing the esophageal squamous cell carcinoma data into a matrix X, and obtaining the covariance matrix of the matrix X; using a linear algebra method to obtain the eigenvalue and eigenvector of the covariance matrix; Calculate the variance contribution rate and cumulative variance contribution rate corresponding to each eigenvalue; arrange the variance contribution and cumulative variance contribution rate into a matrix from top to bottom according to the corresponding size, and the cumulative variance contribution rate T i ≥0.85, then select the data of the rows corresponding to the first p eigenvalues to form the matrix L; The data after dimensionality reduction is Among them, l pp represents the value of the pth index of the pth variable, x p Indicates the pth row of the matrix X that contains the esophageal squamous cell carcinoma data.
4. The method for predicting survival of esophageal squamous cell carcinoma based on the improved ant lion algorithm and BP neural network according to any one of claims 1 to 3, characterized in that: Each group of data of esophageal squamous cell carcinoma includes 17 kinds of blood index information and survival information; the 17 kinds of blood index information are white blood cell count, lymphocyte count, monocyte count, neutrophil count, eosinophil count, basophil count, red blood cell count, hemoglobin concentration, platelet count, total protein, albumin, globulin, prothrombin time, international normalized ratio, activated partial thromboplastin time, thrombin time, and fibrinogen; the survival information is survival time, and the range of survival time is 0.26 months to 137.00 months.
5. The method for predicting survival of esophageal squamous cell carcinoma based on improved ant lion algorithm and BP neural network according to claim 4, characterized in that: The input of the PCA method is 17 groups of data, and 5 groups of data are obtained after dimensionality reduction processing; the structure of the BP neural network is a 5-10-1 structure, that is, the input layer has 5 neurons, the hidden layer has 10 neurons, and the output layer is a 1-layer neural network.
6. The method for predicting survival of esophageal squamous cell carcinoma based on improved ant lion algorithm and BP neural network according to claim 5, characterized in that: The method for calculating the global error of the BP neural network in step 2 is: S1. Normalize each blood index information of each patient; S2, using random numbers to randomly set the initial connection weight vector w between the hidden layer and the input layer of the BP neural network ih , the connection weight w between the hidden layer and the output layer ho , set the maximum number of cycles t max ; S3, inputting the blood index of each patient as an input vector into the input layer of the BP neural network; S4, calculating the Euclidean distance between the connection weight vector of the hidden layer and the input vector, and finding the neuron that is most similar to the input vector as the winning neuron h according to the size of the connection weight; S5, labeling the winning neurons corresponding to the blood index until all blood indexes are input; S6. Determine whether the global error meets the requirements: When the global error reaches the preset accuracy or the number of iterations is greater than the set maximum number t max , the global error is used as the fitness function of the IALO algorithm; otherwise, the next sample data and the corresponding expected output are selected, and steps S3 to S6 are executed cyclically.
7. The method for predicting survival of esophageal squamous cell carcinoma based on improved ant lion algorithm and BP neural network according to claim 6, characterized in that: The global error is: Among them, q is the number of input vectors in the BP neural network input layer, d o (K) is the expected input vector, m represents the number of input vectors, y o (K) is the actual input vector.
8. The method for predicting survival of esophageal squamous cell carcinoma based on improved ant lion algorithm and BP neural network according to claim 1, characterized in that: In the IALO algorithm, the population of ants and ant lions is initialized, and the ant individuals, i.e., the esophageal cancer data, are used to represent the initial weights and thresholds of the BP neural network. The prediction error of the BP neural network initialized by the individual is used as the fitness value of the individual to determine the threshold and number of weights of the esophageal cancer risk prediction model; Sort the obtained fitness values by size and select the best ant lion individual; Compare the best ant lion individual and the elite ant lion individual obtained in each iteration. If the best ant lion obtained has a better fitness value than the elite ant lion group, replace the elite ant lion; Determine whether the IALO algorithm has reached the maximum number of iterations initially set. If it has reached the maximum number of iterations, the output elite ant lion is the optimal weight and threshold corresponding to the BP neural network; if it has not reached the maximum number of iterations, the number of iterations is increased by 1, and the IALO algorithm is continued to cycle until the maximum number of iterations T is reached. max ; In the training of the esophageal cancer risk prediction model, when the global error of the output is less than the set error, the calculation ends; otherwise, the calculation is repeated until the global error of the BP neural network output is less than the initial set error.
9. The method for predicting survival of esophageal squamous cell carcinoma based on improved ant lion algorithm and BP neural network according to claim 1, 6, 7 or 8, characterized in that: The esophageal squamous cell carcinoma survival prediction model is: Among them, RH is the prediction model for esophageal cancer survival; x i is the input layer of the BP neural network; ω ij and ν jl are the weights between the input layer and hidden layer, and between the hidden layer and output layer of the BP neural network; a j and b l They are the thresholds between the input layer and hidden layer, and between the hidden layer and output layer of the BP neural network respectively; tanh is the activation function of the hidden layer in the BP neural network, and q and m both represent the number of input vectors.
Citation Information
Patent Citations
Bearing fault diagnosis method based on improved ant lion algorithm and support vector machine
CN110006649A
Medium and long term runoff prediction method and system based on linear discriminant analysis and IALO-ELM
CN113435628A
