A multi-feature equalization omics batch assignment method based on an improved genetic algorithm
Patent Information
- Application Number
- CN202611108251.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-09
AI Technical Summary
[0008]本发明提出一种基于改进遗传算法的多特征均衡组学批次分配方法,用以解决组学样本分组多特征失衡、遗传算法寻优效率低、分组模式兼容性差的技术问题
本发明采用聚类、分层、随机结合的混合初始化方案提升初代种群质量,依托区分数值与分类特征的复合加权适应度精准锚定分组均衡优化目标,搭配随迭代动态变化的自适应交叉与模拟退火变异策略,同时针对精英个体引入优劣组定向互换的局部寻优机制,算法可同时兼容均匀分组与自定义容量的非均匀分组场景,最终能够有效缩小组间样本特征分布差异,从源头降低组学实验的批次效应,提升组学样本批次分配的均衡性与自动化水平。
Smart Images

Figure CN122889047A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of omics data analysis and experimental design technology, specifically to a multi-feature balanced omics batch allocation method based on an improved genetic algorithm. Background Technology
[0002] In omics experiments, batch effects are systematic errors caused by abiotic factors that distort real biological differences, directly reducing the scientific validity and data value of experimental conclusions. Inappropriate sample grouping design is one of the core contributing factors to the amplification of batch effects: when different batches of samples are unevenly distributed in key biological characteristics (such as age, sex, disease type, and baseline indicators), biases that are difficult to completely eliminate through post-hoc correction are introduced. Therefore, how to achieve a balanced distribution of sample batches and suppress batch effects at their source is a crucial technical problem that urgently needs to be solved in omics experimental design.
[0003] Currently, the following methods are mainly used for batch allocation of omics samples, but they also have corresponding technical drawbacks: One method is simple random allocation or fixed-rule allocation, which involves random sampling or grouping by number order. This method can only achieve a rough and even distribution of the sample size, completely ignoring the differences in multi-dimensional characteristics of the samples. It is prone to excessive deviation in the characteristic distribution between batches, resulting in a prominent batch effect, which cannot meet the requirements of high-precision experiments.
[0004] The second method is the traditional clustering allocation method, which divides groups based on a single feature. This method only considers the balance of single-dimensional features, lacks the ability to optimize multi-dimensional features collaboratively, has limited applicability to various scenarios, and suffers from insufficient allocation accuracy.
[0005] Third, most existing technical means are post-hoc correction tools, which can only correct batch effects after data generation, and cannot avoid the problem from the source of sample allocation, thus only treating the symptoms and not the root cause; The problem of balanced grouping of samples under multiple feature constraints is essentially a k-partitioning problem with multi-objective optimization. It has been proven to be an NP-hard problem, and the global optimal solution cannot be obtained by simply using random or greedy strategies.
[0006] To address the sample allocation optimization problem, existing research has attempted to use genetic algorithms for task allocation and batch scheduling. For example, Chinese patent CN114444829A discloses a static task allocation method for multiple agricultural machines of the same type, which uses a grouped genetic algorithm to allocate tasks to agricultural machines; Chinese patent CN116090788B discloses a batch scheduling plan method for a flexible assembly workshop, which uses an adaptive genetic algorithm to achieve batch scheduling of production orders. However, none of the above methods have been customized to meet the needs of multi-feature distribution alignment in omics batch allocation scenarios, and cannot be directly applied to the balanced batch allocation of omics samples, making it difficult to meet the complex batch allocation requirements of omics under conditions of large samples, multiple features, and multiple constraints.
[0007] In summary, existing batch allocation methods suffer from problems such as poor balance of multi-feature grouping, lack of multi-dimensional collaborative optimization capabilities, low algorithm efficiency, and limited adaptability to various scenarios. Summary of the Invention
[0008] This invention proposes a multi-feature balanced omics batch allocation method based on an improved genetic algorithm to solve the technical problems of multi-feature imbalance in omics sample grouping, low optimization efficiency of genetic algorithms, and poor compatibility of grouping patterns.
[0009] To address the aforementioned technical problems, embodiments of the present invention provide a multi-feature balanced omics batch allocation method based on an improved genetic algorithm, comprising the following overall execution steps: Step S1: Import the original omics sample dataset, complete data cleaning, feature selection and feature standardization preprocessing, determine the grouping constraint parameters and the optimization weight coefficients of each feature, and construct a multi-feature balanced grouping optimization mathematical model; Step S2: Configure the basic operating parameters of the genetic algorithm, including population size, maximum number of iterations, basic crossover probability, basic mutation probability, and iteration stall threshold, to complete the initialization parameter configuration of the algorithm. Step S3: Generate the first-generation population chromosome by mixing three strategies in a preset ratio: K-means clustering initialization, hierarchical sampling initialization of classification features, and random initialization. Step S4: Construct a weighted composite fitness function based on the numerical feature distribution bias and the classification feature proportion bias, and calculate the fitness values of all chromosomes in the population in batches. Step S5: Use a tournament selection strategy to screen parent individuals to provide a parent population for subsequent crossover and mutation operations; Step S6: Introduce an iterative progress adaptive adjustment mechanism to solve the real-time crossover probability, and perform segmented crossover operations based on constraint repair rules to generate offspring individuals; Step S7: Construct a dynamic coefficient of variation by integrating the simulated annealing temperature decay rules, and perform an exchange-based mutation operation for constraint verification; Step S8: Select the elite individuals set of the population and perform intelligent targeted local optimization on the elite set. Merge the optimized elites with the original elites and retain the best ones to complete the population iteration update. Determine whether the overall fitness of the current population has undergone effective evolution. If yes, proceed to step S9. Otherwise, repeat the local optimization of elites and then proceed to step S9. Step S9: Determine whether the iteration termination condition is met; if the maximum number of iterations is reached or the fitness stagnates for several consecutive generations without significant optimization, terminate the iteration, perform multiple rounds of post-enhancement local optimization on the optimal chromosome, and output the final sample grouping scheme; if the termination condition is not met, update the crossover and mutation parameters according to the iteration progress, and return to step S4 for iterative iteration.
[0010] Preferably, step S9 further includes sub-step S91: If the termination condition is not met, the adaptive crossover probability and annealing mutation coefficient are recalculated according to the current iteration progress, the operator parameters are updated, and the process returns to step S4 to enter the next round of population iteration calculation; when the number of consecutive iterations reaches a preset stagnation threshold and the improvement in optimal fitness is less than the set improvement threshold, the algorithm is triggered to terminate early.
[0011] First, define the basic parameters and decision variables of the grouping model: N: Total number of valid omics samples; G: Total number of groups; g∈[1, G] is the group number; S g : The number of samples that the target group g can accommodate; Let M be the set of features participating in the optimization, and w be the total number of features. m F represents the weight coefficient of the m-th feature. N For numerical feature subsets, F C For a subset of classification features, F N ∪F C = F.
[0012] Preferably, step S1, the data preprocessing and standardization refinement step, includes: Step S11: Remove identifier fields such as sample set number, serial number, and ID that have no grouping significance, and delete invalid samples with missing values; Step S12: Distinguish between numerical features and categorical features. Apply Z-score standardization to the numerical features. The standardization calculation formula is Equation (1): (1) In the formula: a i,m μ is the original value of the m-th numerical feature of the original sample i; m σ is the mean of this feature across the entire dataset. m The standard deviation of this feature is the entire dataset; if σ m = 0, then z i,m =a i,m - μ m ; Step S13: Calculate the global proportion distribution of each category under each classification feature in the entire dataset, and store it in the global statistical parameter library as the benchmark distribution parameter for subsequent classification bias calculation.
[0013] Preferably, the composite weighted fitness in step S4 consists of three parts: a numerical feature bias term, a classification feature distribution bias term, and an inter-group balance penalty term. The overall fitness calculation formula is Equation (2): (2) In the formula: D N (g) represents the weighted sum of deviations of all numerical features in the g-th group, D C (g) represents the weighted distribution bias of all classification features in the g-th group; μ score σ is the mean score of each group. score λ represents the standard deviation of scores for each group, and λ is the penalty coefficient; a smaller fitness value indicates better group balance.
[0014] The numerical grouping bias D N (g) Calculation formula (3), classification and grouping bias D C (g) Calculation formula (4): (3) (4) Equation (3): μ g,m Let σ be the within-group mean of feature m after standardization in group g. g,m Within-group variance; Equation (4): Cat m Let m be the set of all categories of feature m, and p g,m,k p represents the percentage of category k within group g. m,k The global baseline percentage for category k in the entire dataset.
[0015] Preferably, step S6, which involves adaptive crossover probability, employs an iterative progress linear decay model, with a real-time crossover probability P. c (Iter) calculation formula (5): (5) In the formula: P cbase The base crossover probability is configured, t is the current iteration number, and Iter max The maximum total number of iterations is α, where α∈(0, 0.3] is the decay adjustment coefficient. After the parent generation crossover, the number of children in each group is checked, and illegal chromosomes generated by the crossover are repaired by sample migration to ensure that the crossover offspring meet the capacity constraints of each group.
[0016] Preferably, step S7 simulates dynamic mutation through annealing, and the mutation intensity is dynamically adjusted according to the iteration process and individual fitness, employing a two-layer mutation control strategy: First layer: The mutation rate increases linearly with the iteration progress, and is pruned within the interval [0.02, 0.15]. (6) Where, p m,base = 0.08 is the basic variability, and γ=0.5 is the upward variability factor.
[0017] The second layer: The intensity of mutation is determined by both the annealing temperature and the individual's fitness. High-quality individuals undergo fewer exchanges to protect superior structures, while low-quality individuals undergo more exchanges to encourage exploration and escape from local optima. (7) Where N is the total number of samples, and θ = 0.05 is the scaling factor. denoted as annealing temperature, and Fit(x) as individual fitness.
[0018] Preferably, in step S8, the elite intelligent local optimization refinement sub-step, the elite selection rule is to select the top-ranked populations by fitness from smallest to largest. Each individual is considered as an elite pool, and P is the population size. Step S81: For a single elite chromosome, based on the fitness scores of each group, select the worst group G with the highest score among all groups. worst The optimal group G with the lowest score best ; Step S82, from G worst The top K candidate emigration samples are selected in descending order based on the weighted bias of the sample numerical characteristics, starting from G. best The top K candidate immigrant samples were selected in ascending order based on a weighted bias of the sample numerical characteristics. ; Step S83: Traverse the candidate sample pairings and prioritize the selection of sample pairings with differences in classification features for cross-group exchange; Step S84: After the exchange, check the fitness. If the fitness decreases, retain the exchange result. If there is no effective optimized pairing, randomly exchange a set of samples across groups to complete the local perturbation. Step S85: After completing the specified round of sample exchange, the optimized elite individuals are obtained. The original elites and optimized elites are merged, and after deduplication, E individuals are selected and retained as the new generation of elites in ascending order of fitness.
[0019] Preferably, step S9 is followed by a sub-step S92 to enhance local optimization: After the iteration terminates and obtains the globally optimal chromosome, repeat the N iteration. opt The above S81~S84 intelligent local optimization, N opt To optimize the pre-set rounds, the optimal grouping is continuously fine-tuned to further compress the distribution bias of grouping features, and the final compliant grouping result is output.
[0020] This invention has the following features and technological advancements: This invention employs a hybrid initialization scheme combining clustering, hierarchical analysis, and randomization to improve the quality of the initial population. It relies on a composite weighted fitness that distinguishes between numerical and categorical features to accurately anchor the grouping balance optimization target. It is combined with an adaptive crossover and simulated annealing mutation strategy that changes dynamically with iteration. At the same time, it introduces a local optimization mechanism for the targeted exchange of superior and inferior groups for elite individuals. The algorithm can be compatible with both uniform grouping and non-uniform grouping scenarios with custom capacity. Ultimately, it can effectively reduce the differences in sample feature distribution between groups, reduce the batch effect of omics experiments from the source, and improve the balance and automation level of batch allocation of omics samples. Attached Figure Description
[0021] Figure 1 is a schematic diagram of the overall process of the present invention. Figure 2 is a flowchart of the iterative optimization process of the genetic algorithm. Figure 3 is a flowchart illustrating the elite local optimization process. Detailed Implementation
[0022] The present invention will be further described in detail below with reference to the accompanying drawings and preferred embodiments.
[0023] This embodiment applies to the batch allocation scenario of a Phase III clinical trial of a targeted drug for malignant tumors. It aims to reduce batch effects at the source by improving the genetic algorithm to achieve balanced grouping with multiple features. This embodiment includes 300 valid subjects, with a total batch size G=20 groups using a uniform grouping model, and each group accommodating a fixed number of samples S. g =15 cases, satisfying the constraints .
[0024] In this embodiment, the features involved in grouping optimization are divided into two categories: Numerical features: age, weight, and height constitute a subset F of numerical features. N ={age, weight, height}; Classification features: tumor stage and gender; tumor stage is a three-category feature with values of stage I, stage II, and stage III, while gender is a two-category feature with values of male and female. Together, they constitute the classification feature subset F. C ={stage,gender}.
[0025] like Figure 1 As shown, the overall grouping process of this method is as follows.
[0026] Step S1: Data preprocessing and feature statistics This step completes the cleaning of raw data, feature standardization, global distribution statistics, and builds a constrained multi-feature balanced grouping mathematical model, which is divided into three sub-steps: S11. Data Cleaning and Invalid Field Removal: Import the original dataset of 300 subjects and automatically remove identifier fields such as subject ID, trial serial number, and sample number that have no grouping value; traverse all feature fields and remove samples with missing features such as age, weight, height, tumor stage, and gender, and finally retain 300 complete and valid samples.
[0027] S12. Numerical Feature Standardization: For the three numerical features of age, weight, and height, the Z-score standardization method is used to complete the transformation of the entire data. The standardization calculation formula is as follows: (1) In equation (1), a i,m For the m-th numerical feature of the i-th sample, μ m σ is the mean of this feature for the entire sample. m The standard deviation of this feature across the entire sample; if the standard deviation σ of a certain feature is... m =0, then the centralization rule z is applied. i,m =a i,m - μ m Processing complete. The standardized data is used for subsequent clustering, bias calculation, and other full-process operations.
[0028] S13. Global distribution statistics of classification features: Traverse the tumor stage (three-category) and gender (two-category) fields of the entire sample, and respectively calculate the global proportion of stage I, II and III tumor samples, as well as the global proportion of male and female samples. Store the baseline distribution parameters of all classification features into the global parameter library as a reference standard for calculating classification feature deviation.
[0029] Step S2: Configure basic algorithm parameters Based on the evaluation focus of clinical trials, the weights of each feature are configured: w age =1.0,w weight =1.0,w height =0.8, w gender =1.2, w stage =1.2.
[0030] The algorithm is configured with fixed parameters: population size P=60, maximum total number of iterations Iter max =120, base crossover probability P cbase =0.85, basic mutation probability P mbase =0.08; cross-decay coefficient α=0.3, variation buoyancy coefficient β=0.5; iteration stall threshold is 30 consecutive generations, optimization accuracy threshold is 1×10 -6 Mixed initialization ratio: K-means initialization ratio rk =0.2, initial proportion of classification and stratification r s =0.2, random initialization ratio r r =0.6, satisfying r k +r s +r r =1; fitness penalty coefficient λ=1; elite individuals are selected at 10% of the total population; the proportion of local optimization candidate samples is 10% of the number of people in a single group; the optimal solution is followed by N rounds of reinforcement optimization. opt =10.
[0031] Step S3: Generate the initial population by mixing multiple strategies The number of individuals in the population is split according to the initial ratio: Initial number of individuals for clustering. Stratified initialization of individual number Randomly initialize the number of individuals P k =PP k -P s Chromosomes are generated in three ways, and finally merged to obtain the first generation population.
[0032] S31. K-means clustering generates 12 chromosomes: Three standardized numerical features (age, weight, and height) are extracted to construct a sample feature matrix. The number of clusters is set to equal the total number of groups (20). K-means clustering is performed to obtain initial cluster labels. After clustering, a sample size adjustment operation is performed: samples are removed from groups with more than 15 participants, and samples are added to groups with fewer than 15 participants, ensuring that the number of samples in each group is strictly equal to 15, generating chromosomes that meet the constraints.
[0033] S32. Stratified Sampling to Generate 12 Chromosomes: Tumor stage (three-category) and sex (two-category) are combined to generate composite classification labels, resulting in six categories: Stage I Male, Stage I Female, Stage II Male, Stage II Female, Stage III Male, and Stage III Female. Samples under the same composite label are randomly shuffled and sequentially filled into 20 groups according to a cyclical allocation rule. Filling stops when a single group is filled with 15 samples, until all samples have been allocated, generating stratified chromosomes.
[0034] S33. Generate 36 chromosomes in a random manner: Randomly shuffle the indexes of 300 samples and assign them sequentially to 20 groups, prioritizing the filling of groups with unfilled capacity.
[0035] S34. Population Merging: Combine clustered, hierarchical, and random chromosomes to form a complete first-generation population of size 60.
[0036] like Figure 2As shown, the specific iterative optimization process of the genetic algorithm in this embodiment is S4~S9.
[0037] Step S4: Calculate the composite fitness of individuals in the population. By traversing every chromosome in the initial population, the chromosome is decoded into a specific grouping scheme. The numerical feature bias and the classification feature bias of a single group are calculated sequentially. Finally, the fitness value of the entire chromosome is obtained by integrating the results. The calculation formula is as follows: (2) (3) (4) Equation (3) is used to calculate the weighted deviation sum of the three numerical features in group g; Equation (4) is used to calculate the weighted distribution deviation sum of the two classification features of tumor stage and gender in group g. For the three classification feature of tumor stage, the difference between the proportion of the three categories of stage I, stage II and stage III in the group and the proportion of the overall baseline needs to be calculated and accumulated. score σ is the average score of all groups. score The final fitness is obtained by combining the standard deviation of the group scores with the penalty coefficient λ. The fitness value represents the overall imbalance of the group; the smaller the value, the better the group balance. This step caches the fitness of all individuals to avoid redundant calculations and improve operational efficiency.
[0038] Step S5: Tournament selection to screen parent individuals A tournament selection strategy is used to screen the parent individuals required for crossover and mutation: each time, 3 individuals are randomly selected from the current population as a candidate set, and the individual with the best fitness in the candidate set is selected as the parent; the above sampling and screening process is repeated until a sufficient number of parent individuals are selected to provide a basis for subsequent genetic operations.
[0039] Step S6: Adaptive crossover operation and offspring repair Based on the current iteration number t and the maximum iteration number Iter max The crossover probability in this round is calculated in real time using a linear decay model, as shown in the following formula: Segmented crossover is performed according to the real-time crossover probability to generate initial progeny chromosomes. After crossover, the number of samples in each group is checked. If a group is overcrowded or has vacancies, a sample migration and repair operation is performed to transfer excess samples to the unfilled groups, ensuring that all progeny chromosomes meet the capacity constraint of 15 samples per group.
[0040] Step S7: Simulated annealing mutation operation First, the annealing temperature, real-time mutation probability, and mutation intensity are calculated based on the iteration progress. The calculation formulas are as follows: The mutation operation is performed based on the real-time mutation probability. In this embodiment, the mutation method uniformly adopts the pairwise exchange of cross-group samples, and does not use random adjustment of single samples. Combined with the real-time annealing temperature control, the number of samples exchanged in a single mutation is controlled to ensure that the number of samples in the 20 groups is always maintained at 15 cases throughout the process, without violating the group constraints.
[0041] Step S8: Elite selection and intelligent local optimization, population update S81, Elite Individual Selection The current population is sorted in ascending order of fitness, and the top 10% of individuals are selected as the elite pool. In this embodiment, the population size is 60, so 6 elite chromosomes are selected each time for fine optimization.
[0042] S82, Single Elite Local Optimization like Figure 3 As shown, the local optimization process of a single elite chromosome specifically includes the following sub-steps: 1) For the decoding and grouping results of a single elite chromosome, calculate the scores of each of the 20 groups, and distinguish between the worst group with the highest score and the best group with the lowest score; 2) Determine the number of candidate samples according to the rules. In this embodiment, the number of people in a single group is 15, so K=1. From the worst group, sort the samples according to the deviation of the sample numerical characteristics from largest to smallest, and select 1 sample to be emigrated; from the best group, sort the samples according to the deviation of the sample numerical characteristics from smallest to largest, and select 1 sample to be emigrated. 3) Compare the classification features of the two samples to be paired, and verify tumor stage (three-category) and gender (two-category) in turn. When there is at least one difference between the two classification features, it is determined to be a valid exchange pair. 4) Perform cross-group sample exchange operation, recalculate the fitness of the exchanged groups, and retain the exchange result if the fitness decreases; if there are no effective exchange pairs, randomly select two groups of samples for small-scale perturbation. 5) After completing the local optimization of a single elite, merge the original elite with the optimized elite, remove duplicates by chromosome hashing, and then select and retain 6 elite individuals in ascending fitness order.
[0043] S83, Population Renewal and Evolutionary Judgment The optimized elite individuals are merged with ordinary offspring individuals generated through crossover and mutation to form a new generation population. The overall fitness of the new generation population is then assessed to determine if effective evolution has occurred. If not, a round of local elite optimization is repeated before proceeding to the iteration termination assessment stage.
[0044] Step S9: Iteration Termination Determination and Optimal Solution Enhancement Optimization S91, Loop Iteration and Early Termination Judgment If the iteration termination condition is not met, recalculate the adaptive crossover probability and simulated annealing mutation probability based on the current iteration generation, update the operator parameters, and return to step S4 to start the next round of population iteration. During the iteration process, continuously monitor the change in optimal fitness. When the improvement in optimal fitness is less than the accuracy threshold of 1×10 for 30 consecutive generations... -6 When the algorithm converges, the early termination mechanism is triggered.
[0045] S92, Post-optimization reinforcement of the optimal solution After the algorithm terminates, the globally optimal chromosome is locked. Step S82, the local optimization operation, is executed for 10 consecutive rounds according to preset rules to fine-tune the optimal grouping scheme in multiple rounds, further reducing the distribution deviation of numerical and classification features between groups.
[0046] S93. Output the final grouping results. After the optimization is completed, the final clinical trial sample grouping scheme with 300 samples, 20 batches, and 15 cases per group is output.
[0047] Those skilled in the art should understand that the foregoing content is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any adjustments, equivalent feature substitutions, or detail optimizations made to the technical solution without departing from the core technical concept of the present invention should be included within the scope of protection of the present invention.
Claims
1. A multi-feature balanced omics batch allocation method based on an improved genetic algorithm, characterized in that, Includes the following steps: Step S1: Import the original omics sample dataset, complete data cleaning, feature selection and feature standardization preprocessing, determine the grouping constraint parameters and the optimization weight coefficients of each feature, and construct a multi-feature balanced grouping optimization mathematical model; Step S2: Configure the basic operating parameters of the genetic algorithm, including population size, maximum number of iterations, basic crossover probability, basic mutation probability, and iteration stall threshold; Step S3: Generate the first-generation population chromosome by mixing three strategies in a preset ratio: K-means clustering initialization, hierarchical sampling initialization of classification features, and random initialization. Step S4: Construct a weighted composite fitness function based on the numerical feature distribution bias and the classification feature proportion bias, and calculate the fitness values of all chromosomes in the population in batches; Step S5: Use a tournament selection strategy to screen parent individuals; Step S6: Introduce an iterative progress adaptive adjustment mechanism to solve for the real-time crossover probability, and perform segmented crossover operations based on constraint repair rules to generate offspring individuals; Step S7: Construct a dynamic coefficient of variation by integrating the simulated annealing temperature decay rules, and perform an exchange-based mutation operation for constraint verification; Step S8: Select the elite individuals set of the population and perform intelligent targeted local optimization on the elite set. Merge the optimized elites with the original elites and retain the best ones to complete the population iteration update. Determine whether the overall fitness of the current population has undergone effective evolution. If yes, proceed to step S9; otherwise, repeat the local optimization of elites and then proceed to step S9. Step S9: Determine whether the iteration termination condition is met; If the maximum number of iterations is reached or the fitness stagnates for several consecutive generations without significant optimization, the iteration is terminated. Multiple rounds of post-enhancing local optimization are performed on the optimal chromosome, and the final sample grouping scheme is output. If the termination condition is not met, the crossover and mutation parameters are updated according to the iteration progress, and the process returns to step S4 for repeated iteration.
2. The multi-feature balanced omics batch allocation method based on an improved genetic algorithm according to claim 1, characterized in that, The composite weighted fitness function in step S4 consists of three parts: a numerical feature bias term, a classification feature distribution bias term, and a between-group equilibrium penalty term. The overall fitness calculation formula is as follows: In the formula: G is the total number of groups; g∈[1, G] is the group number; D N (g) represents the weighted sum of deviations of all numerical features in the g-th group, D C (g) represents the weighted distribution bias of all classification features in the g-th group; μ score σ is the mean score of each group. score λ represents the standard deviation of scores for each group, and λ is the penalty coefficient; a smaller fitness value indicates better group balance. Let M be the set of features participating in the optimization, and w be the total number of features. m F represents the weight coefficient of the m-th feature. N For numerical feature subsets, F C For a subset of classification features, F N ∪F C = F. Where the numerical grouping bias D N (g) The calculation formula is: Where: μ g,m Let σ be the within-group mean of feature m after standardization in group g. g,m Within-group variance; classification grouping bias D C (g) The calculation formula is: In the formula: Cat m Let m be the set of all categories of feature m, and p g,m,k p represents the percentage of category k within group g. m,k The global baseline percentage for category k in the entire dataset.
3. The multi-feature balanced omics batch allocation method based on an improved genetic algorithm according to claim 1, characterized in that, In step S6, the adaptive crossover probability adopts an iterative progress linear decay model, and the real-time crossover probability P C The formula for calculating (iter) is: In the formula: P cbase The base crossover probability is configured, t is the current iteration number, and Iter max The maximum total number of iterations is denoted by α, where α ∈ (0, 0.3] is the decay adjustment coefficient. After parent generation crossover, group size verification is performed, and illegal chromosomes generated by crossover are repaired by sample migration to ensure that the crossover offspring meet the capacity constraints of each group.
4. The multi-feature balanced omics batch allocation method based on an improved genetic algorithm according to claim 1, characterized in that, In step S7, a two-layer mutation control strategy is adopted: First layer: The mutation rate increases linearly with the iteration progress, and is pruned within the interval [0.02, 0.15]. Where, p m,base = 0.08 is the basic variance rate, and γ=0.5 is the upward adjustment factor. Second layer: The variance intensity, i.e., the number of samples in a single crossover, is determined by both the annealing temperature and individual fitness. Where N is the total number of samples, and θ = 0.05 is the scaling factor. denoted as annealing temperature, and Fit(x) as individual fitness.
5. The multi-feature balanced omics batch allocation method based on an improved genetic algorithm according to claim 1, characterized in that, The elite intelligent local optimization in step S8 further includes the following sub-steps: Step S81: For a single elite chromosome, based on the fitness of each group, select the worst group G with the highest score among all groups. worst The optimal group G with the lowest score best ; Step S82, from G worst The top K candidate emigration samples are selected in descending order based on the weighted bias of the sample numerical characteristics, starting from G. best The top K candidate immigrant samples were selected in ascending order based on a weighted bias of the sample numerical characteristics. ,S g Let g be the number of samples to accommodate in the target group. Step S83: Traverse the candidate sample pairings and prioritize the selection of sample pairings with differences in classification features for cross-group exchange; Step S84: After the exchange, check the fitness. If the fitness decreases, retain the exchange result. If there is no effective optimized pairing, randomly exchange a set of samples across groups to complete the local perturbation. Step S85: After completing the specified rounds of sample exchange, optimized elite individuals are obtained. The original elites and optimized elites are merged, deduplicated, and then selected for retention in ascending order of fitness. As a new generation of elites, P represents the population size.
6. The multi-feature balanced omics batch allocation method based on an improved genetic algorithm according to claim 1, characterized in that: In step S3, the preset ratio of the three initialization strategies is K-means initialization ratio r. k =0.2, initial proportion of classification and stratification r s =0.2, random initialization ratio r r =0.6, which satisfies .
Citation Information
Patent Citations
Static task allocation method for multi-machine cooperation of same agricultural machinery
CN114444829A
A method for batch scheduling in a flexible assembly workshop
CN116090788B