A basic rock temperature prediction method based on an extreme random forest algorithm
By constructing a temperature prediction model for basic rocks using the extreme random forest algorithm, the problems of insufficient accuracy and limited applicability in existing technologies are solved, achieving higher accuracy and wider applicability in temperature prediction.
Patent Information
- Application Number
- CN202510750671.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2045-06-06
AI Technical Summary
Existing technologies have limitations in accuracy and applicability in predicting the temperature of basic rocks, especially due to errors caused by dependence on the determination of specific magma types and water content parameters, and the lack of systematic feature screening in machine learning models.
A temperature prediction model is constructed using the extreme random forest algorithm. Water content is not used as a feature. The model's feature combination and hyperparameter combination are optimized by combining the main oxide composition of the melt and clinopyroxene with geochemical derivative features and through combined feature selection and hyperparameter tuning.
It significantly improves the accuracy and applicability of temperature prediction, enhances the model's prediction accuracy and robustness, avoids errors in water content determination, and achieves more accurate temperature prediction for basic rocks.
Smart Images

Figure CN120596844B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of geological temperature calculation science and technology, and in particular to a method for predicting the temperature of basic rocks based on the extreme random forest algorithm. Background Technology
[0002] The temperature at which basic magma formed is a key parameter for analyzing the mantle-crust interaction mechanism, inferring the plate tectonic setting, and reconstructing the Earth's deep thermodynamic environment. Empirical equations based on the chemical equilibrium between minerals and melts, established through experimental calibration and thermodynamic modeling, are currently the mainstream technique for predicting the temperature of basic rocks. However, these equations often employ linear or low-order polynomial regression fitting, making it difficult to accurately capture the complex nonlinear mapping relationship between compositional data and temperature, resulting in limited prediction accuracy and application typically confined to specific compositional systems. With the continuous expansion of artificial intelligence in Earth sciences, some studies have attempted to introduce machine learning methods to construct temperature prediction models, but systematic feature selection has not been conducted, and many rely on water in the melt as an input variable. Since accurate determination of water content in natural rocks and minerals is difficult, and estimating water content through indirect empirical formulas easily introduces multi-source errors, these models still face certain limitations in practical applications.
[0003] A method for predicting the temperature of basic rocks based on the extreme random forest algorithm is proposed. By constructing an extreme random forest model that does not use water content as a feature for training, the method can predict the temperature of basic rocks by integrating machine learning. It can automatically mine the hidden patterns in high-dimensional data, eliminate the prior assumptions of traditional empirical equations, and provide a new approach to solving the inversion problem of complex diagenetic physical conditions. Summary of the Invention
[0004] The purpose of this invention is to provide a method for predicting the temperature of basic rocks based on the extreme random forest algorithm.
[0005] To achieve the above objectives, the present invention is implemented according to the following technical solution:
[0006] This invention provides a method for predicting the temperature of basic rocks based on the extreme random forest algorithm, comprising:
[0007] S1 collected experimental data on basic magma and constructed a database containing experimental temperatures and mineral-melt compositions in the clinopyroxene-melt system;
[0008] S2 removes unbalanced and extreme experimental data from the database according to preset conditions to obtain the original dataset;
[0009] S3 performs data preprocessing on the original dataset to obtain a valid dataset; the valid dataset includes melt features, clinopyroxene features, and derived features; the derived features include the magnesium index of clinopyroxene and the magnesium-iron partition coefficient of clinopyroxene-melt.
[0010] S4 constructs a temperature prediction model based on the extreme random forest algorithm. It uses an effective dataset to initially train the model and combines combined feature selection and hyperparameter tuning to determine the optimal feature combination and hyperparameter combination, thus obtaining the final temperature prediction model.
[0011] S5 makes temperature predictions based on the final temperature prediction model.
[0012] Preferably, the preset conditions in S2 include limitations on experimental temperature threshold, component content range, and mineral-melt magnesium-iron partition coefficient.
[0013] Preferably, the data preprocessing method described in S3 includes: performing multivariate regression imputation on missing values in the original dataset, selecting melt features and monoclinic pyroxene features from the processed original dataset, further constructing derived features, performing central logarithmic transformation on the component data in the features, and then performing Z-score standardization.
[0014] Preferably, the melt characteristics in S3 include the SiO2, TiO2, Al2O3, FeO, MgO, MnO, CaO, Na2O and K2O characteristics of the melt, and the clinopyroxene characteristics include the SiO2, TiO2, Al2O3, Cr2O3, FeO, MgO, MnO, CaO and Na2O characteristics of clinopyroxene.
[0015] Preferably, the method steps for training the model using an effective dataset as described in S4 are as follows:
[0016] The effective dataset is divided into several data subsets based on the variable temperature, using equal-frequency partitioning.
[0017] Samples of equal proportions are extracted from each data subset to construct training and validation sets. The temperature prediction model is then trained based on the training set.
[0018] Preferably, the method steps described in S4, which combine combinatorial feature selection and hyperparameter tuning to determine the optimal feature combination and hyperparameter combination, are as follows:
[0019] S41 combines filtered feature selection and forward feature selection to determine the optimal feature combination:
[0020] Filtered feature selection: The temperature prediction model is trained a preset number of times, the average contribution of different features to temperature prediction is extracted, and the top n features are selected to construct an initial feature subset;
[0021] Forward feature selection: Based on the initial feature subset, introduce features that can improve model performance, construct the optimal feature combination, until the introduced features can no longer improve model performance;
[0022] S42 performs a grid search on the number of decision trees and the maximum number of features for node partitioning in the temperature prediction model to generate a set of hyperparameter combinations. Based on the optimal feature combination in S41, the performance of the model under different hyperparameter combinations is evaluated, and the optimal hyperparameter combination is selected.
[0023] Compared with the prior art, the embodiments of the present invention have at least the following advantages or beneficial effects:
[0024] (1) By constructing a feature input system that does not introduce water content, this invention breaks through the dependence of existing technologies on the determination of specific magma types and water content parameters, and significantly improves the accuracy and applicability of temperature prediction.
[0025] (2) In terms of feature construction, this invention not only uses the main oxide components of melt and clinopyroxene, but also introduces geochemical derived features to enhance the model’s ability to express temperature-sensitive features.
[0026] (3) The present invention optimizes the temperature prediction model by combining hyperparameter optimization and feature importance ranking, thereby enhancing the prediction accuracy and robustness of the model. Attached Figure Description
[0027] Figure 1 This is a flowchart of a method for predicting the temperature of basic rocks based on the extreme random forest algorithm according to the present invention.
[0028] Figure 2 This is a schematic diagram illustrating the evaluation results of different machine learning algorithms in an embodiment of the present invention;
[0029] Figure 3 This is a bar chart showing the importance of each feature in the embodiments of the present invention;
[0030] Figure 4 This is a schematic diagram of the forward feature selection results based on five-fold cross-validation in an embodiment of the present invention;
[0031] Figure 5 The temperature prediction model in this embodiment of the invention is based on the residual-frequency distribution and the true-predicted value plot under the independent validation set. Detailed Implementation
[0032] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0033] Reference Figure 1 As shown, this invention provides a method for predicting the temperature of basic rocks based on the extreme random forest algorithm, comprising the following steps:
[0034] S1 collected experimental data on basic magma and constructed a database containing experimental temperatures and mineral-melt compositions in the clinopyroxene-melt system.
[0035] In this embodiment, basic rock data from mainstream domestic and international journals and global open-source databases are organized to construct a database containing experimental temperatures and mineral-melt compositions in the clinopyroxene-melt system.
[0036] S2 removes unbalanced and extreme experimental data from the database according to preset conditions to obtain the original dataset.
[0037] In this embodiment, the preset condition is specifically: the experimental temperature must be less than 1800°C. The SiO2 content of the melt must be greater than 35%, and the magnesium-iron partition coefficient of the mineral-melt should be the mean value across all samples. Within a range of several standard deviations, a total of 2422 original sample records were obtained.
[0038] S3 performs data preprocessing on the original dataset to obtain a valid dataset; the valid dataset includes melt features, clinopyroxene features, and derived features; the derived features include the magnesium index of clinopyroxene and the magnesium-iron partition coefficient of clinopyroxene-melt.
[0039] In some embodiments, the data preprocessing method described in S3 includes: performing multivariate regression imputation on missing values in the original dataset, selecting melt features and monoclinic pyroxene features from the processed original dataset, further constructing derived features, performing central logarithmic transformation on the component data in the features, and then performing Z-score standardization.
[0040] The melt characteristics include the SiO2, TiO2, Al2O3, FeO, MgO, MnO, CaO, Na2O and K2O characteristics of the melt, and the clinopyroxene characteristics include the SiO2, TiO2, Al2O3, Cr2O3, FeO, MgO, MnO, CaO and Na2O characteristics of clinopyroxene.
[0041] It should be explained that introducing geochemical derivative features can improve the temperature fitting ability of temperature prediction models and help to characterize the thermodynamic response features between minerals and melts.
[0042] S4 constructs a temperature prediction model based on the extreme random forest algorithm. It uses an effective dataset to initially train the model and combines combined feature selection and hyperparameter tuning to determine the optimal feature combination and hyperparameter combination, thus obtaining the final temperature prediction model.
[0043] Specifically, such as Figure 2 As shown, the performance of four mainstream machine learning algorithms—multivariate linear regression, extreme random forest, Gaussian process regression, and support vector regression—is evaluated. The training set is further divided into a training subset and a test set in a 4:1 ratio, and this process is repeated 100 times to reduce the randomness of a single partition. The coefficient of determination R for each model in each training round is recorded. 2 Based on the standard error SEE, the optimal Extreme Random Forest algorithm is finally selected to construct the model.
[0044] In this embodiment, the effective dataset is divided into 10 data subsets based on the variable temperature. 20% of the samples are extracted from each data subset to construct a validation set, and the remaining samples are merged into a training set. The validation set contains a total of 485 samples, and the training set contains a total of 1937 samples. The temperature prediction model is then trained based on the training set.
[0045] It should be explained that in the original dataset, the samples are divided into several subsets based on the temperature variable using the equal-frequency binning method. This ensures that the number of samples in each subset is balanced. At the same time, within each subset, the training set and validation set are divided in equal proportions. By controlling the sampling ratio within each subset, the uniformity of the validation set within the temperature distribution range is guaranteed, thereby improving the accuracy and reliability of the model's generalization ability assessment under different temperature conditions.
[0046] In this embodiment, the average contribution of different features to temperature prediction in the extreme random forest model is extracted to obtain the following: Figure 3 The importance of each feature is shown, and the top 8 features are selected to construct an initial feature subset, including: SiO2, MgO, CaO and FeO of the melt, FeO and CaO of clinopyroxene, magnesium index of clinopyroxene, and magnesium-iron partition coefficient of clinopyroxene-melt.
[0047] like Figure 4 As shown, the model performance varies with the number of features. The model performs best when there are 16 features. The optimal feature combination includes the 8 features in the initial subset, as well as the TiO2, Al2O3, Na2O, K2O, and MnO features of the melt and the TiO2, Al2O3, and Na2O features of monoclinic pyroxene.
[0048] Specifically, by using a combined feature selection strategy, the shortcomings of forward feature selection, which is prone to getting trapped in local optima, and filtering methods, which often ignore the complex interactions between features, are avoided. This helps to select feature combinations that are more globally optimal, thereby improving model performance.
[0049] In this embodiment, a grid search is performed on the number of decision trees and the number of node splitting features to generate a set of hyperparameter combinations. All hyperparameter combinations are evaluated through 100 five-fold cross-validations. Finally, a decision tree count of 600 and a maximum number of node splitting features of 15 are selected as the optimal hyperparameter combinations. The determination coefficients and standard errors of the model under different hyperparameter combinations are shown in Tables 1 and 2.
[0050] Table 1. Average coefficients of determination for different combinations of hyperparameters
[0051]
[0052] Table 2. Average standard error of different hyperparameter combinations
[0053]
[0054] In this embodiment, the final temperature prediction model is obtained based on the optimal feature combination and hyperparameter combination, and the model file is saved. The temperature prediction model has a significant fitting effect on the training set with a coefficient of determination of 0.938 and a standard error of 38.01.
[0055] S5 uses a trained temperature prediction model to predict the temperature of basic rocks.
[0056] In this embodiment, as Figure 5 As shown, the final temperature prediction model exhibits significant good fit and prediction stability on the validation set, with a coefficient of determination of 0.934 and a standard error of 38.95. No overfitting was observed, and the final temperature prediction model demonstrates good generalizability.
[0057] The above description is merely an example and illustration of the structure of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the structure of the invention or exceed the scope defined in the claims, all of which should fall within the protection scope of the present invention.
Claims
1. A method for predicting the temperature of basic rocks based on the extreme random forest algorithm, characterized in that, Includes the following steps: S1 collected experimental data on basic magma and constructed a database containing experimental temperatures and mineral-melt compositions in the clinopyroxene-melt system; S2 removes unbalanced and extreme experimental data from the database according to preset conditions to obtain the original dataset; S3 performs data preprocessing on the original dataset to obtain a valid dataset; the valid dataset includes melt features, clinopyroxene features, and derived features; the derived features include the magnesium index of clinopyroxene and the magnesium-iron partition coefficient of clinopyroxene-melt. S4 constructs a temperature prediction model based on the extreme random forest algorithm. It uses an effective dataset to initially train the model and combines combined feature selection and hyperparameter tuning to determine the optimal feature combination and hyperparameter combination, thus obtaining the final temperature prediction model. S5 makes temperature predictions based on the final temperature prediction model.
2. The method for predicting the temperature of basic rocks based on the extreme random forest algorithm according to claim 1, characterized in that, The preset conditions described in S2 include the experimental temperature threshold, the range of component content, and the limitation of the mineral-melt magnesium-iron partition coefficient.
3. The method for predicting the temperature of basic rocks based on the extreme random forest algorithm according to claim 1, characterized in that, The data preprocessing method described in S3 includes: performing multivariate regression imputation on missing values in the original dataset, selecting melt features and monoclinic pyroxene features from the processed original dataset, further constructing derived features, performing central logarithmic transformation on the component data in the features, and then performing Z-score standardization.
4. The method for predicting the temperature of basic rocks based on the extreme random forest algorithm according to claim 1, characterized in that, The melt characteristics described in S3 include the SiO2, TiO2, Al2O3, FeO, MgO, MnO, CaO, Na2O and K2O characteristics of the melt, and the clinopyroxene characteristics include the SiO2, TiO2, Al2O3, Cr2O3, FeO, MgO, MnO, CaO and Na2O characteristics of clinopyroxene.
5. The method for predicting the temperature of basic rocks based on the extreme random forest algorithm according to claim 1, characterized in that, The method and steps for initial training of the model using a valid dataset as described in S4 are as follows: The effective dataset is divided into several data subsets based on the variable temperature, using equal-frequency partitioning. Samples of equal proportions are extracted from each data subset to construct training and validation sets. The temperature prediction model is then trained based on the training set.
6. The method for predicting the temperature of basic rocks based on the extreme random forest algorithm according to claim 1, characterized in that, The method steps described in S4, which combine combinatorial feature selection and hyperparameter tuning to determine the optimal feature combination and hyperparameter combination, are as follows: S41 combines filtered feature selection and forward feature selection to determine the optimal feature combination: Filtered feature selection: The temperature prediction model is trained a preset number of times, the average contribution of different features to temperature prediction is extracted, and the top n features are selected to construct an initial feature subset; Forward feature selection: Based on the initial feature subset, introduce features that can improve model performance, construct the optimal feature combination, until the introduced features can no longer improve model performance; S42 performs a grid search on the number of decision trees and the maximum number of features for node partitioning in the temperature prediction model to generate a set of hyperparameter combinations. Based on the optimal feature combination in S41, the performance of the model under different hyperparameter combinations is evaluated, and the optimal hyperparameter combination is selected.
Citation Information
Patent Citations
Gas high-pressure isothermal adsorption curve prediction method and system, storage medium and terminal
CN111625953A
Second-hand house price prediction method based on deep learning
CN118569892A