Diabetes index data classification method and system based on adaptive heterogeneous differential evolution algorithm, and terminal
Through the adaptive heterogeneous differential evolution algorithm, the feature selection and hyperparameter optimization are simultaneously solved, and the problem of inability to accurately classify diabetes index data in the existing technology is solved, achieving higher classification accuracy and model performance.
Patent Information
- Application Number
- CN202510131447.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-06
- Publication Date
- 2025-03-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
There is a lack of a hybrid optimization framework that can simultaneously perform feature selection and hyperparameter optimization in the prior art, resulting in the inability to accurately classify diabetes index data.
Using a method based on an adaptive heterogeneous differential evolution algorithm, the initial individual is randomly generated through a hybrid coding scheme, including hyperparameter configuration and feature selection strategy, and iterative optimization is performed until the preset termination conditions are met, and the target feature selection and hyperparameter configuration are obtained.
The coordinated optimization of feature selection and hyperparameter optimization is realized, which reduces the data dimension, improves the model performance, and significantly improves the classification accuracy of diabetes index data.
Smart Images

Figure CN119557717A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a diabetes index data classification method, system, terminal and computer-readable storage medium based on an adaptive heterogeneous differential evolution algorithm. Background Art
[0002] With the development of data mining and machine learning technologies, how to classify diabetes indicator data has become a research hotspot of common concern in the medical and computer communities. Existing technologies mainly include traditional machine learning models, ensemble learning models, and neural network models. In order to improve classification accuracy, researchers mainly conduct research from two directions: feature selection and model optimization. Feature selection, as an important data preprocessing technology, can filter out the most relevant feature subsets from the original data, which can not only reduce the data dimension and reduce the impact of noise, but also improve the classification accuracy of the algorithm. Model optimization adjusts the learning algorithm to better capture the potential patterns in the data.
[0003] However, existing feature selection and hyperparameter optimization are usually treated as independent processes and processed sequentially. This approach may ignore the potential synergistic effects between feature subsets and hyperparameters. At the same time, traditional optimization methods are inefficient when exploring high-dimensional hyperparameter spaces and have difficulty effectively identifying the global optimal solution. Existing feature selection methods mostly rely on a single evaluation metric and fail to fully consider the diversity and robustness of feature subsets. They are prone to overfitting problems when processing high-dimensional data. That is, there is currently a lack of a hybrid optimization framework that can perform feature selection and hyperparameter optimization simultaneously, making it impossible to accurately classify diabetes indicator data.
[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0005] The main purpose of the present invention is to provide a diabetes indicator data classification method, system, terminal and computer-readable storage medium based on an adaptive heterogeneous differential evolution algorithm, aiming to solve the problem in the prior art that there is a lack of a hybrid optimization framework that can simultaneously perform feature selection and hyperparameter optimization, and that diabetes indicator data cannot be accurately classified.
[0006] To achieve the above object, the present invention provides a diabetes indicator data classification method based on an adaptive heterogeneous differential evolution algorithm, and the diabetes indicator data classification method based on an adaptive heterogeneous differential evolution algorithm comprises the following steps: Setting a first initial parameter and a second initial parameter of the differential evolution algorithm, randomly generating an initial individual using a hybrid coding scheme according to the first initial parameter, and obtaining a hyperparameter configuration and a feature selection strategy contained in the initial individual; According to the feature selection strategy, corresponding initial features are selected from the initial diabetes indicator data set, and the initial features and the hyperparameter configuration are input into the machine learning model for training and evaluation to obtain evaluation results; Inputting the evaluation result and the initial feature into a fitness function for calculation to obtain individual fitness, and adaptively adjusting the second initial parameter according to the hyperparameter configuration, the feature selection strategy and the individual fitness to obtain an adjusted second parameter; According to the adjusted second parameter, the initial individual is mutated to generate a mutant individual, and the mutant individual is combined with the initial individual to obtain a test individual, and according to the individual fitness, a new individual is selected from the initial individual and the test individual; Using the new individual to iterate the next round of adaptive heterogeneous differential evolution until the current number of iterations meets a preset termination condition, thereby obtaining a target individual; Obtaining a target hyperparameter configuration and a target feature selection strategy contained in the target individual, selecting a corresponding target feature in the initial diabetes indicator data set according to the target feature selection strategy, and obtaining a target classification model according to the target hyperparameter configuration; The target feature value of the user to be predicted is obtained, the target feature value is input into the target classification model for calculation, and the classification result of the target feature value is output.
[0007] Optionally, in the diabetes indicator data classification method based on the adaptive heterogeneous differential evolution algorithm, the first initial parameter includes the population size, the maximum number of iterations and the upper and lower bounds, and the second initial parameter includes the initial scaling factor and the initial crossover probability; The step of randomly generating an initial individual using a hybrid coding scheme according to the first initial parameter specifically includes: Iterate according to the maximum number of iterations within the range of the upper and lower bounds to obtain an iteration result; A hybrid coding scheme is used to randomly generate a plurality of initial individuals for the iteration result, wherein the number of the initial individuals is equal to the population size, and each of the initial individuals represents a combined solution of a hyperparameter configuration and a feature selection strategy.
[0008] Optionally, in the diabetes indicator data classification method based on the adaptive heterogeneous differential evolution algorithm, the evaluation result includes an average recall rate and a characteristic state; The step of inputting the evaluation result and the initial feature into a fitness function for calculation to obtain individual fitness specifically includes: A fitness function based on recall rate and feature state is pre-constructed, and the average recall rate and feature state are substituted into the fitness function to calculate the individual fitness. : ; in, and denote the first weight and the second weight respectively, represents the average recall rate, represents the regularization strength, represents the number of features, represents the ordinal number of the feature, Indicates The feature state of a feature, wherein the feature state takes a value of 0 or 1, 1 indicates that the feature is selected, and 0 indicates that the feature is not selected.
[0009] Optionally, the diabetes indicator data classification method based on the adaptive heterogeneous differential evolution algorithm, wherein the second initial parameter is adaptively adjusted according to the hyperparameter configuration, the feature selection strategy and the individual fitness to obtain the adjusted second parameter, specifically includes: Respectively calculating a first entropy value corresponding to the hyperparameter configuration and a second entropy value corresponding to the feature selection strategy; The first entropy value and the second entropy value are weighted averaged to obtain the population diversity: ; in, represents the diversity of the population, represents the first entropy value, represents the second entropy value, and respectively represent the weight of the first entropy value and the weight of the second entropy value; The initial scaling factor, the initial crossover probability and the individual fitness are adaptively adjusted according to the population diversity to obtain an adjusted scaling factor and an adjusted crossover probability: ; ; in, Indicates Substitute the adjusted scaling factor, represents the scaling factor of the previous iteration, represents the initial scaling factor, represents the number of iterations of the inner loop, represents the switching probability between two mutation types, Indicates The fitness of the individual, represents the fitness of the next generation individuals, represents the adjusted crossover probability, represents the crossover probability of the previous iteration, represents the initial crossover probability, Represents the next generation population diversity.
[0010] Optionally, in the diabetes indicator data classification method based on the adaptive heterogeneous differential evolution algorithm, the variant individuals include variant hyperparameter configuration and variant feature selection strategy; The variation hyperparameter configuration includes a first variation hyperparameter configuration and a second variation hyperparameter configuration; The variation feature selection strategy includes a first variation feature selection strategy and a second variation feature selection strategy.
[0011] Optionally, the diabetes indicator data classification method based on the adaptive heterogeneous differential evolution algorithm, wherein the step of performing a mutation operation on the initial individual to generate a mutant individual according to the adjusted second parameter, specifically includes: Before the number of iterations reaches a preset number, according to the adjusted scaling factor, a first strategy is used to perform a mutation operation on the initial individual to generate the first mutation hyperparameter configuration of the mutated individual : ; After the number of iterations reaches a preset number, the second strategy is used to perform a mutation operation on the initial individual according to the adjusted scaling factor to generate the second mutation feature selection strategy of the mutation individual. : ; Before the number of iterations reaches a preset number, according to the adjusted scaling factor, a third strategy is used to perform a mutation operation on the initial individual to generate the first mutation feature selection strategy of the mutation individual : ; Before the number of iterations reaches the preset number, according to the adjusted scaling factor, the fourth strategy is used to perform a mutation operation on the initial individual to generate the second mutation feature selection strategy of the mutation individual : ; in, represents the first randomly selected individual in the population, represents the second individual randomly selected from the population, represents the third individual randomly selected from the population, represents the fourth individual randomly selected from the population, Represents the individual with the smallest individual fitness.
[0012] Optionally, the diabetes indicator data classification method based on the adaptive heterogeneous differential evolution algorithm, wherein the step of combining the variant individual with the initial individual to obtain a test individual, and selecting from the initial individual and the test individual according to the individual fitness to obtain a new individual, specifically includes: According to the adjusted crossover probability, the variant individual and the initial individual are combined in a probabilistic manner to generate a new test individual; The fitness of the initial individual and the fitness of the test individual are calculated by the fitness function. If the fitness of the test individual is lower than the fitness of the initial individual, the test individual is used to replace the initial individual in the next iteration.
[0013] In addition, to achieve the above purpose, the present invention also provides a diabetes indicator data classification system based on an adaptive heterogeneous differential evolution algorithm, wherein the diabetes indicator data classification system based on an adaptive heterogeneous differential evolution algorithm includes: A population initialization module is used to set the first initial parameter and the second initial parameter of the differential evolution algorithm, randomly generate initial individuals using a hybrid coding scheme according to the first initial parameter, and obtain the hyperparameter configuration and feature selection strategy contained in the initial individuals; A machine learning module, for selecting corresponding initial features from the initial diabetes indicator data set according to the feature selection strategy, inputting the initial features and the hyperparameter configuration into a machine learning model for training and evaluation, and obtaining an evaluation result; A fitness calculation module, used for inputting the evaluation result and the initial feature into a fitness function for calculation to obtain individual fitness, and adaptively adjusting the second initial parameter according to the hyperparameter configuration, the feature selection strategy and the individual fitness to obtain an adjusted second parameter; A new individual generation module is used to perform a mutation operation on the initial individual according to the adjusted second parameter to generate a mutant individual, and combine the mutant individual with the initial individual to obtain a test individual, and select from the initial individual and the test individual according to the individual fitness to obtain a new individual; An adaptive iteration module, used to use the new individual to perform the next round of adaptive heterogeneous differential evolution iteration until the current number of iterations meets a preset termination condition, thereby obtaining a target individual; A target feature selection module, used to obtain a target hyperparameter configuration and a target feature selection strategy contained in the target individual, select a corresponding target feature in the initial diabetes indicator data set according to the target feature selection strategy, and obtain a target classification model according to the target hyperparameter configuration; The indicator data classification module is used to obtain the target feature value of the user to be predicted, input the target feature value into the target classification model for calculation, and output the classification result of the target feature value.
[0014] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a diabetes indicator data classification program based on an adaptive heterogeneous differential evolution algorithm stored in the memory and run on the processor, wherein the diabetes indicator data classification program based on an adaptive heterogeneous differential evolution algorithm implements the steps of the diabetes indicator data classification method based on an adaptive heterogeneous differential evolution algorithm as described above when the diabetes indicator data classification program based on an adaptive heterogeneous differential evolution algorithm is executed by the processor.
[0015] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a diabetes indicator data classification program based on an adaptive heterogeneous differential evolution algorithm, and when the diabetes indicator data classification program based on an adaptive heterogeneous differential evolution algorithm is executed by a processor, the steps of the diabetes indicator data classification method based on an adaptive heterogeneous differential evolution algorithm as described above are implemented.
[0016] In the present invention, the original diabetes index data is preprocessed; an adaptive heterogeneous differential evolution algorithm is used to simultaneously perform feature selection and hyperparameter optimization. The feature selection process reduces the data dimension by evaluating the importance and redundancy of feature subsets, and the hyperparameter optimization process improves the model performance by adaptively adjusting the key parameters of the learning algorithm; the optimized feature subset is input into the machine learning model for training and prediction. The present invention effectively solves the problem of heterogeneous parameter collaborative optimization by constructing a hybrid coding mechanism and a differentiated mutation strategy, dynamically adjusts the algorithm control parameters based on population diversity metrics, and achieves an adaptive balance between global exploration and local development, thereby improving the accuracy of diabetes index data classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of a preferred embodiment of the diabetes index data classification method based on the adaptive heterogeneous differential evolution algorithm of the present invention; Figure 2 It is the overall architecture diagram of the diabetes index data classification method based on the adaptive heterogeneous differential evolution algorithm of the present invention; Figure 3It is a structural diagram of a preferred embodiment of the diabetes index data classification system based on the adaptive heterogeneous differential evolution algorithm of the present invention; Figure 4 It is a structural diagram of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION
[0018] The present application provides a diabetes index data classification method, system and terminal based on an adaptive heterogeneous differential evolution algorithm. In order to make the purpose, technical solution and effect of the present application clearer and more specific, the present application is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0019] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0020] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0021] The diabetes index data classification method based on the adaptive heterogeneous differential evolution algorithm described in the preferred embodiment of the present invention is as follows: Figure 1 and Figure 2 As shown, the diabetes index data classification method based on the adaptive heterogeneous differential evolution algorithm includes the following steps: Step S10: setting a first initial parameter and a second initial parameter of the differential evolution algorithm, randomly generating an initial individual using a hybrid coding scheme according to the first initial parameter, and obtaining a hyperparameter configuration and a feature selection strategy contained in the initial individual.
[0022] It can be understood that the first initial parameters include population size, maximum number of iterations and upper and lower bounds, and the second initial parameters include initial scaling factor and initial crossover probability.
[0023] The step of randomly generating an initial individual using a hybrid coding scheme according to the first initial parameter specifically includes: Iterate according to the maximum number of iterations within the range of the upper and lower bounds to obtain an iteration result; A hybrid coding scheme is used to randomly generate a plurality of initial individuals for the iteration result, wherein the number of the initial individuals is equal to the population size, and each of the initial individuals represents a combined solution of a hyperparameter configuration and a feature selection strategy.
[0024] In this embodiment, a hybrid coding scheme is used to generate initial individuals. The initial individuals are randomly generated. Part of the generated individuals represent the selection or non-selection of features in the data (0 and 1), and the other part represents the value of the hyperparameter of machine learning (randomly generated within the value range). Each individual represents a combined solution of a hyperparameter configuration and a feature selection strategy.
[0025] Each solution It is expressed as: ; in, Indicates that a random value is taken from a certain range. represents the index set of hyperparameters, represents the index set of features, represents the ordinal number of the solution, and Represent the lower and upper bounds respectively.
[0026] Step S20: According to the feature selection strategy, corresponding initial features are selected from the initial diabetes indicator data set, and the initial features and the hyperparameter configuration are input into the machine learning model for training and evaluation to obtain evaluation results.
[0027] It can be understood that the initial diabetes indicator data set contains multiple features, and the purpose of the feature selection strategy is to select the most relevant feature subset from these features, which can not only reduce the data dimension and reduce the impact of noise, but also improve the classification accuracy of the algorithm. In this embodiment, the feature selection strategy represents the selection or non-selection of features in the data, with selection represented by 1 and non-selection represented by 0. According to the feature selection strategy, the corresponding initial features are selected in order from the initial diabetes indicator data set.
[0028] Furthermore, the initial features are input into the machine learning model to be used, and the machine learning model can be SVM (Support Vector Machine), KNN (K-NearestNeighbor), RF (RandomForest) or XGBoost (eXtreme Gradient Boosting, gradient boosting tree), etc., or other machine learning models, which are not limited here. The machine learning model is trained and evaluated, and the model can be evaluated by calculating indicators such as recall rate, accuracy, precision, F1 score, ROC (receiver operating characteristic curve), AUC (area under the ROC curve), etc. In this embodiment, the average recall rate of the model is calculated, and the average recall rate and feature state are used as evaluation results for the calculation of individual fitness.
[0029] Step S30: input the evaluation result and the initial feature into a fitness function for calculation to obtain individual fitness, and adaptively adjust the second initial parameter according to the hyperparameter configuration, the feature selection strategy and the individual fitness to obtain an adjusted second parameter.
[0030] It is understandable that an effective fitness function is crucial to improving model performance and efficiency. Considering the importance of recall rate in classification, recall rate is used as the main indicator of evaluation. In addition, in order to achieve a more concise and efficient model, a regularization penalty term is introduced in the optimization process to promote feature selection. Therefore, the present invention constructs a fitness function that considers both recall rate and feature selection.
[0031] The step of inputting the evaluation result and the initial feature into a fitness function for calculation to obtain individual fitness specifically includes: A fitness function based on recall rate and feature state is pre-constructed, and the average recall rate and feature state are substituted into the fitness function to calculate the individual fitness. : ; in, and Represent the first weight and the second weight respectively ( The value range is 0 to 1. The model can be controlled to balance between high recall and feature simplicity). represents the average recall rate, represents the regularization strength (larger This will cause the model to select fewer features, smaller allows the model to select more features), represents the number of features, represents the ordinal number of the feature, Indicates The feature state of a feature, wherein the feature state takes a value of 0 or 1, 1 indicates that the feature is selected, and 0 indicates that the feature is not selected.
[0032] Furthermore, the adaptively adjusting the second initial parameter according to the hyperparameter configuration, the feature selection strategy and the individual fitness to obtain the adjusted second parameter specifically includes: Respectively calculating a first entropy value corresponding to the hyperparameter configuration and a second entropy value corresponding to the feature selection strategy; The first entropy value and the second entropy value are weighted averaged to obtain the population diversity: ; in, represents the diversity of the population, represents the first entropy value, represents the second entropy value, and respectively represent the weight of the first entropy value and the weight of the second entropy value; The initial scaling factor, the initial crossover probability and the individual fitness are adaptively adjusted according to the population diversity to obtain an adjusted scaling factor and an adjusted crossover probability: ; ; in, Indicates Substitute the adjusted scaling factor, represents the scaling factor of the previous iteration, represents the initial scaling factor, represents the number of iterations of the inner loop, represents the switching probability between two mutation types, Indicates The fitness of the individual, represents the fitness of the next generation individuals, represents the adjusted crossover probability, represents the crossover probability of the previous iteration, represents the initial crossover probability, Represents the next generation population diversity.
[0033] It is understandable that the scaling factor and crossover probability are crucial to the problem of balancing exploration and exploitation, directly affecting the convergence speed and the quality of the solution. In order to maintain this balance, which favors global exploration in the early stage and local exploitation in the later stage, the present invention introduces an adaptive mutation and crossover operator, which dynamically adjusts the values of the scaling factor and crossover probability based on the optimization process. This approach enables efficient exploration of the search space in the initial iteration while refining the solution.
[0034] Step S40: according to the adjusted second parameter, perform a mutation operation on the initial individual to generate a mutant individual, combine the mutant individual with the initial individual to obtain a test individual, and select from the initial individual and the test individual according to the individual fitness to obtain a new individual.
[0035] It can be understood that in the differential evolution algorithm, mutation is crucial to generating new individuals. Based on the hybrid coding scheme, different strategies are adopted for hyperparameter configuration and feature selection. Four mutation techniques, namely DE / rand / 1 (first strategy), DE / current-to-best / 1 (second strategy), DE / best / 1 / bin (third strategy) and DE / rand-to-best / 1 / bin (fourth strategy), are used to obtain mutant individuals. The mutant individuals include mutant hyperparameter configurations and mutant feature selection strategies; the mutant hyperparameter configurations include first mutant hyperparameter configurations and second mutant hyperparameter configurations; the mutant feature selection strategies include first mutant feature selection strategies and second mutant feature selection strategies.
[0036] The performing a mutation operation on the initial individual to generate a mutant individual according to the adjusted second parameter specifically includes: Before the number of iterations reaches a preset number, according to the adjusted scaling factor, a first strategy is used to perform a mutation operation on the initial individual to generate the first mutation hyperparameter configuration of the mutated individual : ; After the number of iterations reaches a preset number, the second strategy is used to perform a mutation operation on the initial individual according to the adjusted scaling factor to generate the second mutation feature selection strategy of the mutation individual. : ; Before the number of iterations reaches a preset number, according to the adjusted scaling factor, a third strategy is used to perform a mutation operation on the initial individual to generate the first mutation feature selection strategy of the mutation individual : ; Before the number of iterations reaches the preset number, according to the adjusted scaling factor, the fourth strategy is used to perform a mutation operation on the initial individual to generate the second mutation feature selection strategy of the mutation individual : ; in, represents the first randomly selected individual in the population, represents the second individual randomly selected from the population, represents the third individual randomly selected from the population, represents the fourth individual randomly selected from the population, Represents the individual with the smallest individual fitness.
[0037] In this embodiment, as an example, when the current iteration number is less than one third of the maximum iteration number, the DE / rand / 1 strategy is used, which helps global exploration in the early stage. In the later stage, the DE / current-to-best / 1 strategy is used to focus on local development. Similarly, in the feature selection part, the DE / best / 1 / bin strategy is used for global exploration in the early stage, and the DE / rand-to-best / 1 / bin strategy is used for local development in the later stage.
[0038] Furthermore, according to the adjusted crossover probability, the variant individuals and the initial individuals are combined in a probabilistic manner to generate new test individuals.
[0039] In this embodiment, the crossover step involves combining the mutant individual and the initial individual in a probabilistic manner to generate a new test individual that represents the solution of the offspring. This process promotes population diversity and convergence. Typical crossover operators in differential evolution include uniform crossover and exponential crossover. In this method, dimension values are selected from the mutant individual with a specific probability; otherwise, the value of the current population individual is retained. In addition, a dimension is randomly selected to ensure that at least one dimension comes from the mutant individual.
[0040] Furthermore, the fitness of the initial individual and the fitness of the test individual are calculated by the fitness function. If the fitness of the test individual is lower than the fitness of the initial individual, the test individual is used to replace the initial individual in the next iteration.
[0041] It can be understood that in the differential evolution algorithm, the selection process is crucial to determine which solutions (target solutions or trial solutions) will survive and be included in the next search iteration. This mechanism maintains the population size for each generation. The differential evolution algorithm selects solutions by evaluating the fitness of the solution through the fitness function. If the newly generated trial vector The fitness value is better than the initial individual , then the initial individual is replaced in the next iteration. By retaining and propagating the optimal solution to subsequent generations, the selection process helps the algorithm improve and converge.
[0042] The selection process in the differential evolution algorithm can be expressed as: ; in, For the new individuals that survive and are used for the next round of iteration, represents the test individual, represents the fitness function of the test individual, Represents the fitness function of the new individual.
[0043] Step S50: Use the new individual to perform the next round of adaptive heterogeneous differential evolution iteration until the current number of iterations meets a preset termination condition, thereby obtaining a target individual.
[0044] like Figure 2 As shown, after the selection operation is performed and a new individual is selected, it is necessary to further determine whether the termination condition is met. In this embodiment, the termination condition is that the number of iterations reaches a preset number (for example, after 50 iterations, the iteration is automatically terminated). If the number of iterations does not reach the preset number, the new individual is used to perform the next round of adaptive heterogeneous differential evolution iterations. If the number of iterations reaches the preset number, the target individual is obtained.
[0045] Step S60, obtaining the target hyperparameter configuration and target feature selection strategy contained in the target individual, selecting corresponding target features in the initial diabetes indicator data set according to the target feature selection strategy, and obtaining a target classification model according to the target hyperparameter configuration.
[0046] Specifically, the target individual represents a combined solution of a target hyperparameter configuration and a target feature selection strategy, and therefore, the target hyperparameter configuration and the target feature selection strategy contained in the target individual are obtained.
[0047] Furthermore, according to the features that are 1 in the target feature selection strategy, these features that are 1 are selected from the initial diabetes indicator data set as the target features most relevant to diabetes (for example, from the original 10 features, according to the target feature selection strategy, the 5 most relevant features are selected as target features to reduce the data dimension and improve the classification accuracy of the algorithm), and the machine learning model to be used is hyperparameter configured according to the target hyperparameter configuration to obtain the target classification model.
[0048] Step S70: Obtain the target feature value of the user to be predicted, input the target feature value into the target classification model for calculation, and output the classification result of the target feature value.
[0049] In this embodiment, after obtaining the target classification model, it is only necessary to obtain the feature value corresponding to the target feature of the user to be predicted, input the target feature value into the target classification model for calculation, and then output the classification result of the target feature value.
[0050] It can be seen that the present invention provides a hybrid model (AHDE-ML) based on an adaptive heterogeneous differential evolution algorithm. By constructing a hybrid coding mechanism and a differentiated mutation strategy, it breaks through the technical bottleneck that traditional optimization methods are difficult to handle hyperparameter configuration and feature selection at the same time, and effectively solves the problem of collaborative optimization of heterogeneous parameters. Moreover, through the designed adaptive parameter adjustment mechanism, the algorithm control parameters are dynamically adjusted based on population diversity metrics, and different entropy value calculation methods are used to evaluate the diversity distribution of hyperparameter configuration and feature selection, achieving an adaptive balance between global exploration and local development, and significantly improving the prediction accuracy and convergence efficiency of the model.
[0051] Furthermore, if Figure 3 As shown, based on the above-mentioned diabetes indicator data classification method based on adaptive heterogeneous differential evolution algorithm, the present invention also provides a diabetes indicator data classification system based on adaptive heterogeneous differential evolution algorithm, wherein the diabetes indicator data classification system based on adaptive heterogeneous differential evolution algorithm includes: A population initialization module 51 is used to set a first initial parameter and a second initial parameter of the differential evolution algorithm, randomly generate initial individuals using a hybrid coding scheme according to the first initial parameter, and obtain a hyperparameter configuration and a feature selection strategy contained in the initial individuals; A machine learning module 52, configured to select corresponding initial features from the initial diabetes indicator data set according to the feature selection strategy, input the initial features and the hyperparameter configuration into a machine learning model for training and evaluation, and obtain an evaluation result; A fitness calculation module 53 is used to input the evaluation result and the initial feature into a fitness function for calculation to obtain individual fitness, and adaptively adjust the second initial parameter according to the hyperparameter configuration, the feature selection strategy and the individual fitness to obtain an adjusted second parameter; A new individual generation module 54 is used to perform a mutation operation on the initial individual according to the adjusted second parameter to generate a mutant individual, and combine the mutant individual with the initial individual to obtain a test individual, and select from the initial individual and the test individual according to the individual fitness to obtain a new individual; An adaptive iteration module 55 is used to use the new individual to perform the next round of adaptive heterogeneous differential evolution iteration until the current number of iterations meets a preset termination condition, thereby obtaining a target individual; A target feature selection module 56 is used to obtain a target hyperparameter configuration and a target feature selection strategy contained in the target individual, select a corresponding target feature in the initial diabetes indicator data set according to the target feature selection strategy, and obtain a target classification model according to the target hyperparameter configuration; The indicator data classification module 57 is used to obtain the target feature value of the user to be predicted, input the target feature value into the target classification model for calculation, and output the classification result of the target feature value.
[0052] Furthermore, if Figure 4 As shown, based on the above-mentioned diabetes indicator data classification method and system based on adaptive heterogeneous differential evolution algorithm, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 4 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0053] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a diabetes indicator data classification program 40 based on an adaptive heterogeneous differential evolution algorithm is stored on the memory 20, and the diabetes indicator data classification program 40 based on an adaptive heterogeneous differential evolution algorithm can be executed by the processor 10, thereby realizing the diabetes indicator data classification method based on an adaptive heterogeneous differential evolution algorithm in the present application.
[0054] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the diabetes indicator data classification method based on the adaptive heterogeneous differential evolution algorithm.
[0055] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components of the terminal communicate with each other via a system bus.
[0056] In one embodiment, when the processor 10 executes the diabetes indicator data classification program 40 based on the adaptive heterogeneous differential evolution algorithm in the memory 20, the following steps are implemented: Setting a first initial parameter and a second initial parameter of the differential evolution algorithm, randomly generating an initial individual using a hybrid coding scheme according to the first initial parameter, and obtaining a hyperparameter configuration and a feature selection strategy contained in the initial individual; According to the feature selection strategy, corresponding initial features are selected from the initial diabetes indicator data set, and the initial features and the hyperparameter configuration are input into the machine learning model for training and evaluation to obtain evaluation results; Inputting the evaluation result and the initial feature into a fitness function for calculation to obtain individual fitness, and adaptively adjusting the second initial parameter according to the hyperparameter configuration, the feature selection strategy and the individual fitness to obtain an adjusted second parameter; According to the adjusted second parameter, the initial individual is mutated to generate a mutant individual, and the mutant individual is combined with the initial individual to obtain a test individual, and according to the individual fitness, a new individual is selected from the initial individual and the test individual; Using the new individual to iterate the next round of adaptive heterogeneous differential evolution until the current number of iterations meets a preset termination condition, thereby obtaining a target individual; Obtaining a target hyperparameter configuration and a target feature selection strategy contained in the target individual, selecting a corresponding target feature in the initial diabetes indicator data set according to the target feature selection strategy, and obtaining a target classification model according to the target hyperparameter configuration; The target feature value of the user to be predicted is obtained, the target feature value is input into the target classification model for calculation, and the classification result of the target feature value is output.
[0057] The first initial parameters include population size, maximum number of iterations, and upper and lower bounds, and the second initial parameters include initial scaling factor and initial crossover probability; The step of randomly generating an initial individual using a hybrid coding scheme according to the first initial parameter specifically includes: Iterate according to the maximum number of iterations within the range of the upper and lower bounds to obtain an iteration result; A hybrid coding scheme is used to randomly generate a plurality of initial individuals for the iteration result, wherein the number of the initial individuals is equal to the population size, and each of the initial individuals represents a combined solution of a hyperparameter configuration and a feature selection strategy.
[0058] Wherein, the evaluation results include average recall rate and feature status; The step of inputting the evaluation result and the initial feature into a fitness function for calculation to obtain individual fitness specifically includes: A fitness function based on recall rate and feature state is pre-constructed, and the average recall rate and feature state are substituted into the fitness function to calculate the individual fitness. : ; in, and denote the first weight and the second weight respectively, represents the average recall rate, represents the regularization strength, represents the number of features, represents the ordinal number of the feature, Indicates The feature state of a feature, wherein the feature state takes a value of 0 or 1, 1 indicates that the feature is selected, and 0 indicates that the feature is not selected.
[0059] The step of adaptively adjusting the second initial parameter according to the hyperparameter configuration, the feature selection strategy and the individual fitness to obtain the adjusted second parameter specifically includes: Respectively calculating a first entropy value corresponding to the hyperparameter configuration and a second entropy value corresponding to the feature selection strategy; The first entropy value and the second entropy value are weighted averaged to obtain the population diversity: ; in, represents the diversity of the population, represents the first entropy value, represents the second entropy value, and respectively represent the weight of the first entropy value and the weight of the second entropy value; The initial scaling factor, the initial crossover probability and the individual fitness are adaptively adjusted according to the population diversity to obtain an adjusted scaling factor and an adjusted crossover probability: ; ; in, Indicates Substitute the adjusted scaling factor, represents the scaling factor of the previous iteration, represents the initial scaling factor, represents the number of iterations of the inner loop, represents the switching probability between two mutation types, Indicates The fitness of the individual, represents the fitness of the next generation individuals, represents the adjusted crossover probability, represents the crossover probability of the previous iteration, represents the initial crossover probability, Represents the next generation population diversity.
[0060] Wherein, the variant individuals include variant hyperparameter configuration and variant feature selection strategy; The variation hyperparameter configuration includes a first variation hyperparameter configuration and a second variation hyperparameter configuration; The variation feature selection strategy includes a first variation feature selection strategy and a second variation feature selection strategy.
[0061] The step of performing a mutation operation on the initial individual to generate a mutant individual according to the adjusted second parameter specifically includes: Before the number of iterations reaches a preset number, according to the adjusted scaling factor, a first strategy is used to perform a mutation operation on the initial individual to generate the first mutation hyperparameter configuration of the mutated individual : ; After the number of iterations reaches a preset number, the second strategy is used to perform a mutation operation on the initial individual according to the adjusted scaling factor to generate the second mutation feature selection strategy of the mutation individual. : ; Before the number of iterations reaches a preset number, according to the adjusted scaling factor, a third strategy is used to perform a mutation operation on the initial individual to generate the first mutation feature selection strategy of the mutation individual : ; Before the number of iterations reaches the preset number, according to the adjusted scaling factor, the fourth strategy is used to perform a mutation operation on the initial individual to generate the second mutation feature selection strategy of the mutation individual : ; in, represents the first randomly selected individual in the population, represents the second individual randomly selected from the population, represents the third individual randomly selected from the population, represents the fourth individual randomly selected from the population, Represents the individual with the smallest individual fitness.
[0062] The combining of the variant individual and the initial individual to obtain a test individual, and selecting from the initial individual and the test individual according to the individual fitness to obtain a new individual, specifically includes: According to the adjusted crossover probability, the variant individual and the initial individual are combined in a probabilistic manner to generate a new test individual; The fitness of the initial individual and the fitness of the test individual are calculated by the fitness function. If the fitness of the test individual is lower than the fitness of the initial individual, the test individual is used to replace the initial individual in the next iteration.
[0063] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a diabetes indicator data classification program based on an adaptive heterogeneous differential evolution algorithm, and when the diabetes indicator data classification program based on an adaptive heterogeneous differential evolution algorithm is executed by a processor, the steps of the diabetes indicator data classification method based on an adaptive heterogeneous differential evolution algorithm as described above are implemented.
[0064] In summary, this article provides a diabetes indicator data classification method and system based on an adaptive heterogeneous differential evolution algorithm. The method includes: preprocessing the original diabetes indicator data; using an adaptive heterogeneous differential evolution algorithm to simultaneously perform feature selection and hyperparameter optimization, the feature selection process reduces the data dimension by evaluating the importance and redundancy of feature subsets, and the hyperparameter optimization process improves model performance by adaptively adjusting the key parameters of the learning algorithm; the optimized feature subsets are input into the machine learning model for training and prediction. The present invention effectively solves the problem of heterogeneous parameter collaborative optimization by constructing a hybrid coding mechanism and a differentiated mutation strategy, dynamically adjusts the algorithm control parameters based on population diversity metrics, and achieves an adaptive balance between global exploration and local development, thereby improving the accuracy of diabetes indicator data classification.
[0065] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.
[0066] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0067] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A diabetes index data classification method based on an adaptive heterogeneous differential evolution algorithm, characterized in that: The diabetes index data classification method based on the adaptive heterogeneous differential evolution algorithm includes: Setting a first initial parameter and a second initial parameter of the differential evolution algorithm, randomly generating an initial individual using a hybrid coding scheme according to the first initial parameter, and obtaining a hyperparameter configuration and a feature selection strategy contained in the initial individual; According to the feature selection strategy, corresponding initial features are selected from the initial diabetes indicator data set, and the initial features and the hyperparameter configuration are input into the machine learning model for training and evaluation to obtain evaluation results; Inputting the evaluation result and the initial feature into a fitness function for calculation to obtain individual fitness, and adaptively adjusting the second initial parameter according to the hyperparameter configuration, the feature selection strategy and the individual fitness to obtain an adjusted second parameter; According to the adjusted second parameter, the initial individual is mutated to generate a mutant individual, and the mutant individual is combined with the initial individual to obtain a test individual, and according to the individual fitness, a new individual is selected from the initial individual and the test individual; Using the new individual to iterate the next round of adaptive heterogeneous differential evolution until the current number of iterations meets a preset termination condition, thereby obtaining a target individual; Obtaining a target hyperparameter configuration and a target feature selection strategy contained in the target individual, selecting a corresponding target feature in the initial diabetes indicator data set according to the target feature selection strategy, and obtaining a target classification model according to the target hyperparameter configuration; Obtain a target feature value of the user to be predicted, input the target feature value into the target classification model for calculation, and output a classification result of the target feature value.
2. The diabetes index data classification method based on the adaptive heterogeneous differential evolution algorithm according to claim 1 is characterized in that: The first initial parameters include population size, maximum number of iterations, and upper and lower bounds, and the second initial parameters include initial scaling factor and initial crossover probability; The step of randomly generating an initial individual using a hybrid coding scheme according to the first initial parameter specifically includes: Iterate according to the maximum number of iterations within the range of the upper and lower bounds to obtain an iteration result; A hybrid coding scheme is used to randomly generate a plurality of initial individuals for the iteration result, wherein the number of the initial individuals is equal to the population size, and each of the initial individuals represents a combined solution of a hyperparameter configuration and a feature selection strategy.
3. The diabetes index data classification method based on the adaptive heterogeneous differential evolution algorithm according to claim 1 is characterized in that: The evaluation results include average recall and feature status; The step of inputting the evaluation result and the initial feature into a fitness function for calculation to obtain individual fitness specifically includes: A fitness function based on recall rate and feature state is pre-constructed, and the average recall rate and feature state are substituted into the fitness function to calculate the individual fitness. : ; in, and denote the first weight and the second weight respectively, represents the average recall rate, represents the regularization strength, represents the number of features, represents the ordinal number of the feature, Indicates The feature state of a feature, wherein the feature state takes a value of 0 or 1, 1 indicates that the feature is selected, and 0 indicates that the feature is not selected.
4. The diabetes index data classification method based on the adaptive heterogeneous differential evolution algorithm according to claim 2 is characterized in that: Adaptively adjusting the second initial parameter according to the hyperparameter configuration, the feature selection strategy and the individual fitness to obtain the adjusted second parameter specifically includes: Respectively calculating a first entropy value corresponding to the hyperparameter configuration and a second entropy value corresponding to the feature selection strategy; The first entropy value and the second entropy value are weighted averaged to obtain the population diversity: ; in, represents the diversity of the population, represents the first entropy value, represents the second entropy value, and respectively represent the weight of the first entropy value and the weight of the second entropy value; The initial scaling factor, the initial crossover probability and the individual fitness are adaptively adjusted according to the population diversity to obtain an adjusted scaling factor and an adjusted crossover probability: ; ; in, Indicates Substitute the adjusted scaling factor, represents the scaling factor of the previous iteration, represents the initial scaling factor, represents the number of iterations of the inner loop, represents the switching probability between two mutation types, Indicates The fitness of the individual, represents the fitness of the next generation individuals, represents the adjusted crossover probability, represents the crossover probability of the previous iteration, represents the initial crossover probability, Represents the next generation population diversity.
5. The diabetes index data classification method based on the adaptive heterogeneous differential evolution algorithm according to claim 4 is characterized in that: The variant individuals include variant hyperparameter configuration and variant feature selection strategy; The variation hyperparameter configuration includes a first variation hyperparameter configuration and a second variation hyperparameter configuration; The variation feature selection strategy includes a first variation feature selection strategy and a second variation feature selection strategy.
6. The diabetes index data classification method based on the adaptive heterogeneous differential evolution algorithm according to claim 5 is characterized in that: The performing a mutation operation on the initial individual to generate a mutant individual according to the adjusted second parameter specifically includes: Before the number of iterations reaches a preset number, according to the adjusted scaling factor, a first strategy is used to perform a mutation operation on the initial individual to generate the first mutation hyperparameter configuration of the mutated individual : ; After the number of iterations reaches a preset number, the second strategy is used to perform a mutation operation on the initial individual according to the adjusted scaling factor to generate the second mutation feature selection strategy of the mutation individual. : ; Before the number of iterations reaches a preset number, according to the adjusted scaling factor, a third strategy is used to perform a mutation operation on the initial individual to generate the first mutation feature selection strategy of the mutation individual : ; Before the number of iterations reaches the preset number, according to the adjusted scaling factor, the fourth strategy is used to perform a mutation operation on the initial individual to generate the second mutation feature selection strategy of the mutation individual : ; in, represents the first randomly selected individual in the population, represents the second individual randomly selected from the population, represents the third individual randomly selected from the population, represents the fourth individual randomly selected from the population, Represents the individual with the smallest individual fitness.
7. The diabetes index data classification method based on the adaptive heterogeneous differential evolution algorithm according to claim 2 is characterized in that: The combining of the variant individual and the initial individual to obtain a test individual, and selecting from the initial individual and the test individual according to the individual fitness to obtain a new individual, specifically includes: According to the adjusted crossover probability, the variant individual and the initial individual are combined in a probabilistic manner to generate a new test individual; The fitness of the initial individual and the fitness of the test individual are calculated by the fitness function. If the fitness of the test individual is lower than the fitness of the initial individual, the test individual is used to replace the initial individual in the next iteration.
8. A diabetes index data classification system based on adaptive heterogeneous differential evolution algorithm, characterized in that: The diabetes index data classification system based on the adaptive heterogeneous differential evolution algorithm includes: A population initialization module is used to set the first initial parameter and the second initial parameter of the differential evolution algorithm, randomly generate initial individuals using a hybrid coding scheme according to the first initial parameter, and obtain the hyperparameter configuration and feature selection strategy contained in the initial individuals; A machine learning module, for selecting corresponding initial features from the initial diabetes indicator data set according to the feature selection strategy, inputting the initial features and the hyperparameter configuration into a machine learning model for training and evaluation, and obtaining an evaluation result; A fitness calculation module, used for inputting the evaluation result and the initial feature into a fitness function for calculation to obtain individual fitness, and adaptively adjusting the second initial parameter according to the hyperparameter configuration, the feature selection strategy and the individual fitness to obtain an adjusted second parameter; A new individual generation module is used to perform a mutation operation on the initial individual according to the adjusted second parameter to generate a mutant individual, and combine the mutant individual with the initial individual to obtain a test individual, and select from the initial individual and the test individual according to the individual fitness to obtain a new individual; An adaptive iteration module, used to use the new individual to perform the next round of adaptive heterogeneous differential evolution iteration until the current number of iterations meets a preset termination condition, thereby obtaining a target individual; A target feature selection module, used to obtain a target hyperparameter configuration and a target feature selection strategy contained in the target individual, select a corresponding target feature in the initial diabetes indicator data set according to the target feature selection strategy, and obtain a target classification model according to the target hyperparameter configuration; The indicator data classification module is used to obtain the target feature value of the user to be predicted, input the target feature value into the target classification model for calculation, and output the classification result of the target feature value.
9. A terminal, characterized in that: The terminal includes: a memory, a processor, and a diabetes indicator data classification program based on an adaptive heterogeneous differential evolution algorithm stored in the memory and executable on the processor. When the diabetes indicator data classification program based on an adaptive heterogeneous differential evolution algorithm is executed by the processor, the steps of the diabetes indicator data classification method based on an adaptive heterogeneous differential evolution algorithm as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a diabetes indicator data classification program based on an adaptive heterogeneous differential evolution algorithm. When the diabetes indicator data classification program based on an adaptive heterogeneous differential evolution algorithm is executed by a processor, the steps of the diabetes indicator data classification method based on an adaptive heterogeneous differential evolution algorithm as described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Water quality clustering method based on improved snow ablation algorithm
CN121278412A