VIFF-GA-SVM-based macroscopic coal and rock type logging identification method
By using a VIF-GA-SVM-based method, outliers and collinearity in logging data are eliminated and support vector machine parameters are optimized, thus solving the high cost and error problems of traditional coal and rock type evaluation. This enables low-cost and high-accuracy coal and rock type identification, and improves the accuracy of coalbed methane exploration and development.
Patent Information
- Application Number
- CN202510738874.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-05
AI Technical Summary
Traditional macroscopic coal rock type evaluation relies on drilling coring and downhole observation, which is costly and prone to human errors. It is difficult to obtain comprehensive coal seam physical properties, which affects coalbed methane exploration and development.
A VIF-GA-SVM-based method was used to preprocess the logging data, remove outliers and collinear data, and optimize the support vector machine parameters using genetic algorithm to construct a coal and rock type recognition model.
It achieves low-cost, high-accuracy identification of coal and rock types, reduces human errors, and improves the accuracy of coalbed methane exploration and development.
Smart Images

Figure CN120597064A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of combining coal and rock characteristics with geophysical logging, and particularly relates to a macro coal and rock type logging identification method based on VIF-GA-SVM. Background Art
[0002] Coalbed methane (CBM) is a significant contributor to global unconventional natural gas production. While significant progress has been made in China's CBM development, it remains far from reaching its intended goals. Unlike conventional natural gas development, CBM exploration and development is a complex undertaking constrained by multiple factors. The macroscopic coal rock type influences the enrichment and development of CBM to a certain extent. Macroscopic coal description is fundamental in describing the material composition and distribution characteristics of coal. Macroscopic coal rock type controls the heterogeneity of coal reservoirs, and understanding its distribution patterns is crucial for CBM exploration and development.
[0003] Traditional macroscopic coal and rock type evaluation often relies on coring and downhole observation, which is costly, time-consuming, and labor-intensive. Extracting cores from some fractured coal seams is particularly challenging, and human identification is subject to subjective errors. Overall, it's difficult to obtain comprehensive coal seam properties. In recent years, geophysical logging technology has become widely used in coal reservoir property evaluation due to its high efficiency and cost-effectiveness. This paper utilizes relevant logging data to establish a macroscopic coal and rock type identification model. Summary of the Invention
[0004] In order to solve the above technical problems existing in the prior art, the present invention provides a macro coal and rock type logging identification method based on VIF-GA-SVM with scientific principle, easy implementation, low cost and high accuracy.
[0005] To solve the above technical problems, the present invention adopts the following technical solution: a macro coal and rock type logging identification method based on VIF-GA-SVM, comprising the following steps:
[0006] S1: Pre-process the logging data (curve) and remove 1m of logging data from the top and bottom plates of the coal seam to ensure data accuracy;
[0007] S2: Perform a variance inflation factor test (F-VIF test) on the preprocessed data and remove outliers with a variance inflation factor greater than 10 to avoid strong collinearity of the data;
[0008] S3: perform model building;
[0009] S4: Genetic algorithm is used to optimize the model parameters to improve the accuracy of support vector machine in macro coal and rock type identification.
[0010] The preprocessing of the logging data in step S1 specifically includes the following: first, according to the classification standard of the national standard GB / T18023-2000, the samples obtained by coring are divided into four types: bright coal, semi-bright coal, semi-dark coal, and dark coal. Then, the four types of coal samples are matched with the corresponding logging data. The logging data include independent variables such as deep lateral resistivity (LLD), shallow lateral resistivity (LLS), spontaneous potential (SP), natural gamma (GR), density logging (DEN), compensated neutron logging (CNL), acoustic time difference logging (AC), X-direction well diameter (CALX), Y-direction well diameter (CALY), well inclination angle (DEVI), microresistivity (VM), wellbore azimuth (AZIM) and formation conductivity (FC). Various types of logging data are saved in table form.
[0011] The specific process of step S2 is as follows: F-VIF test: full name Variance Inflation Factor Test, Chinese name is variance inflation factor test, which is a statistical method used to detect multicollinearity. Multicollinearity refers to the phenomenon of high linear correlation between independent variables, which leads to instability and difficulty in interpretation of the regression model. The F-VIF test evaluates the severity of multicollinearity by calculating the variance inflation factor (VIF) of each independent variable.
[0012] The F value represents the contribution of each independent variable in the construction of the macro coal-rock identification model. The larger the F value, the higher the contribution of the independent variable to the model construction.
[0013] VIF measures the degree to which the variance of the regression coefficient increases due to the correlation between the independent variables; for the i-th independent variable X i , the VIF value calculation formula is:
[0014]
[0015] in:
[0016] Is X i the coefficient of determination (R-squared) obtained by linear regression of all other independent variables;
[0017] The larger the VIF value is, the more i The more serious the collinearity with other independent variables;
[0018] VIF<5: It is generally considered that there is no serious multicollinearity;
[0019] 5≤VIF<10: moderate multicollinearity exists;
[0020] VIF ≥ 10: severe multicollinearity exists and the product is eliminated;
[0021] By combining the F-VIF test with the F value and VIF value, we can exclude logging data with low contribution and severe collinearity, thus improving the stability of the model.
[0022] After elimination, 11 types of logging data remain, including deep lateral resistivity (LLD), shallow lateral resistivity (LLS), spontaneous potential (SP), natural gamma (GR), density logging (DEN), compensated neutron logging (CNL), acoustic transit time logging (AC), X-direction wellbore (CALX), Y-direction wellbore (CALY), well inclination (DEVI) and microresistivity (VM).
[0023] The specific steps of model construction in step S3 are: (1) data preparation; (2) SVM model training; (3) model evaluation; (4) model optimization;
[0024] Data preparation includes:
[0025] 1) Data loading: Read data from Excel files.
[0026] 2) Data processing: Load the four-category dataset and ensure that the data has been preprocessed (such as standardized and normalized);
[0027] 3) Data partitioning: The removed well logging data is divided into a 70% training set and a 30% test set;
[0028] SVM model training includes:
[0029] 1) Select kernel function: The present invention adopts linear kernel function (linear);
[0030] 2) Set hyperparameters: Penalty parameter C: controls the degree of penalty for classification errors;
[0031] 3) Training model: Use the training set data to train the SVM model; in MATLAB, use the fitcecoc function to train a multi-class SVM model;
[0032] Model evaluation includes:
[0033] 1) Prediction: Use the trained model to predict the test set;
[0034] 2) Calculate the prediction accuracy;
[0035] Model optimization includes hyperparameter tuning: hyperparameters C and γ are optimized using grid search or genetic algorithm, and genetic algorithm is used for optimization.
[0036] The genetic algorithm (GA) in step S4 is a heuristic search and optimization method that simulates the process of biological evolution in nature. Through continuous iterative evolution, the GA finds the best solution in the search space. It is particularly suitable for complex optimization problems and search spaces. It is mainly used to optimize the parameters of support vector machines, making model construction more accurate. The core ideas of the GA are as follows:
[0037] 1) Selection: Select excellent individuals based on fitness values;
[0038] 2) Crossover: Generate new individuals through crossover operation;
[0039] 3) Mutation: Randomly mutate chromosomes to increase the diversity of the population.
[0040] The specific steps of optimizing the model parameters using the genetic algorithm in step S4 are as follows: (1) initializing the population; (2) fitness function; (3) selection; (4) crossover; (5) mutation; (6) iteration;
[0041] The population is a set of core SVM hyperparameters [C, gamma, kernelType], which directly determines the breadth and efficiency of the algorithm's search for the solution space. Its size is 20, that is, 20 such parameter combinations constitute the candidate solution set of one generation. Because there are only three parameters (C, gamma, and kernelType), 20 is chosen as the population size, which is fast and within a reasonable range.
[0042] Initialization of the population includes:
[0043] 1) Determine the encoding method: Map the solution space of the problem into a genetic encoding format. Common encoding methods include binary encoding and real number encoding. For example, for a problem of finding the maximum value of a function, if the variable range is [0, 100], binary encoding can represent the variable as a fixed-length binary string. For example, a 10-bit binary number can represent an integer between 0 and 1023, which can be mapped to a real number in the interval [0, 100] through appropriate mapping relationships.
[0044] 2) Generate an initial population: Randomly generate a certain number of individuals as the initial population according to the encoding method. The population size is usually determined by the complexity of the problem and the computing resources, and is generally between dozens and hundreds. For example, if the population size is set to 50, 50 individuals that meet the encoding rules are randomly generated, each of which represents a potential solution to the problem.
[0045] For example, a set of initial solutions (chromosomes) are randomly generated, each of which represents a set of SVM parameters (C, γ).
[0046] The population size is N, and each chromosome is represented by:
[0047] x i =[C i , γ i ], i = 1, 2, ..., N,
[0048] Where: C i It is the penalty parameter of SVM, which is used to control the penalty intensity of the model for misclassification and balance the classification accuracy and model complexity. i It is the kernel function parameter, which is used to control the shape of the kernel function and affect the distribution of data points in high-dimensional space. i and γ i The value ranges are [C min , C max ] and [γ min , γ max ].
[0049] The fitness function includes:
[0050] 1) Define the fitness function: Based on the problem objective, design a fitness function to measure the performance of each individual. The value of the fitness function reflects the performance of the individual in solving the problem.
[0051] 2) Calculate the fitness value: Substitute each individual in the population into the fitness function and calculate the corresponding fitness value; for example, for an individual in the initial population, the x value corresponding to its code is 50, then the fitness value of the individual is f(50) = 50 2 =2500.
[0052] The fitness function is used to evaluate the quality of each chromosome; for SVM parameter optimization, the fitness function is the inverse of the classification error:
[0053]
[0054] Where: Classification Error(x i ) is the use of parameters (C i , γ i ) Classification error after training the SVM model; the classification error is calculated by cross-validation:
[0055] Classification Error=kfoldLoss(crossval(Model, KFold, 5)) (3)
[0056] Selection is the process of selecting outstanding individuals for the next generation based on their fitness values, using stochastic uniform selection. Stochastic uniform selection is a fitness-proportional selection method in genetic algorithms. It selects individuals using uniformly distributed random steps, ensuring that individuals with high fitness have a higher probability of being selected while maintaining population diversity. The core concepts of selection are twofold: first, virtual line mapping, which maps all individuals, sorted by fitness value, onto a virtual line segment with a length equal to the total fitness; second, stochastic step scanning, which starts from the starting point and moves along the line segment with a fixed step size (step size = total fitness / population size). Each time the line segment is moved, a small offset (uniformly distributed) is randomly perturbed at the current position of the line segment, and the individual that falls within the interval is selected. The specific algorithm steps for selection are as follows:
[0057] 1) Calculate the total fitness:
[0058] f i : The fitness value of the i-th individual (classification accuracy in SVM optimization);
[0059] 2) Generate a random step starting point: initial position
[0060] rand is a uniform random number in the range [0,1].
[0061] 3) Select individuals: For each selected position
[0062] Find the cumulative fitness ≥ pos k individuals;
[0063] Crossover generates new individuals through crossover operations to increase the diversity of the population. Scattered crossover is used. Scattered crossover determines the source of offspring genes through a randomly generated binary mask and generates offspring to participate in subsequent processes.
[0064] Mutation is a random mutation of chromosomes to increase population diversity. Adaptive Feasible Mutation is used. Adaptive Feasible Mutation: Under the premise of ensuring that the parameters after mutation do not exceed the bounds, the mutation step length is adaptively adjusted according to the diversity of the current population. The steps of adaptive feasible mutation are as follows:
[0065] 1) Calculate the standard deviation of the current population (reflecting diversity);
[0066] 2) Generate a random direction vector and add perturbations along that direction;
[0067] Iteration is the repeated selection, crossover and mutation operations until the termination condition is met and the optimal solution is finally obtained.
[0068] The Support Vector Machine (SVM) in step S4 is a powerful supervised learning algorithm widely used in classification and regression tasks. The core idea of the SVM is to find an optimal hyperplane that separates data of different categories and maximizes the margin (i.e., the "margin") between categories. The core idea of the SVM mainly includes three aspects:
[0069] 1) Classification problem: The goal of SVM is to find a hyperplane (a straight line in two-dimensional space) to separate data of different categories;
[0070] 2) Maximizing the margin: SVM requires not only correct classification but also maximizing the distance between the classification boundary and the nearest data point (support vector);
[0071] 3) Support vectors: The data points closest to the hyperplane, which determine the position and direction of the hyperplane;
[0072] The mathematical principle of support vector machine is:
[0073] 1) Hyperplane equation: In n-dimensional space, the hyperplane can be expressed as:
[0074] W·X+b=0 (7)
[0075] Among them, w is the normal vector and b is the bias term.
[0076] The linear kernel liner is selected in the present invention, corresponding to the above formula
[0077] 2) Margin: The distance from the support vector to the hyperplane is:
[0078]
[0079] 3) Optimization goal: Maximizing the margin is equivalent to minimizing ||w|| while satisfying the classification constraints:
[0080] Y i (W·X i +b)≥1, for all sample points, where: Y i is the label of the sample (+1 or -1, representing category 1 or category 2).
[0081] The present invention adopts the optimization of the SVM hyperparameter penalty parameter C to control the softness and hardness of the interval, improve the classification performance of the model, and avoid overfitting; the present invention is a four-classification problem. Since SVM is a two-classification, one-to-one classification is adopted, and there are a total of 6 SVM two-classifications in the four categories.
[0082] By adopting the above technical solution, compared with the prior art, in the present invention, since the ga function of MATLAB defaults to minimizing the fitness value, taking the negative sign can transform the "maximization accuracy problem" into "minimization -accuracy", so the negative value of the test set classification accuracy is selected as the fitness value. In the present invention, the lower the fitness value, the better the parameter combination performance, for example, -0.90 is better than -0.82.
[0083] The purpose of random uniform selection in the present invention is as follows:
[0084] 1) Fitness mapping: The fitness (-accuracy) of the selected 20 population individuals is mapped to a virtual line segment. Individuals with higher fitness (more negative) occupy a longer segment interval.
[0085] 2) Uniform scanning: Starting from a random starting point, the line segment is scanned with a fixed step size (total fitness / population size).
[0086] The ultimate goal is to select more suitable individuals as subsequent parameters.
[0087] In the present invention, the steps of decentralized crossover are: selecting two sets of [C, gamma, kernelType] SVM parameters, generating offspring, and participating in subsequent processes.
[0088] In the present invention, the specific operation of adaptive feasible mutation is: mutating a set of [C, gamma, kernelType] SVM parameters, for example [100, 0.5, 3] to [105, 0.48, 3], in order to increase the variation and provide more possibilities for model optimization.
[0089] Support vector machine is a powerful classification algorithm that can effectively handle linear and nonlinear problems by maximizing margin and kernel techniques.
[0090] Model optimization mainly involves hyperparameter tuning, using grid search or genetic algorithm to optimize hyperparameters C and γ. The present invention uses genetic algorithm for optimization.
[0091] In summary, this method primarily utilizes a variety of well logging data, employs the variance inflation factor (F-VIF) test to eliminate data that could affect model recognition accuracy, and then optimizes the SVM parameters using a genetic algorithm. This method can better identify the macroscopic coal and rock types of coal samples, avoiding human-induced errors and having significant implications for coalbed methane exploration and extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 is the VIF value before removing outliers;
[0093] Figure 2is the VIF value after removing outliers;
[0094] Figure 3 It is the matrix diagram of the support vector machine prediction model. DETAILED DESCRIPTION
[0095] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are also within the scope of protection of the present invention.
[0096] The macro coal and rock type logging identification method based on VIF-GA-SVM proposed in the present invention includes the following steps:
[0097] Step 1: Organize the logging data and the corresponding macro-coal rock types: First, according to the classification standard of the national standard GB / T18023-2000, the core samples obtained are divided into four types: bright coal, semi-bright coal, semi-dark coal, and dark coal, and they are matched with the corresponding logging data, deep lateral resistivity (LLD), shallow lateral resistivity (LLS), natural potential (SP), natural gamma (GR), density logging (DEN), compensated neutron logging (CNL), acoustic time difference logging (AC), X-direction wellbore (CALX), Y-direction wellbore (CALY), well inclination (DEVI), microresistivity (VM), wellbore azimuth (AZIM) and formation conductivity (FC), and save various logging data in table form. Take a well in the southern part of the Junggar Basin as an example, as shown in Table 1 below (Table 1 only shows part of the data):
[0098] Table 1 Logging data and macroscopic coal rock types before outliers were removed
[0099]
[0100] Step 2: Outlier elimination and F-VIF test: For the data in Table 1 above, the logging data with coal seam thickness less than 1m are eliminated to avoid the influence of gangue on the accuracy of macro coal rock type modeling. Then, the data are tested by F-VIF using the formula (1) mentioned above. After elimination, the remaining logging data are LLD, LLS, SP, GR, DEN, CNL, AC, CALX, CALY, DEVI, and VM11 types. The logging data are shown in Table 2. The VIF values before and after elimination are shown in Table 2. Figure 1 、 Figure 2 As shown:
[0101] Table 2 Logging data and macroscopic coal rock types after removing outliers
[0102]
[0103] like Figure 1 、 Figure 2 As shown in the figure, after the F-VIF test and the removal of outliers, the VIF is stable within 10, which improves the accuracy of model construction.
[0104] Step 3: Combine genetic algorithm with support vector machine to build a four-classification model: divide the well logging data after F-VIF test into training set and test set, with the training set accounting for 70% of the total data and the test set accounting for 30%. Use the above formulas (7) and (8) to build a classification model. Use formulas (2) and (3) in the above genetic algorithm to select the fitness value of the data and select the optimal parameters for model optimization. Then use the above formulas (4), (5) and (6) to select the appropriate SVM parameters by random uniform selection for subsequent optimization. Then use the selected SVM parameters for crossover and mutation to complete the optimization of the support vector machine parameters. The prediction results of the test set are shown in Table 3 and Figure 3 As shown:
[0105] Table 3. Support vector machine model accuracy
[0106] Test set accuracy: 97.60%
[0107] Classification Report:
[0108]
[0109] As shown in Table 3 and Figure 3 As shown in the figure, the prediction accuracy of the test set is 97.60%, the prediction accuracy of the four categories is above 93%, the recall rate is above 94%, and the F1 score is above 0.95. The prediction ability of the model is excellent.
[0110] The above embodiments illustrate the basic principles and features of the present invention, but the above only illustrates preferred embodiments of the present invention and is not limited to the embodiments. Under the guidance of this patent, those skilled in the art can make many variations and improvements without departing from the scope of the present invention and the scope of protection of the claims, all of which fall within the scope of protection of the present invention. Therefore, the patent and protection scope of the present invention shall be based on the appended claims.
Claims
1. A macroscopic coal and rock type identification method based on VIF-GA-SVM is characterized by: The following steps are involved: S1: Pre-process the logging data and remove 1m of logging data from the top and bottom plates of the coal seam to ensure data accuracy; S2: Perform a variance inflation factor test on the preprocessed data and remove outliers with a variance inflation factor greater than 10 to avoid strong collinearity of the data; S3: perform model building; S4: Genetic algorithm is used to optimize the model parameters to improve the accuracy of support vector machine in macro coal and rock type identification.
2. The macro coal and rock type well logging identification method based on VIF-GA-SVM according to claim 1 is characterized by: The pre-processing of the logging data in step S1 specifically includes the following: First, according to the classification standard of the national standard GB / T18023-2000, the core samples were divided into four types: bright coal, semi-bright coal, semi-dark coal, and dark coal. Then, the four types of coal samples were matched with the corresponding logging data. The logging data included deep lateral resistivity, shallow lateral resistivity, natural potential, natural gamma, density logging, compensated neutron logging, sonic travel time logging, X-direction wellbore diameter, Y-direction wellbore diameter, well inclination, microresistivity, wellbore azimuth, and formation conductivity. All types of logging data were saved in tabular form.
3. The macro coal and rock type identification method based on VIF-GA-SVM according to claim 2 is characterized by: The specific process of step S2 is: F-VIF test: full name Variance Inflation Factor Test, Chinese name is variance inflation factor test, which is a statistical method used to detect multicollinearity. Multicollinearity refers to the phenomenon of high linear correlation between independent variables, which leads to instability and difficulty in interpretation of the regression model. The F-VIF test evaluates the severity of multicollinearity by calculating the variance inflation factor of each independent variable. The F value represents the contribution of each independent variable in the construction of the macro coal-rock identification model. The larger the F value, the higher the contribution of the independent variable to the model construction. VIF measures the degree to which the variance of the regression coefficient increases due to the correlation between the independent variables; for the i-th independent variable X i , the VIF value calculation formula is: in: Is X i The coefficient of determination obtained by linear regression of all other independent variables; The larger the VIF value is, the more i The more serious the collinearity with other independent variables; VIF<5: It is generally considered that there is no serious multicollinearity; 5≤VIF<10: moderate multicollinearity exists; VIF ≥ 10: severe multicollinearity exists and the product is eliminated; By combining the F-VIF test with the F value and VIF value, we can exclude logging data with low contribution and severe collinearity, thus improving the stability of the model. After elimination, 11 types of logging data remain, including deep lateral resistivity, shallow lateral resistivity, natural potential, natural gamma, density logging, compensated neutron logging, sonic transit time logging, X-direction wellbore diameter, Y-direction wellbore diameter, well inclination angle and microresistivity.
4. The macro coal and rock type well logging identification method based on VIF-GA-SVM according to claim 3 is characterized by: The specific steps of model construction in step S3 are: (1) data preparation: (2) SVM model training; (3) Model evaluation; (4) Model optimization; Data preparation includes: 1) Data loading: read data from Excel files; 2) Data processing: Load the four-category dataset and ensure that the data has been preprocessed; 3) Data partitioning: The removed well logging data is divided into a 70% training set and a 30% test set; SVM model training includes: 1) Select kernel function: the present invention adopts linear kernel function; 2) Set hyperparameters: Penalty parameter C: controls the degree of penalty for classification errors; 3) Training model: Use the training set data to train the SVM model; in MATLAB, use the fitcecoc function to train a multi-class SVM model; Model evaluation includes: 1) Prediction: Use the trained model to predict the test set; 2) Calculate the prediction accuracy; Model optimization includes hyperparameter tuning: hyperparameters C and γ are optimized using grid search or genetic algorithm, and genetic algorithm is used for optimization.
5. The macro coal and rock type well logging identification method based on VIF-GA-SVM according to claim 4 is characterized in that: The genetic algorithm in step S4 is a heuristic search and optimization method that simulates the process of biological evolution in nature. Through continuous iterative evolution, the genetic algorithm finds a better solution in the search space. It is particularly suitable for complex optimization problems and search spaces. It is mainly used to optimize the parameters of the support vector machine and make the model construction more accurate. The core ideas of the genetic algorithm are as follows: 1) Selection: Select excellent individuals based on fitness values; 2) Crossover: Generate new individuals through crossover operation; 3) Mutation: Randomly mutate chromosomes to increase the diversity of the population.
6. The macroscopic coal and rock type identification method based on VIF-GA-SVM according to claim 5 is characterized by: The specific steps of optimizing the model parameters using the genetic algorithm in step S4 are as follows: (1) initializing the population; (2) fitness function; (3) selection; (4) crossover; (5) mutation; (6) iteration; The population is a set of core SVM hyperparameters [C, gamma, kernelType], which directly determines the breadth and efficiency of the algorithm's search for the solution space. Its size is 20, that is, 20 such parameter combinations constitute the candidate solution set of one generation. Because there are only three parameters (C, gamma, and kernelType), 20 is chosen as the population size, which is fast and within a reasonable range. Initialization of the population includes: 1) Determine the encoding method: Map the solution space of the problem into a genetic encoding form; common encoding methods include binary encoding and real number encoding; 2) Generate an initial population: Randomly generate a certain number of individuals as the initial population according to the encoding method; the population size is usually determined by the complexity of the problem and the computing resources, usually between dozens and hundreds; For example, a set of initial solutions is randomly generated, each solution represents a set of SVM parameters (C, γ); The population size is N, and each chromosome is represented by: Where: C i is the penalty parameter of SVM, which is used to control the penalty intensity of the model for misclassification and balance the classification accuracy and model complexity; i is the kernel function parameter, which is used to control the shape of the kernel function and affect the distribution of data points in high-dimensional space; C i and γ i The value ranges are [C min , C max ] and [γ min , γ max ]; The fitness function includes: 1) Define the fitness function: Based on the problem objective, design a fitness function to measure the performance of each individual. The value of the fitness function reflects the performance of the individual in solving the problem. 2) Calculate the fitness value: Substitute each individual in the population into the fitness function and calculate the corresponding fitness value; The fitness function is used to evaluate the quality of each chromosome; for SVM parameter optimization, the fitness function is the inverse of the classification error: Where: Classification Error(x i ) is the use of parameters (C i , γ i ) Classification error after training the SVM model; the classification error is calculated by cross-validation: Classification Error=kfoldLoss(crossval(Model, KFold, 5)) (3) Selection is to select excellent individuals according to their fitness values to enter the next generation, using random uniform selection. Random uniform selection is a selection method based on fitness ratio in genetic algorithms. It selects individuals through uniformly distributed random steps, ensuring that individuals with high fitness have a higher probability of being selected while maintaining population diversity. The core ideas of selection are two-fold: one is virtual line mapping, which is to sort all individuals by fitness value and map them to a virtual line segment with a length of total fitness; the other is random step scanning, which is to start from the starting point and move along the line segment with a fixed step size. During each movement, a small offset is randomly perturbed at the current position of the line segment, and the individual that falls within the interval is selected. The specific algorithm steps of selection are as follows: 1) Calculate the total fitness: f i : The fitness value of the i-th individual; 2) Generate a random step starting point: initial position rand is a uniform random number in the range [0,1]. 3) Select individuals: For each selected position (6) Find the cumulative fitness ≥ pos k individuals; Crossover generates new individuals through crossover operations to increase the diversity of the population. Dispersed crossover is used. Dispersed crossover wants to determine the source of offspring genes through a randomly generated binary mask and generate offspring to participate in subsequent processes. Mutation is a random mutation of chromosomes to increase population diversity, using adaptive feasible mutation. Adaptive feasible mutation: Under the premise of ensuring that the parameters after mutation do not exceed the limit, the mutation step length is adaptively adjusted according to the diversity of the current population. The steps of adaptive feasible mutation are: 1) Calculate the standard deviation of the current population; 2) Generate a random direction vector and add perturbations along that direction; Iteration is the repeated selection, crossover and mutation operations until the termination condition is met and the optimal solution is finally obtained.
7. The macro coal and rock type identification method based on VIF-GA-SVM according to claim 6 is characterized by: The support vector machine in step S4 is a powerful supervised learning algorithm widely used in classification and regression tasks. The core idea of the support vector machine is to find an optimal hyperplane that separates data of different categories and maximizes the margin between categories. The core idea of the support vector machine mainly includes three aspects: 1) Classification problem: The goal of SVM is to find a hyperplane to separate data of different categories; 2) Maximizing the margin: SVM requires not only correct classification but also maximizing the distance between the classification boundary and the nearest data point; 3) Support vectors: The data points closest to the hyperplane, which determine the position and direction of the hyperplane; The mathematical principle of support vector machine is: 1) Hyperplane equation: In n-dimensional space, the hyperplane can be expressed as: w·x+b=0 (7) Among them, w is the normal vector and b is the bias term; The linear kernel liner is selected in the present invention, corresponding to the above formula 2) Margin: The distance from the support vector to the hyperplane is: 3) Optimization goal: Maximizing the margin is equivalent to minimizing ||w|| while satisfying the classification constraints: Y i (W·X i +b)≥1, for all sample points, where: Y i is the label of the sample; The present invention adopts the optimization of the SVM hyperparameter penalty parameter C to control the softness and hardness of the interval, improve the classification performance of the model, and avoid overfitting; the present invention is a four-classification problem. Since SVM is a two-classification, one-to-one classification is adopted, and there are a total of 6 SVM two-classifications in the four categories.