A method and system for predicting the performance of a biochar-based supercapacitor based on an interpretable machine learning model
By introducing interpretable machine learning models based on Bayesian optimization and the SHAP algorithm, the interpretability and accuracy issues in the performance prediction of biochar-based supercapacitors were resolved, achieving systematic optimization of the biochar preparation process and efficient material design.
Patent Information
- Application Number
- CN202611420827.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-11-27
AI Technical Summary
Existing machine learning models lack interpretability and accuracy in predicting the performance of biochar-based supercapacitors, and cannot effectively combine feature screening and interaction effect analysis of the entire preparation process, resulting in a lack of theoretical guidance for material design.
By employing an interpretable machine learning model, combined with Bayesian optimization and SHAP algorithms, a precise model is constructed to identify key features and analyze their dependencies on performance, thereby achieving systematic optimization of the biochar preparation process.
It has achieved high-precision performance prediction and preparation process optimization, breaking the deadlock between model accuracy and interpretability, and improving the efficiency and scientific nature of materials research and development.
Smart Images

Figure CN123179084A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of supercapacitor electrode material preparation and artificial intelligence, and relates to a method and system for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model. Background Technology
[0002] Biochar, with its high specific surface area, well-developed pore structure, and low cost, is considered an ideal precursor for supercapacitor electrode materials, showing broad application prospects in the energy storage field. However, its electrochemical performance (such as specific capacitance) is constrained by the nonlinear coupling of multiple factors, including biomass chemical composition, pore structure parameters, degree of graphitization, and preparation process, making precise control of material performance a complex challenge. Traditional optimization strategies mainly rely on single-variable experimental methods, i.e., "trial and error," which struggles to establish accurate mappings in high-dimensional parameter spaces, resulting in long experimental cycles, high costs, and low efficiency.
[0003] To overcome the limitations of traditional methods, machine learning techniques have been introduced into this field to build performance prediction models. However, most existing machine learning models (such as conventional random forests or support vector machines) are "black box" models. Although they possess certain predictive capabilities, they cannot quantify the physicochemical mechanisms by which various process parameters contribute to performance, resulting in a lack of theoretical guidance for materials design. Meanwhile, methods such as conventional linear regression or Pearson correlation coefficient analysis are also insufficient to meet the modeling needs of complex systems because they cannot capture the nonlinear interaction effects between features.
[0004] Although existing technologies (such as CN118981630A) have disclosed schemes for predicting the performance of energy storage devices using machine learning, these technologies generally fail to effectively resolve the contradiction between model prediction accuracy and physical interpretability. Furthermore, existing research lacks systematic feature screening and interaction effect analysis of the entire biochar "pretreatment-carbonization-activation" preparation process, which cannot provide clear and reliable guidance for the rational design and process optimization of electrode materials, thus limiting its application value in practical research and development. Summary of the Invention
[0005] To address the problems existing in the prior art, this invention provides a method and system for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model. This solves the technical problems that existing conventional machine learning models are "black boxes" and lack interpretability, as well as the failure of existing research to resolve the contradiction between model accuracy and physical interpretability, and the lack of systematic analysis of the entire preparation process.
[0006] This invention is achieved through the following technical solution: A method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model includes the following steps: S1: Obtain a sample dataset of biochar supercapacitors. The sample dataset includes multiple samples, and each sample contains a set of target factors affecting specific capacitance and the corresponding measured specific capacitance value. S2: Preprocess the target factors to obtain target features, and construct training and testing sets based on the sample dataset; S3: Train multiple initial machine learning models of different types based on the training set, evaluate the performance of each model through cross-validation, and select the model with the best performance as the target model. S4: The hyperparameters of the target model are optimized using the Bayesian optimization algorithm to obtain an accurate model; S5: Based on the aforementioned accurate model and SHAP algorithm, calculate the average absolute SHAP value of each target feature on the prediction result to identify the key features affecting the specific capacitance. S6: Based on the accurate model and partial dependency graph, analyze the dependency relationship between the key feature and the specific capacitance to determine the standard range of the key feature values.
[0007] Optionally, in step S1, the target factors include at least one of the following: the pore structure characteristics of biochar, the chemical composition characteristics, and the preparation process parameters.
[0008] Optionally, the pore structure features include total pore volume and specific surface area; the preparation process parameters include activation temperature.
[0009] Optionally, in step S2, the preprocessing of the target factors includes: removing outliers from the target factors, normalizing the numerical target factors, and normalizing the content of C, H, O, and N elements to a total of 100%.
[0010] Optionally, in step S3, the multiple different types of initial machine learning models include random forest models, gradient boosting decision tree models, extreme random tree models, and Gaussian process regression models.
[0011] Optionally, in step S3, when evaluating the performance of each model through cross-validation, the evaluation metrics used include the coefficient of determination and the root mean square error.
[0012] Optionally, in step S5, the key features include target features whose average absolute SHAP value is greater than a preset threshold.
[0013] Optionally, step S5 further includes: determining whether the key feature and the specific capacitance are positively or negatively correlated based on the sign of the SHAP value of the key feature.
[0014] Optionally, in step S6, the value standard range includes the range of key characteristic values that cause the specific capacitance to reach its peak or tend to saturate.
[0015] A performance prediction system for biochar-based supercapacitors based on an interpretable machine learning model, comprising: The data acquisition module is used to acquire a sample dataset of biochar supercapacitors. The sample dataset includes multiple samples, and each sample contains a set of target factors affecting specific capacitance and the corresponding measured specific capacitance value. The data processing module is used to preprocess the target factors to obtain target features, and to construct training and testing sets based on the sample dataset; The model selection module is used to train multiple different types of initial machine learning models based on the training set, evaluate the performance of each model through cross-validation, and select the model with the best performance as the target model. The model optimization module is used to optimize the hyperparameters of the target model using the Bayesian optimization algorithm to obtain an accurate model; The feature analysis module is used to calculate the average absolute SHAP value of each target feature on the prediction result based on the accurate model and SHAP algorithm, so as to identify the key features affecting the specific capacitance. The range determination module is used to analyze the dependency relationship between the key feature and the specific capacitance based on the accurate model and the partial dependency graph, so as to determine the standard range of the key feature values. The output of the data acquisition module is connected to the input of the data processing module. The output of the data processing module is connected to the inputs of the model selection module and the feature analysis module. The output of the model selection module is connected to the input of the model optimization module. The output of the model optimization module is connected to the input of the range determination module. Compared with the prior art, the present invention has the following beneficial technical effects: This invention discloses a method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model. By constructing a closed-loop technical system of "accurate prediction - deep analysis - process optimization," it effectively solves the problems of conventional machine learning models lacking interpretability and the difficulty in balancing model accuracy and physical interpretability. First, this invention introduces a Bayesian optimization algorithm to optimize the hyperparameters of the selected optimal machine learning model, constructing a high-precision "accurate model." This ensures high-accuracy prediction of the specific capacitance of biochar supercapacitors while providing a reliable data foundation for subsequent interpretability analysis, thus breaking the deadlock between model accuracy and interpretability. Second, this invention innovatively combines the SHAP algorithm and partial dependency graph technology to open the "black box" of the machine learning model: on the one hand, it uses SHAP values to quantify the marginal contribution of each target feature to the prediction result, accurately identifying the key features affecting the specific capacitance and their positive and negative correlations; on the other hand, it visualizes the nonlinear dependency relationship between key features and specific capacitance through partial dependency graphs, clarifying the physical laws governing feature values and performance changes. Finally, based on the key feature value standard range determined by the above analysis, this invention transforms the data-driven prediction results into specific preparation process guidance, realizing a systematic analysis and optimization of the entire biochar preparation process. This enables the model to not only "predict" performance, but also "explain" the mechanism and "guide" experiments, fundamentally improving the efficiency and scientific nature of materials research and development. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating a method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model, as described in Embodiment 1 of the present invention. Figure 2 This is an overall flowchart of the performance prediction of biochar-based supercapacitors based on an interpretable machine learning model as described in this invention. Figure 3 The coefficient of determination (R²) of each machine learning model (CATBoost, RF, GBDT, etc.) on the test set in the embodiments of this invention. 2 Comparison chart; Figure 4 This is a feature importance ranking and influence direction distribution diagram (including bee colony diagram) based on SHAP in an embodiment of the present invention. Figure 5This is a contour plot of the interaction between SSA and TPV based on bivariate PDP (Bi-PDP) in an embodiment of the present invention. Figure 6 This is a schematic diagram of a biochar-based supercapacitor performance prediction system based on an interpretable machine learning model. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0019] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0020] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0021] In the description of the embodiments of the present invention, it should be noted that if terms such as "upper," "lower," "horizontal," or "inner" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of the invention is in use, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, terms such as "first" and "second" are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0022] Furthermore, the use of the term "horizontal" does not imply that the component must be absolutely horizontal, but rather that it can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0023] In the description of the embodiments of the present invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention according to the specific circumstances.
[0024] The present invention will now be described in further detail with reference to the accompanying drawings: Example 1 like Figure 1 As shown, this invention discloses a method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model, comprising the following steps: S1: Obtain a sample dataset of biochar supercapacitors. The sample dataset includes multiple samples, and each sample contains a set of target factors affecting specific capacitance and the corresponding measured specific capacitance value. In step S1, the target factors include at least one of the following: the pore structure characteristics of biochar, the chemical composition characteristics, and the preparation process parameters.
[0025] The pore structure features include total pore volume and specific surface area; the preparation process parameters include activation temperature.
[0026] S2: Preprocess the target factors to obtain target features, and construct training and testing sets based on the sample dataset; In step S2, the preprocessing of the target factors includes: removing outliers from the target factors, normalizing the numerical target factors, and normalizing the content of C, H, O, and N elements to a total of 100%.
[0027] S3: Train multiple initial machine learning models of different types based on the training set, evaluate the performance of each model through cross-validation, and select the model with the best performance as the target model. In step S3, the various types of initial machine learning models include random forest model, gradient boosting decision tree model, extreme random tree model and Gaussian process regression model.
[0028] In step S3, when evaluating the performance of each model through cross-validation, the evaluation metrics used include the coefficient of determination and the root mean square error.
[0029] S4: The hyperparameters of the target model are optimized using the Bayesian optimization algorithm to obtain an accurate model; S5: Based on the aforementioned accurate model and SHAP algorithm, calculate the average absolute SHAP value of each target feature on the prediction result to identify the key features affecting the specific capacitance. In step S5, the key features include target features whose average absolute SHAP value is greater than a preset threshold.
[0030] Step S5 further includes: determining whether the key feature and the specific capacitance are positively or negatively correlated based on the sign of the SHAP value of the key feature.
[0031] S6: Based on the accurate model and partial dependency graph, analyze the dependency relationship between the key feature and the specific capacitance to determine the standard range of the key feature values.
[0032] In step S6, the value standard range includes the key characteristic value range that makes the specific capacitance reach its peak or tend to saturate.
[0033] Example 2 To further explain the solution of the present invention, it is described in the following manner: This invention provides a method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model. This method aims to achieve high-precision prediction of specific capacitance and rational design of fabrication parameters by integrating Categorical Boosting (CATBoost), Shapley Additive Explanations (SHAP), and Partial Dependence Plot (PDP).
[0034] A method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model includes the following steps: S1. Construct a multidimensional feature database containing biomass elemental composition, pore structure parameters, graphitization degree index and preparation process parameters, and perform data cleaning and normalization; The pore structure parameters mentioned in step S1 include at least the specific surface area (SSA) and the total pore volume (TPV); the preparation process parameters include at least the activation temperature and the activation time.
[0035] S2. Introduce Bayesian optimization and use the CATBoost algorithm to establish a specific capacitance prediction model, and select the optimal model through cross-validation; The coefficient of determination R of the CATBoost model in step S2 on the test set 2 It reaches 0.9558, and the root mean square error (RMSE) is less than 12.
[0036] S3. Calculate the SHAP value based on the TreeExplainer framework to quantify the nonlinear contribution and influence direction of each feature contrast capacitance; The SHAP analysis described in step S3 is used to distinguish between the linear correlation of features and the true nonlinear contribution, overcoming the problem that the Pearson correlation coefficient fails to evaluate nonlinear relationships.
[0037] S4. Combine univariate PDP and bivariate PDP to determine the optimal synergistic interval of multi-feature interaction, and use this to inversely deduce the optimal parameter combination for the preparation process.
[0038] The optimal cooperative interval described in step S4 satisfies: SSA > 1250 m 2 / g, TPV > 1.1 cm 3 / g, activation temperature is 580°C~620°C, and ID / IG ratio is 0.8~0.85.
[0039] The supercapacitor prepared based on the optimal synergistic range has a predicted specific capacitance of up to 370 F / g.
[0040] The above process is as follows: like Figure 2 As shown, a method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model includes the following steps: Step S1: Establish a multidimensional feature and performance database A sample dataset covering the entire preparation process was collected and constructed. The sample data includes an input feature set and an output label. The input feature set X includes at least: the elemental composition of the biomass precursor (mass percentages of C, H, O, and N), the physical structural characteristics of the precursor (specific surface area SSA, total pore volume TPV, average pore size), structural defect indices (Raman spectral ID / IG ratio), and preparation process parameters (activation temperature, activation time, heating rate). The output label Y is the specific capacitance value of the electrode material (unit: F / g). The raw data was preprocessed, including outlier removal, normalization, and normalization of the C, H, O, and N elemental contents to a sum of 100%. In Raman spectroscopy, ID and IG represent the intensities of the two most critical characteristic peaks in the carbon material spectrum. ID represents the intensity of the D peak, originating from defects, edges, or disordered structures in the carbon lattice. The appearance and intensity of the D peak directly reflect the degree of defects in the material's internal structure; the stronger the D peak, the more defects or disorder there is inside the material. IG represents the intensity of the G peak, which corresponds to the sp atoms of carbon atoms. 2Hybridized in-plane stretching vibrations. These are hallmarks of highly ordered graphitized structures in materials; the stronger and sharper the G peak, the better the crystallinity and the higher the degree of graphitization. ID represents the severity of defects, and IG represents the integrity of the graphite structure. The ID / IG ratio, obtained by dividing the two, is the gold standard for measuring the degree of graphitization and defect density of carbon materials. A higher ratio indicates more defects and higher disorder; a lower ratio indicates that the material is closer to a perfect graphite crystal structure.
[0041] Step S2: Construct an ensemble learning prediction model based on CATBoost The dataset processed in step S1 is divided into a training set and a test set according to a fixed random seed.
[0042] Multiple machine learning algorithms were used for modeling, including at least: Random Forest (RF), Gradient Boosting Decision Tree (GBDT), Extremely Randomized Trees (ETR), Gaussian Process Regression (GPR), and Categorical Boosting (CATBoost).
[0043] A Bayesian optimization algorithm is introduced to globally optimize the hyperparameters of the above models in order to maximize the coefficient of determination R under cross-validation. 2 Let be the objective function. 21-fold repeated hold-out cross-validation and leave-one-out cross-validation (LOOCV) are used to evaluate the model's generalization ability. The model with the minimum root mean square error (RMSE) and the highest R-squared value on the test set is selected. 2 The CATBoost model with the best value was used as the final optimal prediction model (test set R was measured experimentally). 2 The value reached 0.9558, and the RMSE was 11.32.
[0044] Step S3: Measurement of nonlinear feature contributions based on SHAP Using the CATBoost optimal model determined in step S2 as the explanatory object, the marginal contribution value of each input feature to the prediction result is calculated using the SHAP algorithm. By plotting a beeswarm plot and a mean bar chart, the influence direction of each feature is analyzed: Total Pore Volume (TPV) and Specific Surface Area (SSA) are identified as the strongest positive driving factors (SHAP mean > 10, i.e., Shapley additive explanatory value > 10); the ID / IG ratio is identified as the main negative suppressive factor.
[0045] Step S4: Mechanism analysis and parameter optimization based on univariate PDP and bivariate PDP (Bi-PDP) Perform partial dependency graph (PDP) analysis, keep the other features unchanged, visualize the average marginal effect of individual features on the capacitance within the range of values, and identify the nonlinear response threshold of each feature.
[0046] A bivariate partial dependency plot (Bi-PDP) analysis was performed, focusing on the synergistic interaction effects between SSA-TPV, SSA-ID / IG, and ID / IG-activation temperature, outputting the characteristic interaction optimal coupling region where the specific capacitance reaches its maximum value. Based on the above analysis results, the optimal combination of fabrication process parameters was determined.
[0047] Preferably, the optimal combination of preparation parameters in step S4 is: specific surface area SSA > 1250 m² 2 / g; Total pore volume (TPV) > 1.1 cm³ 3 / g; activation temperature maintained at 580°C~620°C (preferably 600°C); ID / IG ratio controlled between 0.8 and 0.85; Under these conditions, the predicted specific capacitance can reach 370 F / g.
[0048] This invention has many advantages: 1. Breakthrough in prediction accuracy: This invention, through a systematic comparison of six mainstream algorithms, found that CATBoost’s ordered boosting mechanism has an inherent advantage in processing high-dimensional sparse material data. Its prediction error (RMSE=11.32) is significantly lower than that of traditional models, achieving accurate digital twins of material properties.
[0049] 2. White-box decision-making mechanism: This invention breaks through the "black box" characteristic of traditional machine learning. It quantifies the physical limits of TPV and SSA contribution to capacitance through SHAP analysis, and solves the technical problem of not being able to distinguish between linear correlation (Pearson Correlation Coefficient, PCC) and true nonlinear contribution in the prior art.
[0050] 3. Reverse design of the preparation process: Existing technologies can only predict performance. This invention reveals the antagonistic / synergistic effects between multiple parameters (such as the dual-optimal range of ID / IG and activation temperature) through Bi-PDP, providing clear data-driven guidance boundaries for "avoiding excessive graphitization leading to decreased conductivity" and "preventing high-temperature pore collapse" in the electrode preparation process, and significantly reducing the cost of experimental trial and error.
[0051] Example 3 Furthermore, the solution of the present invention will be further described in conjunction with the accompanying drawings: This embodiment provides a method for predicting the performance of wheat straw-based supercapacitors, including the following steps: 1. Sample Construction and Preprocessing This embodiment uses wheat straw as biomass raw material and prepares electrode materials through KOH activation. A total of 100 sets of data were collected from publicly available literature and experimental data. The input feature dimension is 11, and the output is specific capacitance. After removing missing value samples, the dataset was divided into a training set (80 sets) and a test set (19 sets) using a fixed random seed (Seed=280).
[0052] 2. Model Training and Screening The Scikit-learn and CatBoost libraries were called in a Python 3.85 environment. The Bayesian optimization iterations were set to 50. The results are as follows. Figure 3 As shown, CATBoost performs best on the test set: R 2 =0.9558, Mean Absolute Error (MAE) <5, and the error distribution between the training and test sets is the most concentrated (see attached figure), indicating that it has the lowest risk of overfitting and the strongest generalization ability. In contrast, although Gaussian Process Regression (GPR) performs well on the training set, it degenerates significantly on the test set, so it is discarded.
[0053] 3. Interpretability Analysis and Optimal Parameter Extraction Perform SHAP analysis (with appendix) Figure 4The results showed that TPV had the highest average absolute SHAP value (~10), making it the most critical factor; SSA was second; while ID / IG mainly showed a negative contribution, proving that excessive defects would degrade conductivity, offsetting the gain from active sites. Univariate PDP analysis showed that specific capacitance was positively correlated with SSA up to 1250 mΩ. 2 The temperature tends to saturate after 6g; the activation temperature shows a typical inverted U-shaped relationship, with a peak value around 600℃.
[0054] 4. Interaction effect verification (Bi-PDP) Perform bivariate interaction analysis (with appendix) Figure 5 The data shows that when SSA > 1250m is satisfied simultaneously: 2 / g and TPV > 1.1cm 3 At a concentration of / g, the color mapping is bright yellow, corresponding to a specific capacitance exceeding 280 F / g. Optimal energy storage efficiency can be achieved when the activation temperature is maintained at 600℃ and the ID / IG ratio is controlled between 0.8 and 0.85. The final optimal preparation process is: activation temperature 600℃, appropriate activation time (combined with specific surface area control), and a conventional heating rate; the predicted specific capacitance can reach 370 F / g.
[0055] Example 4 In this embodiment, coconut shell charcoal was used as the raw material, and the CATBoost model determined in step S2 above and the same SHAP analysis procedure were applied. The results show that, despite the different substrates, TPV and SSA remain the dominant factors, and the optimal range of ID / IG remains stable around 0.8-0.85, demonstrating that the method of the present invention has universality and robustness for different biomass raw materials.
[0056] Example 5 In addition, such as Figure 6 As shown, this invention also discloses a performance prediction system for biochar-based supercapacitors based on an interpretable machine learning model, characterized in that it includes: The data acquisition module is used to acquire a sample dataset of biochar supercapacitors. The sample dataset includes multiple samples, and each sample contains a set of target factors affecting specific capacitance and the corresponding measured specific capacitance value. The data processing module is used to preprocess the target factors to obtain target features, and to construct training and testing sets based on the sample dataset; The model selection module is used to train multiple different types of initial machine learning models based on the training set, evaluate the performance of each model through cross-validation, and select the model with the best performance as the target model. The model optimization module is used to optimize the hyperparameters of the target model using the Bayesian optimization algorithm to obtain an accurate model; The feature analysis module is used to calculate the average absolute SHAP value of each target feature on the prediction result based on the accurate model and SHAP algorithm, so as to identify the key features affecting the specific capacitance. The range determination module is used to analyze the dependency relationship between the key feature and the specific capacitance based on the accurate model and the partial dependency graph, so as to determine the standard range of the key feature values. The output of the data acquisition module is connected to the input of the data processing module. The output of the data processing module is connected to the input of the model filtering module and the feature analysis module. The output of the model filtering module is connected to the input of the model optimization module. The output of the model optimization module is connected to the input of the range determination module.
[0057] Additionally, a schematic diagram of a terminal device according to an embodiment of the present invention is provided. This terminal device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the various method embodiments described above. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the various device embodiments described above.
[0058] The computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention.
[0059] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0060] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0061] The memory can be used to store the computer program and / or module. The processor implements various functions of the terminal device by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory.
[0062] If the modules / units integrated into the terminal device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0063] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model, characterized in that, Includes the following steps: S1: Obtain a sample dataset of biochar supercapacitors. The sample dataset includes multiple samples, and each sample contains a set of target factors affecting specific capacitance and the corresponding measured specific capacitance value. S2: Preprocess the target factors to obtain target features, and construct training and testing sets based on the sample dataset; S3: Train multiple initial machine learning models of different types based on the training set, evaluate the performance of each model through cross-validation, and select the model with the best performance as the target model. S4: The hyperparameters of the target model are optimized using the Bayesian optimization algorithm to obtain an accurate model; S5: Based on the aforementioned accurate model and SHAP algorithm, calculate the average absolute SHAP value of each target feature on the prediction result to identify the key features affecting the specific capacitance. S6: Based on the accurate model and partial dependency graph, analyze the dependency relationship between the key feature and the specific capacitance to determine the standard range of the key feature values.
2. The method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model according to claim 1, characterized in that, In step S1, the target factors include at least one of the following: the pore structure characteristics of biochar, the chemical composition characteristics, and the preparation process parameters.
3. The method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model according to claim 2, characterized in that, The pore structure features include total pore volume and specific surface area; the preparation process parameters include activation temperature.
4. The method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model according to claim 1, characterized in that, In step S2, the preprocessing of the target factors includes: removing outliers from the target factors, normalizing the numerical target factors, and normalizing the content of C, H, O, and N elements to a total of 100%.
5. The method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model according to claim 1, characterized in that, In step S3, the various types of initial machine learning models include random forest model, gradient boosting decision tree model, extreme random tree model and Gaussian process regression model.
6. The method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model according to claim 1, characterized in that, In step S3, when evaluating the performance of each model through cross-validation, the evaluation metrics used include the coefficient of determination and the root mean square error.
7. The method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model according to claim 1, characterized in that, In step S5, the key features include target features whose average absolute SHAP value is greater than a preset threshold.
8. The method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model according to claim 1, characterized in that, Step S5 further includes: determining whether the key feature and the specific capacitance are positively or negatively correlated based on the sign of the SHAP value of the key feature.
9. The method for predicting the performance of biochar-based supercapacitors based on an interpretable machine learning model according to claim 1, characterized in that, In step S6, the value standard range includes the key characteristic value range that makes the specific capacitance reach its peak or tend to saturate.
10. A performance prediction system for biochar-based supercapacitors based on an interpretable machine learning model, characterized in that, include: The data acquisition module is used to acquire a sample dataset of biochar supercapacitors. The sample dataset includes multiple samples, and each sample contains a set of target factors affecting specific capacitance and the corresponding measured specific capacitance value. The data processing module is used to preprocess the target factors to obtain target features, and to construct training and testing sets based on the sample dataset; The model selection module is used to train multiple different types of initial machine learning models based on the training set, evaluate the performance of each model through cross-validation, and select the model with the best performance as the target model. The model optimization module is used to optimize the hyperparameters of the target model using the Bayesian optimization algorithm to obtain an accurate model; The feature analysis module is used to calculate the average absolute SHAP value of each target feature on the prediction result based on the accurate model and SHAP algorithm, so as to identify the key features affecting the specific capacitance. The range determination module is used to analyze the dependency relationship between the key feature and the specific capacitance based on the accurate model and the partial dependency graph, so as to determine the standard range of the key feature values. The output of the data acquisition module is connected to the input of the data processing module. The output of the data processing module is connected to the input of the model filtering module and the feature analysis module. The output of the model filtering module is connected to the input of the model optimization module. The output of the model optimization module is connected to the input of the range determination module.
Citation Information
Patent Citations
Capacitor performance prediction method based on machine learning
CN118981630A
