Machine learning model trained on augmented data for predicting biochar yield prediction method
Patent Information
- Application Number
- CN202311085160.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-25
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-08-25
AI Technical Summary
综上所述,机器学习模型在生物炭领域的预测已经取得重大突破,但是现有训练的模型需要测量的输入特征过多,没有对特征进行筛选,而过多的特征会使模型过于复杂,从而影响生物炭产率预测精度
[0055]本发明的有益效果如下:本发明通过不同的样本集训练模型,进行建模预测,对比发现加入增强数据的模型比不加入增强数据的模型其预测精度均有提升,增强数据中的单独热解实验数据对两者模型都有积极影响,对LightGBM而言其R2从0.819提升到0.890,对DNN模型则是从0.793提升到0.888,而增强数据中的混合热解数据对LightGBM而言产生积极影响将其MAE从2.585降低到2.549,但是对DNN模型而言模型预测精度产生下降。而PDP和ICE分析可得到“增强数据”的加入使LightGBM模型与特征之间的依赖关系更加丰富真实的结论。本发明采用增强数据后,可以提高预测精度使模型对特征的依赖更加准确。为提高物质热解预测精度的未来实施提供了一种新的方法。
Smart Images

Figure CN117196913B_ABST
Abstract
Description
Technical Field
[0001] This application relates to a method for predicting biochar yield, and more particularly to a method for predicting biochar yield using a machine learning model trained on augmented data, belonging to the field of biomass technology. Background Technology
[0002] In recent years, with the rapid development of computer technology, machine learning technology has been widely applied in various fields to analyze and predict the complex results of nonlinear reaction processes. Using elemental analysis, industrial analysis, and pyrolysis conditions (heating rate, temperature) as inputs, the yields of solid, gas, and liquid three-phase products from biomass pyrolysis were predicted using FFN and CFN models. The results showed poor predictions for solids and gases, but better predictions for biomass oil. Using the RF algorithm with structural components (cellulose, hemicellulose, lignin, ash), elemental components (C, H, O, N), particle size, and pyrolysis conditions as input variables, the yield and C content of biochar were predicted. Correlation analysis between input features and output results showed good prediction accuracy. Furthermore, the results concluded that pyrolysis temperature has the greatest impact on pyrolysis output and structural components have a significant impact on biochar yield, demonstrating the great potential of RF in the field of pyrolysis. Based on four models—RF, SVM, XGB, and MLP—seven input options were combined using the fundamental properties of biomass to predict the recovery rate of three-phase products and the HHV of biomass oil. Comparison showed that RF performed better, and analysis revealed that pyrolysis temperature was the most significant influencing factor. In summary, machine learning models have made significant breakthroughs in biochar prediction. However, existing models require too many input features without feature filtering, which makes the models overly complex and affects the accuracy of biochar yield prediction. Summary of the Invention
[0003] A brief overview of the invention is given below to provide a basic understanding of certain aspects of it. It should be understood that this overview is not an exhaustive summary of the invention. It is not intended to identify key or essential parts of the invention, nor is it intended to limit the scope of the invention. Its purpose is merely to present certain concepts in a simplified form as a prelude to the more detailed description that follows.
[0004] In view of this, to address the technical problem of poor accuracy in biochar yield prediction, this invention provides a method for predicting biochar yield using a machine learning model trained with augmented data. This invention uses expanded data to enhance model training, thereby overcoming the current bottleneck in biochar yield prediction accuracy.
[0005] Option 1: A method for predicting biochar yield based on a machine learning model trained with augmented data, comprising the following steps:
[0006] S1. Construct an optimal feature subset based on the biomass structural components and pyrolysis temperature;
[0007] S2. Data enhancement of biomass structural components: Biomass structural components are subjected to biomass pyrolysis reaction, and data from individual pyrolysis of the three biomass components and data from mixed pyrolysis of the three components are used as enhancement data.
[0008] S3. Collect model sample data;
[0009] S4. Preprocess the sample data and classify the preprocessed sample data;
[0010] S5. Construct a biochar yield prediction model based on the DNN model and the LightGBM model, and train the biochar yield prediction model.
[0011] S6. Perform feature evaluation on the biochar yield prediction model.
[0012] Preferably, the structural components of biomass include purified cellulose, purified hemicellulose, purified lignin, and ash.
[0013] Preferably, the sample data includes biomass pyrolysis data, data from individual pyrolysis of the three components, and data from individual and mixed pyrolysis of the three components.
[0014] Preferably, the sample data is classified into three categories: Category 1: samples containing only biomass pyrolysis data; Category 2: samples containing data from the individual pyrolysis of the three components; and Category 3: samples containing data from both the individual and mixed pyrolysis of the three components.
[0015] Preferably, the method for constructing and training a biochar yield prediction model based on a DNN model and a LightGBM model is as follows:
[0016] DNN model:
[0017] The internal neural network of a DNN consists of an input layer, hidden layers, and an output layer. The hidden layers are configured with three layers: the first layer has 32 neurons, the second layer has 64 neurons, and the third layer has 32 neurons. The output of the j-th neuron in the l-th layer... for:
[0018]
[0019] In the formula, The weights for connecting the j-th neuron in layer l, This is the output of layer (l-1). This is the bias term connecting the j-th neural node in layer l;
[0020] The activation function uses the ReLU function, the loss function is optimized using gradient descent iteratively, and the mean squared error is used to measure the loss. For each sample, the expected value is minimized as follows:
[0021]
[0022] In the formula, a L y is a vector with feature dimension n_out;
[0023] LightGBM model:
[0024] Based on the traditional gradient boosting decision tree, gradient one-sided sampling algorithm and mutually exclusive feature binding algorithm are introduced. Based on the Histogram decision tree algorithm, histogram is used to store features. A max_depth limit is added on top of Leaf-wise. The PSO algorithm is introduced into LightGBM to optimize the hyperparameters of the algorithm.
[0025] Histogram-based decision tree algorithm:
[0026] Discretize the continuous floating-point eigenvalues into n integers, and construct a histogram of width n.
[0027] Traverse the data, accumulate statistics in the histogram based on the discretized values as indices, and after traversing the data once, find the optimal split point based on the discrete values of the histogram, construct leaf nodes, and repeat the operation.
[0028] When finding split points and constructing histograms of leaf nodes, first calculate the leaf nodes with smaller histograms, and then use the difference between the histograms to obtain the leaf nodes with larger histograms. Essentially, this process involves traversing each bin and accumulating the gradient S of all nodes. P And the number of nodes n P Calculate the gain and select the node with the largest gain as the optimal split point;
[0029] S R =S P -S L
[0030] n R =n P -n L
[0031]
[0032] In the formula, S P Let n be the sum of the gradients of all nodes. P S represents the total number of nodes. L Let n be the sum of the gradients of all nodes to the left of the split point. L S represents the number of all nodes to the left of the split point.R Let n be the sum of the gradients of all nodes to the right of the split point. R This represents the number of all nodes to the left of the split point;
[0033] One-sided gradient sampling GOSS algorithm:
[0034] Calculate the gain and sort them, then select the large gradient sample data A with a×100%;
[0035] Select b×100% small gradient sample data B from the remaining (1-a)×100% samples;
[0036] The small gradient sample data is amplified by (1-a) / b×100% and the two are combined for training.
[0037] In the one-sided gradient sampling GOSS algorithm, if O is the dataset of the weak learner at a certain split node, then the gain at j features and split point d is:
[0038]
[0039] Where A is the large gradient sample A mentioned above. l =x i ∈A:x ij ≤d, A r =x i ∈A:x ij >d; B is a small gradient sample B l =x i ∈B:x ij ≤d, B r =x i ∈B:x ij >d;
[0040] PSO algorithm:
[0041] Each particle searches for its own individual optimal solution, which is then shared with all other particles. The best individual optimal solution in the particle swarm becomes the current global optimal solution. All particles adjust their velocity and position based on their individual and global optimal solutions. The formulas for velocity and position updates are:
[0042] V id =wV id +C1random()(P id -X id )+C1random()(P gd -X id )
[0043] X id =X id -V id
[0044] Where C1 and C2 are learning factors; V id P represents particle velocity. id P represents the optimal solution for the i-th variable with d dimensions. gd Let w be the d-th dimension of the population optimal solution; w is the inertia factor, and the update formula for the dynamic w is:
[0045] w( t )=(w ini -w end (G) k -g) / G k +w end
[0046] The LightGBM hyperparameters are used as input to the PSO algorithm. The mean square error of the output MSE is calculated and used as the fitness function of PSO. The minimum value of RMSE is sought, and early_stopping_rounds is set to 10.
[0047] The method for training the biochar yield prediction model is as follows: input the cellulose, hemicellulose, lignin, ash and pyrolysis time of biomass into the biochar yield prediction model, and output the corresponding biochar yield data after pyrolysis.
[0048] Preferred method for feature evaluation of biochar yield prediction models:
[0049]
[0050]
[0051]
[0052] Among them, R 2 The coefficient of determination is y; MAE is the mean absolute error; RMSE is the root mean square error. i Indicates the actual value. This represents the predicted value.
[0053] Option 2: An electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the biochar yield prediction method based on a machine learning model trained with augmented data as described in Option 1.
[0054] Option 3: A computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the biochar yield prediction method based on a machine learning model trained with augmented data as described in Option 1.
[0055] The beneficial effects of this invention are as follows: This invention trains models using different sample sets for modeling and prediction. Comparisons show that models with augmented data exhibit improved prediction accuracy compared to models without augmented data. Individual pyrolysis experimental data in the augmented data positively impacts both models; for LightGBM, the R² increases from 0.819 to 0.890, and for the DNN model, it increases from 0.793 to 0.888. However, mixed pyrolysis data in the augmented data positively impacts LightGBM, reducing its MAE from 2.585 to 2.549, but decreases the prediction accuracy of the DNN model. PDP and ICE analyses reveal that the addition of "augmented data" enriches and makes the dependency relationship between the LightGBM model and features more realistic. This invention, by employing augmented data, can improve prediction accuracy and make the model's dependency on features more accurate. It provides a new method for improving the accuracy of pyrolysis prediction in the future. Attached Figure Description
[0056] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0057] Figure 1 This is a schematic diagram of the process for predicting biochar yield using a machine learning model trained on augmented data.
[0058] Figure 2 This is a schematic diagram of PCC analysis;
[0059] Figure 3 This is a schematic diagram of a DNN model;
[0060] Figure 4 This is a schematic diagram of the LightGBM principle;
[0061] Figure 5 This is a diagram of the histogram algorithm.
[0062] Figure 6 A graph of the difference algorithm for histograms. Detailed Implementation
[0063] To make the technical solutions and advantages of the embodiments of this application clearer, the exemplary embodiments of this application will be described in further detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not an exhaustive list of all embodiments. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.
[0064] Example 1, Reference Figures 1-6This embodiment describes a method for predicting biochar yield based on a machine learning model trained with augmented data, comprising the following steps:
[0065] S1. Construct an optimal feature subset based on the structural components and pyrolysis temperature of biomass;
[0066] Specifically, the structural components of biomass include purified cellulose, purified hemicellulose, purified lignin, and ash. Biomass raw materials are diverse, with the main components being cellulose, hemicellulose, lignin, alcohol extracts, and inorganic minerals. Biomass pyrolysis is a comprehensive manifestation of the pyrolysis behavior of these three main components. When biomass is fully pyrolyzed, time has a negligible effect on biochar yield. Therefore, fully pyrolyzed biochar is selected as the modeling object. Since the structural components and pyrolysis temperature of biomass significantly affect biomass pyrolysis, the structural components of biomass are chosen as the optimal feature subset. Finally, PCC analysis is used for verification (refer to...). Figure 2 ).
[0067] S2. Data enhancement was performed on cellulose extract, hemicellulose extract, lignin extract and ash. The cellulose extract, hemicellulose extract, lignin extract and ash were subjected to biomass pyrolysis reaction. The data of individual pyrolysis of the three biomass components and the data of mixed pyrolysis of the three components were used as enhancement data.
[0068] S3. Collect model sample data;
[0069] A total of 198 biochar yield datasets were collected from 56 experimental datasets and existing biomass pyrolysis data for building and testing prediction models. These datasets include 28 types of biomass such as pine nut shells, hazelnut shells, walnut shells, rice husks, corn stalks, rice stalks, wheat stalks, soybean stalks, bamboo, pine sawdust, Guanzhong wheat straw, apple tree branches, and pine cones.
[0070] The enhanced data are divided into biomass individual pyrolysis experimental data and biomass mixed pyrolysis experimental data. The biomass individual pyrolysis experimental data includes 30 sets of data from pyrolysis experiments of cellulose extract, hemicellulose extract, and lignin extract alone. The mixed pyrolysis data consists of 5 sets of data from pyrolysis experiments of cellulose, hemicellulose, and lignin extract mixed in equal proportions. For details, please refer to Table 1, the experimental scheme table for enhanced data.
[0071] Table 1 Experimental scheme for augmented data
[0072]
[0073] S4. Preprocess the sample data and classify the preprocessed sample data;
[0074] The data are experimental data based on slow and complete pyrolysis. All experimental data in this paper are from real experiments, and some enhanced data are outliers, so no removal is required. For some experimental data with missing values, the average value is used to replace the missing data.
[0075] The sample data includes biomass pyrolysis data, data from individual pyrolysis of the three components, and data from individual and mixed pyrolysis of the three components;
[0076] The sample data were divided into three categories: Category 1: samples containing only biomass pyrolysis data; Category 2: samples containing data from the individual pyrolysis of the three components; and Category 3: samples containing data from both the individual and mixed pyrolysis of the three components.
[0077] S5. Construct a biochar yield prediction model based on the DNN model and the LightGBM model, and train the biochar yield prediction model.
[0078] Specifically, DNN and LightGBM models are chosen for modeling. DNN is a typical neural network model, characterized by fast computation and accurate training. LightGBM, on the other hand, is a high-performing tree model, capable of efficient parallel training with faster training speed, lower memory consumption, and better accuracy. This example uses Python 3.8 to build the model. The DNN model utilizes the Sklearn, Tensorflow, and PyTorch libraries, while the LightGBM library is used for LightGBM. (Refer to...) Figures 3-4 ;
[0079] The DNN model is also known as a multilayer perceptron. Neural networks are extensions of the perceptron, and deep neural networks can be understood as neural networks with many layers.
[0080] The internal neural network of a DNN consists of an input layer, hidden layers, and an output layer. The hidden layers are configured with three layers: the first layer has 32 neurons, the second layer has 64 neurons, and the third layer has 32 neurons. The output of the j-th neuron in the l-th layer... for:
[0081]
[0082] In the formula, The weights for connecting the j-th neuron in layer l, This is the output of layer (l-1). This is the bias term connecting the j-th neural node in layer l;
[0083] The activation function uses the ReLU function, the loss function is optimized using gradient descent iteratively, and the mean squared error is used to measure the loss. For each sample, the expected value is minimized as follows:
[0084]
[0085] In the formula, a L y is a vector with feature dimension n_out;
[0086] In the input layer, if the temperature feature deviates too much from other features, feature normalization is necessary. Other adjustable parameters include the learning rate, the number of hidden nodes, and the number of training epochs.
[0087] The LightGBM model introduces the Gradient One-Sided Sampling (GOSS) and Exclusive Feature Bundling (EFB) algorithms to the traditional Gradient Boosting Decision Tree (GBDT) model. LightGBM is a histogram-based decision tree algorithm that uses histograms to store features. Unlike traditional GBDT, LightGBM uses a depth-constrained leaf-wise growth algorithm. Compared to level-wise, leaf-wise can reduce more error and achieve better accuracy with the same number of splits. The disadvantage of leaf-wise is that it can grow a very deep decision tree, leading to overfitting. Therefore, LightGBM adds a max_depth constraint on top of leaf-wise to prevent overfitting while maintaining high efficiency. The PSO algorithm is introduced into LightGBM to optimize its hyperparameters. PSO is a global intelligent algorithm that uses particles to simulate birds in a flock, with particles having the attributes of velocity v and position x.
[0088] The decision tree algorithm for Histogram:
[0089] Discretize the continuous floating-point feature values into n integers, and construct a histogram of width n. While traversing the data, accumulate statistics in the histogram based on the discretized values as indices. After one data traversal, the histogram has accumulated the required statistics. Then, based on the discrete values of the histogram, find the optimal split point, referring to... Figures 5-6 As shown.
[0090] When constructing the histogram of leaf nodes, LightGBM first calculates the leaf node with the smaller histogram, and then uses the difference between the histograms to obtain the leaf node with the larger histogram. This allows it to obtain the histograms of its sibling leaves at a very low cost, thus significantly improving computational speed. To find the optimal split point, LightGBM first traverses each bin and accumulates the gradients S of all left and right nodes. L And quantity nL The gain is calculated, and the node with the largest gain is selected as the best split point. Although the histogram algorithm cannot find the most accurate split point after discretizing the feature values, in fact, since the gradient decision tree itself is a weak learner, the histogram algorithm will have a regularization effect and avoid the overfitting effect of the model. That is, the discretized split point is more beneficial to the final accuracy.
[0091] S R =S P -S L
[0092] n R =n P -n L
[0093]
[0094] In the formula, S P Let n be the sum of the gradients of all nodes. P S represents the total number of nodes. L Let n be the sum of the gradients of all nodes to the left of the split point. L S represents the number of all nodes to the left of the split point. R Let n be the sum of the gradients of all nodes to the right of the split point. R This represents the number of all nodes to the left of the split point;
[0095] The one-sided gradient sampling (GOSS) algorithm is as follows:
[0096] GOSS is a sample sampling algorithm designed to discard samples that do not contribute to the calculation of information gain, retaining those that do. According to the definition of information gain, samples with larger gradients have a greater impact on information gain. Therefore, GOSS only retains data with larger gradients during data sampling. However, discarding all data with smaller gradients would inevitably affect the overall data distribution.
[0097] First, calculate the gain and sort them, then select the large gradient sample data A, which represents a×100%; the top 10% of the gain sorted data are considered large gradient sample data.
[0098] Select b×100% of the small gradient sample data B from the remaining (1-a)×100% of the samples; the data outside the 80% of the gain sort are small gradient sample data.
[0099] The small gradient sample data is amplified by (1-a) / b×100% and then combined for training.
[0100] In the one-sided gradient sampling GOSS algorithm, if O is the dataset of the weak learner at a certain split node, then the gain at j features and split point d is:
[0101]
[0102] Where A is the large gradient sample A mentioned above. l =x i ∈A:x ij ≤d, A r =x i ∈A:x ij >d; B is a small gradient sample B l =x i ∈B:x ij ≤d, B r =x i ∈B:x ij >d.
[0103] The Exclusive Feature Bundling (EFB) algorithm combines mutually exclusive features. While GOSS accelerates model training by reducing the number of samples, EFB further reduces the data size by decreasing the number of features. For example, in recommender systems, there may be a large number of features, reaching tens of thousands or even more dimensions, but many of these features are mutually exclusive. Mutually exclusive means that some features rarely have non-zero values simultaneously, similar to one-hot features. The idea behind LightGBM is to bundle these features together to form a new feature, thereby reducing the number of features and improving training speed.
[0104] The PSO algorithm works as follows: Each particle searches for its own individual optimal solution, shares this solution with every other particle, and the best individual optimal solution in the swarm becomes the current global optimal solution. All particles adjust their velocity and position based on their individual and global optimal solutions. The formulas for velocity and position updates are:
[0105] V id =wV id +C1random()(P id -X id )+C1random()(P gd -X id )
[0106] X id =X id -V id
[0107] Where C1 and C2 are learning factors; V id P represents particle velocity. id P represents the optimal solution for the i-th variable with d dimensions. gdLet w be the group optimum in dimension d; w is the inertia factor. A larger w value indicates stronger global convergence but weaker local convergence. Typically, a larger w is chosen in the early stages of the algorithm to quickly find the global optimum. A smaller w value indicates weaker global convergence but stronger local convergence. Typically, a smaller w is chosen in the later stages of the algorithm to more precisely find the extreme points. The update formula for the dynamic w is:
[0108] w (t) =(w ini -w end (G) k -g) / G k +w end
[0109] The LightGBM hyperparameters are used as input to the PSO algorithm, and the output MSE (mean squared error) is calculated as the PSO fitness function to seek the minimum RMSE value. However, to prevent overfitting, early_stopping_rounds = 10 is set.
[0110] Specifically, early_stopping_rounds=10 means that training will stop if the MAE does not decrease after 10 rounds of training. Adjustable parameters include the maximum number of leaves in the basic learning (num_leaves), the maximum tree depth in the basic learning (max_depth), the number of boosting trees to be adapted (n_estimators), and the learning rate (Learning_rate), etc.
[0111] The method for training the biochar yield prediction model is as follows: Cellulose, hemicellulose, lignin, ash, and pyrolysis time of biomass are input into the biochar yield prediction model, and the corresponding biochar yield data after pyrolysis is output. When dividing the training and test sets, 75% of the data is randomly selected as the training set, and 25% is used as the test set for model validation. During hyperparameter tuning, cross-validation is used to train two models. The mean absolute error (MAE) is introduced as a criterion for finding the optimal hyperparameters; the model with the smallest MAE corresponds to the optimal hyperparameters.
[0112] S6. Perform feature evaluation on the biochar yield prediction model.
[0113]
[0114]
[0115]
[0116] Among them, R 2 The coefficient of determination is y; MAE is the mean absolute error; RMSE is the root mean square error. i Indicates the actual value. This represents the predicted value.
[0117] The impact of augmented data on model training can be analyzed using PDP and ICE analyses: PDP analysis reveals how feature variables influence the target factor. PDP focuses on the overall mean, while ICE analysis shows the dependence of the model output on the features of each sample. ICE analysis demonstrates the impact of augmented data on the model.
[0118] Example 2: The computer device of the present invention may include a processor and a memory, such as a microcontroller containing a central processing unit. Furthermore, the processor executes the computer program stored in the memory to implement the steps of the above-described method for predicting biochar yield using a machine learning model trained on augmented data.
[0119] The processor referred to can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0120] The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback or image playback). The data storage area may store data created based on the use of the mobile phone (such as audio data and phonebook entries). Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart media cards (SMC), secure digital cards (SD), flash cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.
[0121] Example 3: Computer-readable storage medium example
[0122] The computer-readable storage medium of the present invention can be any form of storage medium that can be read by the processor of a computer device, including but not limited to non-volatile memory, volatile memory, ferroelectric memory, etc. The computer-readable storage medium stores a computer program. When the processor of the computer device reads and executes the computer program stored in the memory, the steps of the above-mentioned method for predicting biochar yield based on a machine learning model trained with augmented data can be implemented.
[0123] The computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0124] Although the invention has been described with reference to a limited number of embodiments, those skilled in the art will understand from the foregoing description that other embodiments are conceivable within the scope of the invention described herein. Furthermore, it should be noted that the language used in this specification has been chosen primarily for readability and instructional purposes, and not for the purpose of interpreting or limiting the subject matter of the invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the invention is illustrative and not restrictive, and the scope of the invention is defined by the appended claims.
Claims
1. A method for predicting biochar yield based on a machine learning model trained with augmented data, characterized in that, Includes the following steps: S1. Construct an optimal feature subset based on the biomass structural components and pyrolysis temperature; S2. Data enhancement of biomass structural components: Biomass structural components are subjected to biomass pyrolysis reaction, and data from individual pyrolysis of the three biomass components and data from mixed pyrolysis of the three components are used as enhancement data. S3. Collect model sample data; S4. Preprocess the sample data and classify the preprocessed sample data; S5. Construct a biochar yield prediction model based on the DNN model and the LightGBM model, and train the biochar yield prediction model. S6. Characteristic evaluation of biochar yield prediction model; The structural components of biomass include purified cellulose, purified hemicellulose, purified lignin, and ash. The sample data includes biomass pyrolysis data, data from individual pyrolysis of the three components, and data from individual and mixed pyrolysis of the three components; The sample data is classified into three categories: Category 1: samples containing only biomass pyrolysis data; Category 2: samples containing data from the individual pyrolysis of the three components; and Category 3: samples containing data from both the individual and mixed pyrolysis of the three components. The method for training the biochar yield prediction model is as follows: input the cellulose, hemicellulose, lignin, ash and pyrolysis time of biomass into the biochar yield prediction model, and output the corresponding biochar yield data after pyrolysis.
2. The method for predicting biochar yield based on a machine learning model trained with augmented data according to claim 1, characterized in that, The method for constructing and training a biochar yield prediction model based on a DNN model and a LightGBM model is as follows: DNN model: The internal neural network of a DNN consists of an input layer, hidden layers, and an output layer. The hidden layers are configured with three layers: the first layer has 32 neurons, the second layer has 64 neurons, the third layer has 32 neurons, and so on. Layer The output of each neuron for: In the formula, To connect the first Layer The weights of each neural node, For the first Layer output, To connect the first Layer Bias terms for each neural node; The activation function uses the ReLU function, the loss function is optimized using gradient descent iteratively, and the mean squared error is used to measure the loss. For each sample, the expected value is minimized as follows: In the formula, And y is the feature dimension. ; LightGBM model: Based on the traditional gradient boosting decision tree, gradient one-sided sampling algorithm and mutually exclusive feature binding algorithm are introduced. Based on the Histogram decision tree algorithm, histogram is used to store features. A max_depth limit is added on top of Leaf-wise. The PSO algorithm is introduced into LightGBM to optimize the hyperparameters of the algorithm. Histogram-based decision tree algorithm: Discretize continuous floating-point eigenvalues into 1 integer, and construct a width of 1 Histogram; Traverse the data, accumulate statistics in the histogram based on the discretized values as indices, and after traversing the data once, find the optimal split point based on the discrete values of the histogram, construct leaf nodes, and repeat the operation. When finding split points and constructing histograms of leaf nodes, first calculate the leaf nodes with smaller histograms, then use the difference between the histograms to obtain the leaf nodes with larger histograms. Iterate through each bin and accumulate the gradients of all nodes. and number of nodes Calculate the gain and select the node with the largest gain as the optimal split point; In the formula, Let the gradients of all nodes be sums. For the total number of nodes, The sum of gradients of all nodes to the left of the split point. This represents the number of all nodes to the left of the split point. The sum of gradients of all nodes to the right of the split point. This represents the number of all nodes to the left of the split point; One-sided gradient sampling GOSS algorithm: Calculate the gain and sort them, then select one. Large gradient sample data ; From the remaining Selected from the sample Small gradient sample data ; Amplify small gradient sample data Double the result, then combine the two for training; In the one-sided gradient sampling GOSS algorithm, if Given the dataset for a weak learner at a certain split node, then... Features, segmentation points The gain at that point is: in, For the above large gradient samples , B represents a small gradient sample. , ; PSO algorithm: Each particle searches for its own individual optimal solution, which is then shared with all other particles. The best individual optimal solution in the particle swarm becomes the current global optimal solution. All particles adjust their velocity and position based on their individual and global optimal solutions. The formulas for velocity and position updates are: in, , For learning factors; The particle velocity; Let i be the optimal solution for the i-th variable with d dimensions. This is the population optimal solution for the d-th dimension; Inertia factor, dynamic The update formula is: The LightGBM hyperparameters are used as input to the PSO algorithm. The mean square error (RMSE) of the output is calculated and used as the PSO fitness function to find the minimum value of RMSE. The early_stopping_rounds is set to 10.
3. The method for predicting biochar yield based on a machine learning model trained with augmented data according to claim 2, characterized in that, The method for characterizing biochar yield prediction models is as follows: Among them, R 2 The coefficient of determination is denoted by MAE, and the root mean square error is RMSE. Indicates the actual value. This represents the predicted value.
4. An electronic device, characterized in that, The device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the biochar yield prediction method based on a machine learning model trained on augmented data as described in any one of claims 1-3.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the biochar yield prediction method based on the machine learning model trained with augmented data as described in any one of claims 1-3.