Shale oil pyrolysis yield prediction method based on feature screening and ensemble learning

By employing feature selection and ensemble learning methods, random forest and BP neural network models were constructed to address the accuracy and stability issues in predicting the pyrolysis yield of medium- and low-maturity shale oil. This approach enables simultaneous and efficient prediction of liquid hydrocarbon, gaseous hydrocarbon, and semi-coke yields, and is applicable to shale oil resource evaluation and development process optimization.

CN122333404APending Publication Date: 2026-07-03NORTHEAST GASOLINEEUM UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTHEAST GASOLINEEUM UNIV
Filing Date
2026-02-11
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately predict the yields of liquid hydrocarbons, gaseous hydrocarbons, and semi-coke from medium- to low-maturity shale under different pyrolysis conditions. Furthermore, traditional methods neglect the importance of feature selection, resulting in high model redundancy, poor interpretability, and low prediction accuracy.

Method used

A feature-based screening and ensemble learning approach is adopted. Features are screened using Pearson correlation coefficients, and a multi-output regression structure is constructed by combining random forest algorithm and BP neural network model to simultaneously predict the yield of liquid hydrocarbons, gaseous hydrocarbons and semi-coke. This includes data standardization, feature importance ranking, outlier processing and hierarchical validation.

Benefits of technology

It significantly improves the prediction accuracy of the three products, reduces model complexity, and enhances prediction stability and interpretability. It can maintain high prediction accuracy at different pyrolysis temperatures and is suitable for shale oil resource evaluation and development process optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122333404A_ABST
    Figure CN122333404A_ABST
Patent Text Reader

Abstract

This invention discloses a shale oil pyrolysis yield prediction method based on feature selection and ensemble learning, belonging to the field of shale oil pyrolysis yield prediction methods. The method first collects experimental data on input parameters such as heating temperature and pressure, and output parameters such as liquid hydrocarbons. After standardization, the data is divided into training and testing sets at an 8:2 ratio. Key feature parameters are selected using Pearson correlation coefficient and random forest algorithm. A random forest regression model is constructed, and the weights are adjusted using a BP neural network. A multi-output regression structure is used to simultaneously learn the mapping relationship between multiple products. Using MSE and R² as indicators, the model undergoes overall testing and secondary verification by temperature partitioning. The influence of outlier data is reduced through weight adjustment. Finally, the yield prediction results and feature importance ranking are output. This method improves prediction accuracy and efficiency, reduces model complexity, and enhances generalization stability. It can be used for shale oil resource evaluation, process optimization, and potential analysis, providing data support for cost control and scheme design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of shale oil pyrolysis yield prediction methods, specifically a shale oil pyrolysis yield prediction method based on feature selection and ensemble learning. Background Technology

[0002] Shale oil is an important component of unconventional oil and gas resources. Its formation and transformation processes are controlled by geochemical characteristics such as organic matter abundance, type, and maturity. When medium- to low-maturity shale undergoes pyrolysis, it generates multiphase products including liquid hydrocarbons, gaseous hydrocarbons, and semi-coke. This process is influenced by a combination of factors, including total organic carbon (TOC), vitrinite reflectance (Ro), kerogen type, pyrolysis temperature, heating rate, and pressure. These factors exhibit high nonlinearity and interactions, making the prediction of product yield a complex multivariate problem.

[0003] Traditional prediction methods are mostly based on empirical formulas or univariate regression models, such as establishing a linear relationship between a single maturity index (Ro) and hydrocarbon production, or fitting empirical equations through limited experimental results. However, these methods struggle to accurately reflect the complexity of actual pyrolysis processes, and the prediction results often deviate from the measured data, especially with significant errors when temperatures, pressures, and organic matter types vary. Some studies have introduced artificial neural networks (ANNs) to improve prediction accuracy, with backpropagation (BP) neural networks being a common example. However, this model is prone to getting trapped in local optima during training and is sensitive to the number and distribution of training samples. Its predictive generalization performance deteriorates when experimental conditions vary significantly or when sample data is limited.

[0004] In recent years, ensemble learning algorithms have gradually gained attention in oil and gas engineering. Among them, the Random Forest (RF) model, by constructing multiple decision trees and employing bootstrap sampling and random feature selection, can effectively reduce overfitting and improve prediction stability. However, existing RF studies mostly focus on prediction under single-product or single-factor conditions, lacking a complete method for simultaneously predicting oil, gas, and semi-coke products under different pyrolysis conditions in medium- and low-maturity shale. Furthermore, existing techniques often neglect the importance of early feature selection, failing to systematically screen the correlation and contribution of input parameters, resulting in high model redundancy and poor interpretability. Summary of the Invention

[0005] The purpose of this invention is to provide a shale oil pyrolysis yield prediction method based on feature screening and ensemble learning, so as to solve the defects mentioned in the background art.

[0006] To achieve the above objectives, a method for predicting shale oil pyrolysis yield based on feature selection and ensemble learning is provided, characterized by the following steps:

[0007] S1. Data Acquisition and Preprocessing Steps: Collect shale oil pyrolysis experimental data. Input parameters include heating temperature, pressure, heating rate, total organic carbon content (TOC), vitrinite reflectance (Ro), and kerogen type. Output parameters include liquid hydrocarbon yield, gaseous hydrocarbon yield, and semi-coke yield. Standardize the data and divide it into training and test sets at an 8:2 ratio.

[0008] S2, Feature Selection and Key Parameter Determination Steps: First, the parameters output by S1 are processed using the Pearson correlation coefficient to remove feature parameters that are low in correlation with yield or highly collinear. Then, the importance of the remaining features is calculated and sorted using the random forest algorithm to determine the final set of input variables.

[0009] S3. Model Construction and Training Steps: Construct a random forest regression model using the input variable set from S2. Generate multiple training subsets using Bootstrap sampling with replacement. Randomly select some features when splitting each decision tree node. Employ a multi-output regression structure to simultaneously learn the mapping relationship between liquid hydrocarbons, gaseous hydrocarbons, and semi-coke yields. Adjust connection weights using a BP neural network model. Evaluate the training and prediction performance of the neural network model using two statistical parameters: mean squared error (MSE) and coefficient of determination (R²). Determine whether to adjust weights or resample experimental data.

[0010] S4. Model evaluation and stratified verification steps: Using mean square error (MSE) and coefficient of determination (R²) as evaluation indicators, secondary verification is carried out according to pyrolysis temperature zones after the overall test. A weight adjustment strategy is adopted for abnormal data to reduce its impact.

[0011] S5. Output and Interpretability Steps: Output the predicted yields of liquid hydrocarbons, gaseous hydrocarbons, and semi-coke, and also output the importance ranking results of each input feature.

[0012] Furthermore, the input parameters in S1 include heating temperature of 100–600℃, pressure of 0.1–10MPa, heating rate of 1–50℃ / min, total organic carbon content (TOC) of 5%–60%, vitrinite reflectance (Ro) of 0.3%–1.5%, and kerogen type. The output parameters include liquid hydrocarbon yield of 0%–30%, gaseous hydrocarbon yield of 0%–15%, and semi-coke yield of 50%–98%.

[0013] Furthermore, the random forest regression model generates multiple base classifiers through bootstrap sampling with replacement. The remaining 36.8% of the out-of-bag samples are used for initial model evaluation. The base classifiers are fully grown, unpruned decision trees. When splitting nodes, one-third of the total number of input features are randomly selected as candidate features, and then the optimal splitting feature is selected. In the ensemble stage, an average aggregation strategy is used to fuse the prediction results of each base classifier. The independence of the base classifiers and the randomness of the features reduce the risk of overfitting and effectively control the upper bound of the model's generalization error. Its construction process includes the following steps:

[0014] Step 1: Perform Bootstrap resampling on the original dataset of size N, independently extracting n samples to form a new dataset, repeating the operation until the size of the new dataset is the same as that of the original dataset;

[0015] Step 2: Based on the training subset obtained by resampling, generate a decision tree through a recursive partitioning strategy, using Gini impurity or mean square error as the node splitting criterion, until the purity of the leaf nodes meets the standard or the number of samples cannot be further split.

[0016] Let H(x) represent the random forest model, h1(X), h2(X)...hi(X) represent multiple decision trees, where X represents the feature attribute of the sample, Y represents the class attribute of the sample, and I represents the indicator function;

[0017] Random forest classification prediction results

[0018]

[0019] Random forest regression prediction results

[0020] .

[0021] Furthermore, the decision tree adopts a single hidden layer structure, and the optimal splitting feature when a node splits is determined by calculating the purity gain Δi(t). The purity gain calculation is based on any one of the Gini impurity method, information gain method, or gain ratio method. No pruning is performed during the construction of the decision tree, and the stopping condition for splitting a leaf node is: the number of node samples ≤ 5, or the purity of the sample category ≥ 95%, or the purity gain Δi(t) < 0.01.

[0022] Furthermore, the neurons in the input layer of the BP neural network model receive various information from the outside and transmit it to the neurons in the hidden layer. After the neurons in the hidden layer process and transform the received information, they transmit it to the output layer. The gradient descent method is used to correct the weights and thresholds of the output layer and the hidden layer in turn. The hidden layer usually chooses a sigmoid transfer function, and the output layer chooses a linear transfer function to obtain better prediction results.

[0023] Furthermore, the calculation method for the weights and threshold corrections of the output layer and hidden layer is as follows: Weight Update:

[0024]

[0025]

[0026] Threshold update:

[0027]

[0028]

[0029] Where η is the learning rate, E is the error function, and w ki w ij These are the connection weights of the neurons, a and a'. k θ i These are the bias parameters of the neuron.

[0030] Furthermore, the mathematical expression for the S-type transfer function is as follows:

[0031]

[0032] The mathematical expression for a linear transfer function is as follows:

[0033]

[0034] Where: x is the input signal of the neuron; specifically, it is the sum of the products of the output values ​​of all neurons in the previous layer and their corresponding connection weights, plus the result of the current neuron's bias parameters.

[0035] Furthermore, the localization formula for the mean square error (MSE) in S3 is as follows:

[0036]

[0037] Coefficient of determination (R) 2 The positioning formula for () is as follows:

[0038]

[0039] Where: y i This is the actual value. Here, n represents the predicted value, and n is the sample size. The mean value is the experimental measurement; the smaller the MSE, the smaller the prediction error of the model; R2 reflects the goodness of fit of the model to the data, with a value range of [0,1], and the closer it is to 1.

[0040] Furthermore, the number of neurons h in the hidden layer of the BP neural network is determined by an empirical formula, which is:

[0041]

[0042] Where m is the number of neurons in the input layer, n is the number of neurons in the output layer, and a is an adjustable constant between 0 and 10. In practical applications, through multiple verifications and optimizations, the h value that minimizes the model's MSE is finally selected, with a value range of 3-14.

[0043] Furthermore, the weight adjustment strategy for abnormal data in S4 is as follows: when the prediction error of a single sample exceeds 1.5 times the average error of all samples, the training weight of the abnormal sample is adjusted to 0.3-0.7 times the weight of the normal sample; or Bootstrap resampling is used to replace the abnormal sample, and the replacement ratio does not exceed 5% of the total number of samples.

[0044] Compared with the prior art, the beneficial effects of the present invention are:

[0045] Tested on a dataset of pyrolysis experiments in medium-to-low maturity shale, the proposed random forest model significantly improved the prediction accuracy for three products: liquid hydrocarbons, gaseous hydrocarbons, and semi-coke. The average MSE decreased, and the R² increased. By unifying input parameters and using a multi-output regression structure, this invention can simultaneously predict the yields of liquid hydrocarbons, gaseous hydrocarbons, and semi-coke in a single model, avoiding the training duplication and parameter inconsistencies caused by the need to build multiple single-product models in existing methods, thus improving overall prediction efficiency. Before model training, key input parameters are selected through Pearson correlation analysis and random forest feature importance ranking. Removing redundant features reduces model complexity and shortens training time, clearly demonstrating the dominant role of temperature, TOC, and Ro in yield. This interpretability aids in experimental design and process optimization. This invention introduces stratified validation and outlier handling strategies. Independent evaluations were performed for different pyrolysis temperature zones, and the RF model maintained an R² above 0.8 in the low, medium, and high temperature ranges, demonstrating stable generalization ability. To address data biases such as incomplete gas collection in the experiment, the overall model error remained within 5%–10% even with outlier data, achieved by adjusting the weights of outliers. This represents a reduction of approximately half compared to the unprocessed scenario. This method can be used for quantitative evaluation of shale oil resources, optimization of pyrolysis development processes, and analysis of oil and gas reservoir potential. It can also be extended to predict hydrocarbon generation under other organic matter types or different experimental conditions, providing data-driven support for experimental cost control and development scheme design. Attached Figure Description

[0046] Figure 1 The decision tree model of this invention;

[0047] Figure 2 The RF algorithm model of this invention;

[0048] Figure 3 The BP neural network model of this invention;

[0049] Figure 4 The research method flow of this invention;

[0050] Figure 5 The range of hydrocarbon generation products and yield data of the present invention;

[0051] Figure 6 Comparison of predicted and experimental values ​​of the BP neural network test set in this invention (a: oil yield; b: gas yield; c: semi-coke yield).

[0052] Figure 7 Comparison of predicted and experimental values ​​from the RF training set of this invention (a: oil yield; b: gas yield; c: semi-coke yield).

[0053] Figure 8 The experimental values ​​and RF predicted values ​​of oil shale hydrocarbon generation products and yields of the present invention are compared. Detailed Implementation

[0054] Please see Figure 1-8 This invention provides a technical solution: a method for predicting shale oil pyrolysis yield based on feature selection and ensemble learning, comprising the following steps:

[0055] S1. Data Acquisition and Preprocessing Steps: Collect shale oil pyrolysis experimental data. Input parameters include heating temperature, pressure, heating rate, total organic carbon content (TOC), vitrinite reflectance (Ro), and kerogen type. Output parameters include liquid hydrocarbon yield, gaseous hydrocarbon yield, and semi-coke yield. Standardize the data and divide it into training and test sets in an 8:2 ratio.

[0056] The input parameters in S1 include heating temperature (100–600℃), pressure (0.1–10MPa), heating rate (1–50℃ / min), total organic carbon content (TOC) (5%–60%), vitrinite reflectance (Ro) (0.3%–1.5%), and kerogen type. The output parameters include liquid hydrocarbon yield (0%–30%), gaseous hydrocarbon yield (0%–15%), and semi-coke yield (50%–98%).

[0057] Table 1. Partial Simulation Data of Shale Oil Hydrocarbon Generation

[0058] Temperature / °C Heating rate (°C / min) Pressure / MPa kerogen type TOC / % Ro / % Oil yield / % Semi-coke yield / % Gas production rate / % 185 10 0.1 Ⅱ 56.73 0.623 0 98.71 0.15 300 10 0.1 Ⅱ 56.73 0.623 0.2 95.15 0.21 350 10 0.1 Ⅱ 56.73 0.623 3.15 86.34 2.01 400 10 0.1 Ⅱ 56.73 0.623 8.08 81.97 3.39 475 10 0.1 Ⅱ 56.73 0.623 26.93 57.11 7.13 350 10 0.1 Ⅰ 42.5 0.501 1.91 94.19 2.11 400 10 0.1 Ⅰ 41.3 0.526 8.74 83.72 3.19

[0059] S2, Feature Selection and Key Parameter Determination Steps: First, the parameters output by S1 are processed using the Pearson correlation coefficient to remove feature parameters that are low in correlation with yield or highly collinear. Then, the importance of the remaining features is calculated and sorted using the random forest algorithm to determine the final set of input variables.

[0060] S3. Model Construction and Training Steps: A random forest regression model is constructed using the input variable set from S2. Multiple training subsets are generated through Bootstrap sampling with replacement. At each decision tree node split, a subset of features is randomly selected. A multi-output regression structure is used to simultaneously learn the mapping relationship between liquid hydrocarbons, gaseous hydrocarbons, and semi-coke yields. Connection weights are adjusted using a BP neural network model, and the mean squared error (MSE) and coefficient of determination are used to train the model. Two statistical parameters are used to evaluate the training and prediction performance of the neural network model and to determine whether the experimental data should be weighted or resampled.

[0061] Random Forest is a supervised algorithm based on ensemble learning. It improves model performance by constructing multiple decision trees and then aggregating their predictions. Its core has three key aspects: First, "sample randomness," using Bootstrap with sampling back, the generated training subset contains approximately 63.2% of the original data, with the remaining 36.8% being out-of-bag samples used to evaluate the model. Second, "feature randomness," selecting features only from a randomly chosen subset at each node split. For classification tasks, this typically involves selecting features equal to the square root of the total number of features; for regression tasks, it involves selecting one-third of the total number of features. Third, constructing "fully grown, unpruned decision trees," continuously splitting based on criteria such as Gini impurity or mean squared error until the purity of the leaf nodes reaches a certain standard, or the sample size is too small to split further. Finally, in classification tasks, the results of multiple decision trees are aggregated using majority voting; in regression tasks, the average result is used. Figure 1 The diagram shown is a structural diagram of a decision tree. A decision tree is a tree-like structure consisting of nodes, which include both internal nodes and leaf nodes, and directional edges.

[0062] In the initial stage of constructing a decision tree model, a sample set, denoted by D={W1,…,Wn}, is needed. This set is generated based on a specific probability distribution P. N independent samples are then drawn from this sample set. The main goal is to find a classification tree Tr that minimizes the error rate during classification tasks. A lower error rate results in better classification performance. Determining the splitting variables is a crucial step in this process. These feature vectors are obtained through an m-dimensional attribute condition set X. t ={t=1,…,m} is determined. The key to decision trees lies in selecting the optimal splitting features, which maximizes the effectiveness of the splitting points in the tree structure, thereby improving the efficiency and accuracy of classification.

[0063] In the feature selection process, calculating the purity gain Δi(t) is a crucial step. When Δi(t) reaches its maximum value, it signifies the optimal split point has been obtained, significantly improving the accuracy of the decision tree model and enabling more precise sample classification. Various feature selection methods are available for constructing decision trees, including ID3, CART, and C4.5 algorithms. While these algorithms have different characteristics, their common goal is to optimize the tree structure by selecting features with the maximum gain. For example, the ID3 algorithm uses information gain to measure the impact of features on classification, selecting the most valuable features; the CART algorithm is based on the Gini index method, evaluating the quality of features to optimize the tree structure; and the C4.5 algorithm uses a gain ratio method, comprehensively considering factors such as information gain and feature intrinsic values ​​to select the most suitable features, thus optimizing the tree structure. By employing these different algorithms and methods, decision tree models can better adapt to different datasets and application scenarios, improving their classification performance and generalization ability. Assuming the parent node and left and right child nodes are L, L1, and L2, the algorithm process is as follows. When selecting split nodes in a decision tree using the information gain method, the specific approach is to calculate the information loss caused by introducing each feature and select the feature that maximizes mutual information as the optimal branching rule. The entropy quantification impurity function i(t) is shown below:

[0064]

[0065] Information gain is shown in the formula:

[0066]

[0067] Where T is the current dataset, X is the feature used to partition the dataset, Q is the value of feature X, and q is the value of feature X. j (X) represents the j-th value of feature X, T j Based on the value q of feature X j (X) is the subset obtained after partitioning, and p(i|T) is the probability that a data set T belongs to class i.

[0068] The impurity i(t) calculated using the Gini index method is shown in the equation.

[0069]

[0070] The formula for the impurity gain ∆i(t) is shown below:

[0071]

[0072] Where J is the number of classes in the dataset, p(j|L) is the conditional probability of belonging to class j in parent node L, p L1The proportion of samples that parent node L divides into its left child node L1, p L2 Let p(j|L1) be the proportion of samples assigned from parent node L to right child node L2, p(j|L2) be the conditional probability of belonging to class j in left child node L1, and p(j|L2) be the conditional probability of belonging to class j in left child node L2.

[0073] Gain Ratio method, the information gain ratio is shown in the formula.

[0074]

[0075] Where IG(T, X, Q) is the information gain, Dom is the range of values ​​for feature X, and p(X=x) is the information gain. j |T) represents the value of feature X in dataset T, where X takes the value x. j The probability of.

[0076] While decision trees are widely used due to their simplicity and ease of use, they also have some drawbacks. As the tree depth increases, the number of nodes increases significantly, leading to a decrease in the number of leaf nodes and a decline in statistical significance. Furthermore, during the recursive generation of decision trees, topologically repetitive units may occur, causing an increase in the loss value and resulting in overfitting. To address these issues, the Random Forest algorithm is used here. This algorithm, based on decision trees, introduces two types of randomness to improve its performance and stability: random sampling and random feature selection. Random Forest generates multiple base classifiers through Bootstrap sampling and uses a weighted voting strategy to aggregate prediction results, effectively controlling the upper bound of the model's generalization error. The independence assumption of the base classifiers ensures prediction accuracy. The construction process of this ensemble learning framework includes the following two key steps: building a single decision tree and ensemble all decision trees. The specific operation steps are as follows:

[0077] Step 1: Perform bootstrap resampling on the original dataset. This involves using the Bootstrap resampling method to independently extract n samples from the original dataset of size N, thus creating a new dataset. This operation will be repeated until each new dataset is the same size as the original dataset.

[0078] Step 2: Construct the decision tree model. Based on the training subset obtained from Bootstrap sampling, a decision tree is generated using a recursive partitioning strategy. During the construction of the decision tree topology, for each internal node of the decision tree, instead of considering all features to achieve the optimal split, a subset of features is randomly selected from all features, and then the optimal splitting feature is chosen from these randomly selected features. This method of randomly selecting features improves the discriminative power of the base classifiers.

[0079] Through the above process, the random forest algorithm significantly reduces overfitting and improves the model's generalization performance on the test set. Let H(x) represent the random forest model, and h1(X), h2(X), ..., hi(X) represent multiple decision trees. Here, X represents the feature attribute of the sample, Y represents the class attribute of the sample, and I represents the indicator function. Next, we will define classification prediction and regression prediction as follows. The prediction result of random forest classification...

[0080]

[0081] (1) Regression prediction results of random forest

[0082]

[0083] Multiple training subsets are established through Bootstrap resampling, and features are randomly extracted during node splitting of each decision tree to enhance diversity. The model outputs predicted values ​​for three targets: liquid hydrocarbons, gaseous hydrocarbons, and semi-coke, belonging to a multi-output regression structure.

[0084] The BP neural network model is one of the most widely used artificial neural network models

[83] . It is a multi-layer feedforward network trained based on the backpropagation (BP) algorithm. The BP neural network model includes an input layer, several hidden layers, and an output layer

[84] . Its working principle is as follows: the neurons in the input layer receive various information from the outside and transmit it to the neurons in the hidden layer; the neurons in the hidden layer process and transform the received information and then transmit it to the output layer. The model uses the output results of forward propagation to calculate the error and adjusts the connection weights through backpropagation so that the actual output is as close as possible to the expected output. When the number of hidden layer neurons is appropriate, a BP neural network with only one hidden layer can achieve good prediction performance. Therefore, this study selects a three-layer neural network structure (i.e., an input layer, a hidden layer, and an output layer), and its network structure is as follows. Figure 3 As shown. Currently, there is no unified standard for selecting the number of neurons in the hidden layer; the most widely used empirical formula is as follows:

[0085] (8)

[0086] Where h is the number of hidden layer neurons, m is the number of input layer neurons, n is the number of output layer neurons, and a is an arbitrary constant between 0 and 10. Based on the aforementioned determined input and output features, the number of hidden layer neurons should be between 3 and 14. To obtain higher prediction accuracy and prevent overfitting, this study determined the optimal number of hidden layer neurons through multiple experiments. This study uses gradient descent to sequentially correct the weights and thresholds of the output and hidden layers. The specific correction calculation method is as follows:

[0087] Weight update

[0088]

[0089]

[0090] Threshold update

[0091]

[0092]

[0093] Where η is the learning rate, E is the error function, and w ki w ij These are the connection weights of the neurons, a and a'. k θ i These are the bias parameters of the neuron.

[0094] The transfer function is a key component of artificial neural networks, used to construct the mapping relationship between input and output variables. In most studies, the hidden layer usually chooses a sigmoid transfer function, while the output layer chooses a linear transfer function to obtain better prediction results

[87] . Therefore, this paper adopts the following combination of transfer functions, the mathematical expression of which is as follows:

[0095] S-type transfer function

[0096]

[0097] Linear transfer function

[0098]

[0099] Where: x is the input signal of the neuron; specifically, it is the sum of the products of the output values ​​of all neurons in the previous layer and their corresponding connection weights, plus the result of the current neuron's bias parameters.

[0100] Two statistical parameters are used to evaluate the training and prediction performance of neural network models: mean squared error (MSE) and coefficient of determination. Their definitions are given in formulas (15) and (16), respectively.

[0101] (15)

[0102] (16)

[0103] Where yi is the actual value, Here, n represents the predicted value, and n is the sample size. This represents the average value of experimental measurements. The smaller the MSE, the smaller the prediction error of the model. This reflects the model's fit to the data, with a value ranging from [0,1]. The closer to 1, the better the model's fit. The model has a three-layer structure (input layer – hidden layer – output layer). The number of neurons in the hidden layer is optimized using empirical formulas and validation. The preferred activation function is a combination of sigmoid and linear activation functions. Robustness enhancement strategies can be incorporated during training, such as weight adjustment or resampling for outlier experimental data.

[0104] S4. Model evaluation and stratified verification steps: Using mean square error (MSE) and coefficient of determination (R²) as evaluation indicators, secondary verification is carried out according to pyrolysis temperature zones after the overall test. A weight adjustment strategy is adopted for abnormal data to reduce its impact.

[0105] S5. Output and Interpretability Steps: Output the predicted yields of liquid hydrocarbons, gaseous hydrocarbons, and semi-coke, and also output the importance ranking results of each input feature.

[0106] The weight adjustment strategy for outlier data in S4 is as follows: when the prediction error of a single sample exceeds 1.5 times the average error of all samples, the training weight of the outlier sample is adjusted to 0.3-0.7 times the weight of the normal sample; or Bootstrap resampling is used to replace the outlier sample, with the replacement ratio not exceeding 5% of the total number of samples.

[0107] Reference Figure 4 As shown: An original dataset was established using experimental data from in-situ pyrolysis of oil shale to generate hydrocarbons, divided into training and testing sets in an 8:2 ratio. The yield of simulated hydrocarbon generation products from oil shale varies depending on different pyrolysis conditions. Therefore, the collected data mainly included: heating temperature, pressure, heating rate, TOC, RO, kerogen type, oil generation rate, gas generation rate, and semi-coke yield. Subsequently, feature selection was performed on the oil generation rate, gas generation rate, semi-coke yield, and component datasets using Pearson correlation coefficient analysis combined with feature importance ranking. In this experiment, six parameters (heating temperature, pressure, heating rate, TOC, RO, and kerogen type) were selected as input data, mainly because these parameters are all important factors affecting hydrocarbon generation and have low correlation with each other. Three parameters (oil generation rate, gas generation rate, and semi-coke yield) were selected as output data because these parameters can directly reflect the degree of shale development. A BP neural network model and a random forest model were established, and their predictive performance was compared. Specific research methods can be found in [link to research details]. Figure 4 .

[0108] Reference Figure 5 As shown: This study selects the original geochemical parameters and experimental conditions of oil shale as input data to improve the applicability of the prediction model. In the dataset selection, 80% was randomly chosen as the training set, and the remaining 20% ​​as the test set, to achieve the prediction of the three-state yield of hydrocarbon generation products from medium- and low-maturity oil shale. Figure 5Before model training, all data was standardized to avoid numerical overflow issues caused by weights that are too large or too small.

[0109] Reference Figure 6 , 7 As shown in Figures 6, 7, and 8, based on the determined optimal model parameters, the regression prediction graphs for the two algorithms are as follows: The BP algorithm shows most data points scattered around Y=X, with oil and semi-coke yields showing better fitting results than gas yield, but overall, the prediction stability for the three products is poor. The RF algorithm shows most data points distributed on or near the Y=X ray, with regression coefficients for both training and test samples above 0.84, and the regression coefficient for the training samples above 0.9, indicating a good correlation between predicted and actual yields. It is worth noting that there are significant deviations between predicted and experimental values ​​for some samples. On the one hand, due to the inherent complexity of the pyrolysis process of medium- and low-maturity shale, the network's learning and prediction capabilities are limited, and some relatively extreme data cannot be predicted well. On the other hand, errors also exist in the pyrolysis experiments. The most obvious error is in the gas yield prediction results, which may be due to gas leakage during gas collection, leading to deviations in the collected gas data, thus causing some errors in gas yield prediction. The yield of pyrolysis products from medium- and low-maturity shale is closely related to the heating temperature. To explore the predictive effectiveness of the RF model based on the characteristics of medium-to-low maturity shale for the three-state pyrolysis yields of medium-to-low maturity shale at different temperatures, experimental and predicted values ​​were compared at different temperatures. The results are as follows: Figure 8 As shown, the RF network performs better in predicting shale semi-coke than in predicting oil and gas. Further calculations show that the average relative errors for predicting gas, oil, and semi-coke are 1.06%, 1.82%, and 8.3%, respectively. The largest deviation in pyrolysis gas yield is observed at 300℃, at 0.81%, followed by pyrolysis oil at 0.6%.

[0110] Example 1: Shale oil pyrolysis yield prediction in the laboratory based on the above method

[0111] Sample preparation and geochemical parameter determination: Collect shale samples from the target strata, dry, crush and pulverize them to make the particle size less than 80 mesh; determine the total organic carbon content (TOC), vitrinite reflectance (Ro), and kerogen type; record the pyrolysis process parameters such as heating temperature, pressure, and heating rate under experimental or field conditions.

[0112] Data input and model invocation: Input the above parameters (temperature, pressure, heating rate, TOC, Ro, kerogen type) into the trained prediction model; the model can be deployed on a personal computer or workstation and implemented using Python, MATLAB or other data analysis software; the model input interface can be set to table or command line format for easy direct numerical input.

[0113] Prediction and Results Output: The model automatically outputs the predicted yields of liquid hydrocarbons, gaseous hydrocarbons, and semi-coke; it also provides a ranking of feature importance to facilitate the analysis of the influence of key control factors, such as temperature, TOC, and Ro, on the yield.

[0114] Applications of the results: Based on the predicted yield distribution, pyrolysis experimental conditions or field development plans can be adjusted, such as increasing the temperature or adjusting the heating rate to optimize liquid hydrocarbon yield. In shale oil resource evaluation, the predicted values ​​can be used to estimate recoverable oil and gas quantities and conduct economic analysis, reducing the need for numerous redundant experiments.

[0115] Example 2: Rapid on-site prediction of shale oil potential based on the above method

[0116] Rapid parameter acquisition: After field drilling and sampling, TOC and Ro are quickly estimated using a portable TOC analyzer and microscope; on-site pressure is calculated based on drilling data and formation depth, and potential pyrolysis temperature is estimated based on geothermal gradient.

[0117] Input and computation: Input the acquired data into the random forest prediction model that has been deployed on a laptop or tablet in the field; the model can be pre-loaded and run in a network-free environment to ensure field availability.

[0118] Prediction and Decision Making: The theoretical production ratios of oil, gas, and semi-coke are obtained to help determine whether the block has commercial development potential; if the predicted yield of liquid hydrocarbons is high, detailed sampling and further pyrolysis experiments of the block can be prioritized.

[0119] Example 3: Industrialized Data Center Batch Evaluation Based on the Above Method

[0120] Data integration: Experimental data from different well locations, along with logging and geochemical data, are centrally organized into a unified database; batch input is then fed into the model, and automated processing is achieved through scripts.

[0121] Batch prediction and regional evaluation: The system automatically outputs the predicted oil, gas and semi-coke production rates for each well location and generates regional distribution maps; it assists enterprises in block selection and economic evaluation, saving a lot of experimental time and costs.

Claims

1. A method for predicting shale oil pyrolysis yield based on feature selection and ensemble learning, characterized in that, Includes the following steps: S1. Data Acquisition and Preprocessing Steps: Collect shale oil pyrolysis experimental data. Input parameters include heating temperature, pressure, heating rate, total organic carbon content (TOC), vitrinite reflectance (Ro), and kerogen type. Output parameters include liquid hydrocarbon yield, gaseous hydrocarbon yield, and semi-coke yield. Standardize the data and divide it into training and test sets at an 8:2 ratio. S2, Feature Selection and Key Parameter Determination Steps: First, the parameters output by S1 are processed using the Pearson correlation coefficient to remove feature parameters that are low in correlation with yield or highly collinear. Then, the importance of the remaining features is calculated and sorted using the random forest algorithm to determine the final set of input variables. S3. Model building and training steps: Construct a random forest regression model using the input variable set in S2, generate multiple training subsets by sampling with replacement using Bootstrap, randomly select some features when splitting each decision tree node, and use a multi-output regression structure to simultaneously learn the mapping relationship between liquid hydrocarbons, gaseous hydrocarbons and semi-coke yields. By adjusting the connection weights of the BP neural network model, the training and prediction performance of the neural network model is evaluated using two statistical parameters: mean squared error (MSE) and coefficient of determination (R²), to determine whether the experimental data should be resampled or reweighted. S4. Model evaluation and stratified verification steps: Using mean square error (MSE) and coefficient of determination (R²) as evaluation indicators, secondary verification is carried out according to pyrolysis temperature zones after the overall test. A weight adjustment strategy is adopted for abnormal data to reduce its impact. S5. Output and Interpretability Steps: Output the predicted yields of liquid hydrocarbons, gaseous hydrocarbons, and semi-coke, and also output the importance ranking results of each input feature.

2. The shale oil pyrolysis yield prediction method based on feature screening and ensemble learning according to claim 1, characterized in that: The input parameters in S1 include heating temperature (100–600℃), pressure (0.1–10 MPa), heating rate (1–50℃ / min), total organic carbon content (TOC) (5%–60%), vitrinite reflectance (Ro) (0.3%–1.5%), and kerogen type. The output parameters include liquid hydrocarbon yield (0%–30%), gaseous hydrocarbon yield (0%–15%), and semi-coke yield (50%–98%).

3. The shale oil pyrolysis yield prediction method based on feature screening and ensemble learning according to claim 1, characterized in that: The random forest regression model generates multiple base classifiers through Bootstrap sampling with replacement. The remaining 36.8% of the out-of-bag samples are used for initial model evaluation. The base classifiers are fully grown, unpruned decision trees. When splitting nodes, one-third of the total number of input features are randomly selected as candidate features, and then the optimal splitting feature is selected. In the ensemble stage, an average aggregation strategy is used to fuse the prediction results of each base classifier. The independence of the base classifiers and the randomness of the features reduce the risk of overfitting and effectively control the upper bound of the model's generalization error. The construction process includes the following steps: Step 1: Perform Bootstrap resampling on the original dataset of size N, independently extracting n samples to form a new dataset, repeating the operation until the size of the new dataset is the same as that of the original dataset; Step 2: Based on the training subset obtained by resampling, generate a decision tree through a recursive partitioning strategy, using Gini impurity or mean square error as the node splitting criterion, until the purity of the leaf nodes meets the standard or the number of samples cannot be further split. Let H(x) represent the random forest model, h1(X), h2(X)...hi(X) represent multiple decision trees, where X represents the feature attribute of the sample, Y represents the class attribute of the sample, and I represents the indicator function; Random forest classification prediction results Regression prediction results of random forest 。 4. The shale oil pyrolysis yield prediction method based on feature screening and ensemble learning according to claim 3, characterized in that: The decision tree adopts a single hidden layer structure. The optimal splitting feature when a node splits is determined by calculating the purity gain Δi(t). The purity gain calculation is based on any one of the Gini impurity method, information gain method, or gain ratio method. No pruning is performed during the construction of the decision tree. The conditions for stopping the splitting of a leaf node are: the number of samples in the node is ≤5, or the purity of the sample class is ≥95%, or the purity gain Δi(t) <0.

01.

5. The shale oil pyrolysis yield prediction method based on feature screening and ensemble learning according to claim 4, characterized in that: The neurons in the input layer of the BP neural network model receive various information from the outside and transmit it to the neurons in the hidden layer. After the neurons in the hidden layer process and transform the received information, they transmit it to the output layer. The gradient descent method is used to adjust the weights and thresholds of the output layer and the hidden layer in turn. The hidden layer usually chooses a sigmoid transfer function and the output layer chooses a linear transfer function to obtain better prediction results.

6. The shale oil pyrolysis yield prediction method based on feature screening and ensemble learning according to claim 5, characterized in that: The calculation method for the weights and threshold corrections of the output layer and hidden layer is as follows: Weight update: Threshold update: Where η is the learning rate, E is the error function, and w ki w ij These are the connection weights of the neurons, a and b, respectively. k θ i These are the bias parameters of the neuron.

7. The shale oil pyrolysis yield prediction method based on feature screening and ensemble learning according to claim 6, characterized in that: The mathematical expression for the S-type transfer function is as follows: The mathematical expression for a linear transfer function is as follows: Where: x is the input signal of the neuron; specifically, it is the sum of the products of the output values ​​of all neurons in the previous layer and their corresponding connection weights, plus the result of the current neuron's bias parameters.

8. The shale oil pyrolysis yield prediction method based on feature screening and ensemble learning according to claim 7, characterized in that: The formula for locating the mean square error (MSE) in S3 is as follows: Coefficient of determination (R) 2 The positioning formula for () is as follows: Where: y i This is the actual value. Here, n represents the predicted value, and n is the sample size. The mean value is the experimental measurement; the smaller the MSE, the smaller the prediction error of the model; R2 reflects the goodness of fit of the model to the data, with a value range of [0,1], and the closer it is to 1.

9. The shale oil pyrolysis yield prediction method based on feature screening and ensemble learning according to claim 5, characterized in that: The number of neurons h in the hidden layer of the BP neural network is determined by an empirical formula, which is: Where m is the number of neurons in the input layer, n is the number of neurons in the output layer, and a is an adjustable constant between 0 and 10. In practical applications, through multiple verifications and optimizations, the h value that minimizes the model's MSE is finally selected, with a value range of 3-14.

10. The shale oil pyrolysis yield prediction method based on feature screening and ensemble learning according to claim 1, characterized in that: The weight adjustment strategy for abnormal data in S4 is as follows: when the prediction error of a single sample exceeds 1.5 times the average error of all samples, the training weight of the abnormal sample is adjusted to 0.3-0.7 times the weight of the normal sample; or Bootstrap resampling is used to replace the abnormal sample, and the replacement ratio does not exceed 5% of the total number of samples.