A method for fitting mineral composition based on element composition
Patent Information
- Application Number
- CN202611082265.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-09-25
AI Technical Summary
[0003](1)岩石X 射线衍射法(XRD矿物分析):通过X射线衍射仪直接测量获得岩石样品全岩矿物的种类与含量,该方案需要对岩石样品进行预处理,将整块岩石粉碎至符合检测要求的粒度,再经过压片制备成可直接检测的样品后放入仪器检测,最终通过图谱解析得到岩石的矿物组成及各组分含量,该方法整体准确性高,但时效性慢
[0049]本发明基于元素组成拟合矿物成分的方法,尤其是针对页岩、碳酸盐岩以及深层、超深层油气储集层岩石样品,包含油气井钻井过程中产生的随钻岩屑、岩块以及标准的圆柱状岩心样品。
Smart Images

Figure CN122822121A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oil and gas exploration technology, and specifically to a method for fitting mineral composition based on elemental composition. Background Technology
[0002] Rock composition is a core fundamental parameter for lithological classification, stratigraphic identification, hydrocarbon reservoir evaluation, hydrocarbon accumulation analysis, and sedimentary facies classification. Accurately obtaining the mineral composition of rocks is of crucial guiding significance for oil and gas exploration and development. Currently, the closest existing technology for obtaining rock mineral composition is:
[0003] (1) Rock X-ray diffraction method (XRD mineral analysis): The types and contents of whole rock minerals in rock samples are obtained directly by X-ray diffraction. This method requires pretreatment of rock samples, crushing the whole rock into particles that meet the detection requirements, and then preparing samples that can be directly detected by pressing them into tablets before putting them into the instrument for detection. Finally, the mineral composition and contents of each component of the rock are obtained by analyzing the spectrum. This method has high overall accuracy, but slow timeliness.
[0004] (2) Geophysical logging method: The mineral composition of rocks can be calculated by combining data from various logging curves such as natural gamma, resistivity, and sonic transit time with empirical formulas. It can obtain real-time data during drilling operations and has strong timeliness. However, due to the influence of various factors such as the accuracy of logging data interpretation, reservoir porosity, and pore fluid properties, the calculated mineral composition has a large error, and the accuracy of the results is difficult to guarantee. Furthermore, it cannot be directly applied to the rapid mineral analysis of cuttings samples during drilling.
[0005] X-ray fluorescence spectroscopy (XRF elemental analysis): After obtaining the elemental composition of the rock, the mineral content is directly estimated according to the empirical ratio. Although this method has a simple processing procedure and fast detection speed, the estimation results are greatly affected by the empirical coefficient, and the adaptability to different regions and different types of rocks is poor. The accuracy cannot meet the research needs of oil and gas exploration and development.
[0006] Rock X-ray diffraction requires sample crushing and pretreatment, a cumbersome process with a long preparation cycle, making it unsuitable for rapid analysis of cuttings samples during drilling. Furthermore, its high cost prevents rapid analysis of large batches of samples. Geophysical logging suffers from large errors and insufficient accuracy, and cannot directly analyze acquired cuttings and core samples, only providing estimates for the entire formation, failing to meet the detailed study requirements of individual samples. Interpretation results typically require correction through rock analysis. X-ray fluorescence spectroscopy is heavily influenced by experience and fitting algorithms, has poor adaptability to different rock types, and low estimation accuracy, failing to meet the precision requirements for quantitative mineral composition analysis in oil and gas exploration and development scenarios. Summary of the Invention
[0007] To address the technical problems existing in the background art mentioned above, this invention proposes a method for fitting mineral composition based on elemental composition. The method is well-conceived and employs machine learning-based residual correction. It incorporates a machine learning algorithm into the traditional physical model to correct biases. The machine learning model does not directly predict mineral content but learns the residuals from stoichiometric inversion results. The advantage of this "residual learning" strategy is that the model only corrects biases, while stoichiometric inversion ensures chemical rationality. The two complement each other perfectly, resulting in small fitting errors and excellent reliability, making it suitable for widespread application.
[0008] To address the aforementioned technical problems, this invention provides a method for fitting mineral composition based on elemental composition, comprising the following steps:
[0009] (1) Rock element input
[0010] Input multiple rock elements and normalize their mass fraction values;
[0011] (2) Stoichiometric inversion
[0012] A stoichiometric matrix is constructed based on the mineral chemical formula, and the mineral proportions are solved by the non-negative least squares method with L1 regularization. The results always satisfy the chemical conservation law.
[0013] (3) Machine learning residual correction
[0014] Using the residuals of measured samples as the training target, gradient boosting regression trees are used to learn systematic bias patterns and correct mineral inversion results.
[0015] (4) Data post-processing
[0016] Gaussian noise perturbation is applied to the element content after normalization in step (1), the complete inversion pipeline is run repeatedly, the distribution of mineral results is statistically analyzed, and the confidence interval of each mineral content is given.
[0017] (5) Mineral composition results output
[0018] Output the fitted mineral composition results and provide the confidence interval for the content of each mineral.
[0019] As a preferred embodiment of the present invention, the specific process of step (2) is as follows:
[0020] (2.1) Stoichiometric matrix: Each mineral has a definite chemical formula, based on which its molar mass and the mass fraction of each element are calculated;
[0021] For each mineral, calculate and construct the stoichiometric matrix A:
[0022] A[i][j] =The mass fraction of the i-th element in the j-th mineral;
[0023] A∈R^{H×L};
[0024] In the above formula, rows correspond to H types of core elements, and columns correspond to L types of minerals;
[0025] (2.2) Inversion solution
[0026] Given an element content vector b, the mineral proportion vector x is obtained by inverting the non-negative least squares method, such that A x As close as possible to b; actual rocks contain only 3-8 major minerals, therefore L1 sparsity regularization is introduced:
[0027] min||A x -b|| 2 2+λ||x||;
[0028] Constraints:
[0029] 0≤x j ≤1;
[0030] Σx j =1;
[0031] In the above formula, λ is the sparsity parameter, with a default value of 0.01; increasing λ makes the result more sparse, while decreasing λ allows more minerals to participate; the inversion solution is solved using a non-negative least squares solver based on the trust region reflection least squares algorithm.
[0032] (2.3) Post-processing
[0033] After solving, perform the following processing:
[0034] ① Normalized to 100%;
[0035] ② Remove trace minerals with a proportion of less than 0.5%;
[0036] ③ Renormalize.
[0037] As a preferred embodiment of the present invention, the specific process of step (3) is as follows:
[0038] Gradient boosting regression tree (GBR) model is used, and one GBR model is trained for each of the most common minerals; each model outputs the correction amount for the corresponding mineral proportion.
[0039] Set hyperparameters, including number of trees, maximum depth, learning rate, and subsampling rate;
[0040] Input feature vector: The feature consists of two parts: the content of core elements and the preliminary mineral proportion obtained by inverting the stoichiometric matrix;
[0041] GBR model training:
[0042] ① Divide the samples into training set and test set;
[0043] ② Invert and solve for all training samples to obtain preliminary mineral proportions;
[0044] ③ Calculate the residual = measured mineral proportion - preliminary mineral translation proportion;
[0045] ④ The GBR model is trained using the residuals as labels, and K-fold cross-validation is used, with K ranging from 3 to 10;
[0046] ⑤ When making predictions: Final result = stoichiometric result + GBR correction amount → non-negative clipping → normalization.
[0047] As a preferred embodiment of the present invention: after the mineral composition results of step (5) are output, the method for fitting mineral composition must also perform rock classification, specifically classifying the various minerals into their respective petrological components.
[0048] By adopting the above technical solution, the present invention has the following beneficial effects:
[0049] This invention is based on a method for fitting mineral composition with elemental composition, especially for shale, carbonate rocks and deep and ultra-deep oil and gas reservoir rock samples, including drilling cuttings, rock blocks and standard cylindrical core samples generated during oil and gas well drilling.
[0050] Currently, no method has been found in the industry that combines stoichiometry and machine learning algorithms to simulate mineral composition based on elemental composition. The advantage of this invention lies in its ability to maintain physical plausibility while utilizing deep learning algorithms to correct data results, resulting in fast simulation speed and high computational accuracy. This is of great significance for rapid and accurate stratigraphic delineation in oil and gas drilling sites, thereby effectively tracking target layers for oil and gas exploration and development, and improving the efficiency of oil and gas exploration and development.
[0051] This invention is based on rock XRF elemental analysis results. A stoichiometric matrix is constructed for 29 minerals to fit their proportions, and then a gradient boosting regression tree is used to correct the fitting results. After training on 80 sets of data with known elemental proportions and mineral compositions, and testing on 30 sets of data, the final error is less than 5%, demonstrating excellent reliability.
[0052] The main improvements of this invention compared to conventional methods for fitting mineral compositions by elements include:
[0053] (1) Machine learning-based residual correction: Machine learning algorithms are added to the traditional physical model to correct the bias;
[0054] (2) Working strategy: The machine learning model does not directly predict mineral content, but learns the residuals of the stoichiometric inversion results; the advantage of this "residual learning" strategy is that the model only corrects the bias, and the stoichiometric inversion ensures the chemical rationality, and the two complement each other perfectly.
[0055] (3) Scalability: This method supports model training based on elemental and mineral analysis results from different regions, thereby constructing a data model for a specific region. Attached Figure Description
[0056] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0057] Figure 1 This is a flowchart of the method for fitting mineral composition based on elemental composition according to the present invention. Detailed Implementation
[0058] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0059] The present invention will be further explained below with reference to specific embodiments.
[0060] This embodiment describes the detailed workflow of the method and performs inversion based on 115 sample data. During residual correction, 81 sets of data are used for training, and then 34 sample data are used for validation.
[0061] like Figure 1 As shown in the figure, this embodiment provides a method for fitting mineral composition based on elemental composition, which specifically includes the following steps:
[0062] (1) Rock element input
[0063] This embodiment inputs 16 rock elements, including Na, Mg, Al, Si, P, S, Cl, K, Ca, Ti, Cr, Mn, Fe, Zr, Ba, and C, and normalizes their mass fraction values.
[0064] (2) Stoichiometric inversion
[0065] Based on the mineral chemical formulas, an element-mineral stoichiometric matrix is constructed, and the mineral proportions are solved using a non-negative least squares method with L1 regularization. The results always satisfy the law of conservation of chemistry.
[0066] (3) Machine learning residual correction:
[0067] In this embodiment, the residuals of 81 measured samples are used as the training target. Gradient Boosting Regressor is used to learn the systematic bias pattern and correct the mineral inversion results.
[0068] (4) Data post-processing
[0069] Gaussian noise perturbation is applied to the element content after normalization in step (1) to make the complete inversion pipeline run repeatedly, the distribution of mineral results is statistically analyzed, and the confidence interval of each mineral content is given.
[0070] (5) Mineral composition results output
[0071] Output the fitted mineral composition results and provide the confidence interval for the content of each mineral.
[0072] The specific process of step (2) above is as follows:
[0073] (2.1) Stoichiometric matrix: Each mineral has a definite chemical formula, based on which its molar mass and the mass fraction of each element are calculated. Taking quartz (SiO2) as an example:
[0074] Molar mass = 28.085 + 2 × 15.999 = 60.084 g / mol;
[0075] Si mass fraction = 28.085 / 60.084 = 0.467;
[0076] O mass fraction = 31.998 / 60.084 = 0.533;
[0077] In this embodiment, stoichiometry is calculated for each of the 31 minerals to construct stoichiometry matrix A:
[0078] A [i][j] =Mass fraction of element i in mineral j
[0079] A∈R^{16×31}, where rows correspond to 16 core elements and columns correspond to 31 minerals. In this embodiment, the 16 core elements include Na, Mg, Al, Si, P, S, Cl, K, Ca, Ti, Cr, Mn, Fe, Zr, Ba, and C; the list of the 31 minerals is as follows:
[0080] Table 1 Chemical formulas of different minerals
[0081] 1 quartz <![CDATA[SiO2]]> 2 Sodium feldspar <![CDATA[NaAlSi3O8]]> 3 plagioclase <![CDATA[Na 0.5 That 0.5 the 1.5 And 2.5 O8]]> 4 calcium feldspar <![CDATA[CaAl2Si2O8]]> 5 Potassium feldspar <![CDATA[KAlSi3O8]]> 6 calcite <![CDATA[CaCO3]]> 7 dolomite <![CDATA[CaMg(CO3)2 <!-- 4 -->]]> 8 Iron white dolomite <![CDATA[CaFe(CO3)2]]> 9 illite <![CDATA[K 0.75 Al2Si 3.5 About 10 (OH)2]]> 10 Kaolinite <![CDATA[Al2Si2O5(OH)4]]> 11 Montmorillonite <![CDATA[Na 0.33 Al2Si4O 10 (OH)2]]> 12 chlorite <![CDATA[Mg3Fe2AlSi3O 10 (OH)8]]> 13 Imon mixed layer <![CDATA[Na 0.2 K 0.4 Al 1.7 Mg 0.3 You 3.9 About 10 (OH)2]]> 14 Green Mk mixed layer <![CDATA[Mg2Fe 1.5 Al 1.5 You 3.5 About 10 (OH)4]]> 15 glauconite <![CDATA[K 0.6 Fe³ 1.2 Mg 0.4 Fe 2 0.2 Al 0.2 Si 3.8 O 10 (OH)2]]> 16 Biotite <![CDATA[KMg2FeAlSi3O 10 (OH)2]]> 17 muscovite <![CDATA[KA l2 Si3AlO 10 (OH)2]]> 18 rock salt NaCl 19 Pyrite <![CDATA[FeS2]]> 20 Hematite <![CDATA[Fe2O3]]> 21 amphibole <![CDATA[Ca2Mg3Fe2Al2Si7O 22 (OH)2]]> 22 Siderite <![CDATA[FeCO3]]> 23 ilmenite <![CDATA[FeTiO3]]> 24 chromite <![CDATA[FeCr2O4]]> 25 Hard plaster <![CDATA[CaSO4]]> 26 Potassium salts KCl 27 Pyrophyllite <![CDATA[Al2Si4O 10 (OH)2]]> 28 Zircon <![CDATA[ZrSiO4]]> 29 apatite <![CDATA[Ca5(PO4)3F]]> 30 barite <![CDATA[BaSO4]]> 31 Rutile <![CDATA[TiO2]]>
[0082] (2.2) Inversion solution
[0083] Given an element content vector b (normalized to a sum of 1), use the non-negative least squares method to inversely solve for the mineral proportion vector x, such that A x As close to b as possible. Real rocks typically contain only 3 to 8 major minerals, therefore L1 sparsity regularization is introduced:
[0084] min||A x -b|| 2 2+λ||x||;
[0085] Constraints:
[0086] 0≤x j ≤1 (mineral proportion between 0% and 100%)
[0087] Σx j =1 (total 100%)
[0088] Where λ is the sparsity parameter, with a default value of 0.01. Increasing λ makes the results sparser (fewer mineral types), while decreasing λ allows more minerals to participate. The inversion solution uses a non-negative least squares solver based on the Trust Region Reflective Least Squares (TRF) algorithm (the solver's specific name is lsq_linear, from the SciPy scientific computing library in Python). The TRF algorithm is used for the solution; the specific solution process is as follows:
[0089] ① First, transform the objective function with L1 regularization into a standard non-negative least squares form using matrix augmentation techniques. The matrix augmentation process involves appending a `λ×I` (31 rows, representing penalties for 31 minerals) to the original matrix A (16 rows, representing 16 elements), and appending a zero vector to the objective vector b.
[0090] A_aug = [A] (16 + 31) = 47 rows × 31 columns
[0091] [λ·I_31]
[0092] b_aug=[b] 47 dimensions [0]
[0094] “min ||Ax-b|| 2 "2+λ||x||1" becomes "min ||A_aug·x - b_aug|| 2 2” has the same form and can be solved directly using the standard nonnegative least squares method.
[0095] The standard nonnegative least squares form is exemplified as follows:
[0096] Taking 3 minerals (quartz, calcite, illite) × 4 elements (Si, Ca, Al, Mg) as an example:
[0097] A = [0.467 0 0.237] ← Si
[0098] [00.400 0 ] ← Ca
[0099] [000.106] ← Al
[0100]
[000] ← Mg
[0101] b=[0.40, 0.30, 0.10, 0.20] ← Normalized element content
[0102] After augmentation (λ=0.01):
[0103] A_aug = [0.467 0 0.237] [00.400 0 ] [000.106]
[000]
[0107] [0.01 0 0 ] ←λI [00.01 0 ] [000.01]
[0110] b_aug=[0.40, 0.30, 0.10, 0.20, 0, 0, 0]
[0111] Find the minimum value of ||A_aug·x - b_aug|| 2 2, 0≤x≤1” yields:
[0112] x = [0.52, 0.30, 0.18] → Quartz 52%, Calcite 30%, Illite 18%.
[0113] ② Set boundary constraints for mineral proportions between 0 and 1;
[0114] ③ The solution is implemented using lsq_linear(method='trf') from Python's scipy library, based on the trust region reflection method for iterative solution;
[0115] ④ After convergence, output the mineral proportion vector x (whether there are instances of this vector).
[0116] (2.3) Post-processing
[0117] After solving, perform the following processing:
[0118] ① Normalize to 100%; the normalization calculation method is: if the original elements 1, 2, 3... n sum If ≠1, then let 1new = ,other i The calculation method is similar, that is... inew = .
[0119] ② Remove trace minerals with a proportion of less than 0.5% (thinning threshold).
[0120] ③ Renormalize.
[0121] Purely physical models suffer from errors in the following areas: variations in the chemical formula of solid solution minerals (e.g., the sodium-calcium ratio of plagioclase is not fixed), measurement noise, and micro-regional differences in minerals. These errors are systematic, meaning that the deviation patterns of samples from the same batch are approximately the same. This invention does not directly predict mineral content using machine learning models, but instead learns the residuals from the non-negative least squares inversion results. This ensures both chemical rationality and accuracy of the results, achieving complementarity between physical models and machine learning algorithms.
[0122] The specific process of machine learning residual correction in step (3) above is as follows:
[0123] Gradient Boosting Regressor (GBR) was used, with one GBR model trained for each of the 15 most common minerals. Each GBR model outputs a correction (positive or negative) for the corresponding mineral proportion.
[0124] Set the hyperparameters as follows: number of trees: 100, maximum depth: 4, learning rate: 0.05, subsampling rate: 0.8;
[0125] Input feature vector: The feature is composed of two parts, including 16-dimensional core element content and 15-dimensional stoichiometric matrix inversion of preliminary mineral proportion (31 dimensions in total).
[0126] The training process for the GBR model is as follows:
[0127] ① The 115 samples were divided into a training set (81 samples) and a test set (34 samples);
[0128] ② Invert and solve for all training samples to obtain preliminary mineral proportions;
[0129] ③ Calculate the residual = measured mineral proportion - preliminary mineral translation proportion;
[0130] ④ The GBR model is trained using the residuals as labels, and K-fold cross-validation is used, with K ranging from 3 to 10;
[0131] ⑤ When making predictions: Final result = stoichiometric result + GBR correction amount → non-negative clipping → normalization;
[0132] After the mineral composition results of step (5) above are output, rock classification is also performed; in this embodiment, 15 minerals are classified into 5 petrological components, as follows:
[0133] Quartz group: Quartz
[0134] Feldspar group: potassium feldspar, sodium feldspar, plagioclase, calcium feldspar
[0135] Carbonate group: calcite, dolomite, ferrodolomite, siderite
[0136] Clay group: illite, kaolinite, montmorillonite, chlorite, glauconite, pyrophyllite
[0137] Others: pyrite, hematite, amphibole, anhydrite, rock salt, etc.
[0138] The following experimental results will further illustrate the accuracy indicators achieved by this invention:
[0139] In this embodiment, 34 measured samples were used for full verification. Each sample simultaneously possessed XRF elemental measurements and XRD mineral measurements, with the latter serving as the true value for accuracy evaluation. The evaluation metrics were the mean absolute error (MAE) and the coefficient of determination (R²). 2 ).
[0140] ① Overall accuracy
[0141] MAE 9.53% 2.58% <![CDATA[R 2 ]]> 0.20 0.91 Improvement percentage after GBR residual correction — 97.4%(112 / 115)
[0142] Machine Learning Residual Correction (ML Correction) in R 2 The improvement from 0.20 to 0.91 indicates that the model can explain 91% of the mineral content variance. The MAE decreased from 9.53% to 2.58%, with the error decreasing by approximately 73%.
[0143] ② Mineral-by-mineral precision
[0144] quartz 115 35.7% 8.4% Potassium feldspar 111 8.0% 2.1% plagioclase 115 9.8% 4.5% calcite 71 7.0% 2.2% dolomite 43 4.7% 1.4% amphibole 57 9.3% 0.9% Hard plaster 7 15.1% 0.6% Siderite 7 1.3% 1.3% rock salt 3 1.4% 1.4% Pyrite 3 1.7% 1.7% Hematite 7 4.9% 1.0% illite 115 7.6% 2.4% Kaolinite 99 2.1% 0.3% Montmorillonite 98 3.3% 1.0% chlorite 110 2.1% 0.6%
[0145] The effectiveness of the present invention will be further illustrated below with data results:
[0146] To verify the accuracy of this method, two samples were selected for XRF elemental measurement and XRD mineral composition analysis, respectively. The results are shown in the table below:
[0147] Table 3: Laboratory measurements of elemental composition and mineral composition of the two rock samples
[0148]
[0149] The elemental composition of the two samples was inverted using this method, and the resulting mineral composition was compared with the actual data as follows:
[0150] Table 4: Comparison of laboratory-measured mineral composition and elemental inversion mineral composition of the two rock samples
[0151]
[0152] The results show that the inversion effect is good for major mineral components with a content exceeding 3%, with an overall error of less than 25%, and no errors in rock type identification occur. Therefore, this method has good overall application performance.
[0153] This invention is well-conceived and employs a machine learning-based residual correction method. It incorporates a machine learning algorithm into the traditional physical model to correct biases. The machine learning model does not directly predict mineral content but learns the residuals of the stoichiometric inversion results. The advantage of this "residual learning" strategy is that the model only corrects biases, while the stoichiometric inversion ensures chemical rationality. The two complement each other perfectly, resulting in small fitting errors and excellent reliability, making it suitable for promotion and application.
[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for fitting mineral composition based on elemental composition, characterized in that, Includes the following steps: (1) Rock element input Input multiple rock elements and normalize their mass fraction values; (2) Stoichiometric inversion A stoichiometric matrix is constructed based on the mineral chemical formula, and the mineral proportions are solved by the non-negative least squares method with L1 regularization. The results always satisfy the chemical conservation law. (3) Machine learning residual correction Using the residuals of measured samples as the training target, gradient boosting regression trees are used to learn systematic bias patterns and correct mineral inversion results. (4) Data post-processing Gaussian noise perturbation is applied to the element content after normalization in step (1), the complete inversion pipeline is run repeatedly, the distribution of mineral results is statistically analyzed, and the confidence interval of each mineral content is given. (5) Mineral composition results output Output the fitted mineral composition results and provide the confidence interval for the content of each mineral.
2. The method for fitting mineral composition based on elemental composition as described in claim 1, characterized in that, The specific process of step (2) is as follows: (2.1) Stoichiometric matrix: Each mineral has a definite chemical formula, based on which its molar mass and the mass fraction of each element are calculated; For each mineral, calculate and construct the stoichiometric matrix A: A [i][j] =The mass fraction of the i-th element in the j-th mineral; A∈R^{H×L}; In the above formula, rows correspond to H types of core elements, and columns correspond to L types of minerals; (2.2) Inversion solution Given an element content vector b, the mineral proportion vector x is obtained by inverting the non-negative least squares method, such that A x As close as possible to b; actual rocks contain only 3-8 major minerals, therefore L1 sparsity regularization is introduced: min||A x -b|| 2 2+λ||x||; Constraints: 0≤x j ≤1; Σx j =1; In the above formula, λ is the sparsity parameter, with a default value of 0.01; increasing λ makes the result more sparse, while decreasing λ allows more minerals to participate; the inversion solution is solved using a non-negative least squares solver based on the trust region reflection least squares algorithm. (2.3) Post-processing After solving, perform the following processing: ① Normalized to 100%; ② Remove trace minerals with a proportion of less than 0.5%; ③ Renormalize.
3. The method for fitting mineral composition based on elemental composition as described in claim 1, characterized in that, The specific process of step (3) is as follows: Gradient boosting regression tree (GBR) model is used, and one GBR model is trained for each of the most common minerals; each model outputs the correction amount for the corresponding mineral proportion. Set hyperparameters, including number of trees, maximum depth, learning rate, and subsampling rate; Input feature vector: The feature consists of two parts: the content of core elements and the preliminary mineral proportion obtained by inverting the stoichiometric matrix; GBR model training: ① Divide the samples into training set and test set; ② Invert and solve for all training samples to obtain preliminary mineral proportions; ③ Calculate the residual = measured mineral proportion - preliminary mineral translation proportion; ④ The GBR model was trained using the residuals as labels, and K-fold cross-validation was used, with K ranging from 3 to 10. ⑤ When making predictions: Final result = stoichiometric result + GBR correction amount → non-negative clipping → normalization.
4. The method for fitting mineral composition based on elemental composition as described in claim 1, characterized in that: After the mineral composition results of step (5) are output, the method for fitting mineral composition must also perform rock classification, specifically classifying various minerals into their respective petrological components.