A Neoclassical Machine Learning Method and System for Interpreting Circular Viscous Moment Based on SHAP

By employing a neoclassical interpretable machine learning method for circumferential viscous torque based on SHAP, and utilizing the CatBoost algorithm and feature importance analysis, the problem of poor model interpretability is solved, enabling fast and accurate calculation of neoclassical circumferential viscous torque and visualization of feature relationships.

CN120409742BActive Publication Date: 2025-10-31ANHUI UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510899881.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-10-31
Estimated Expiration
2045-07-01

AI Technical Summary

Technical Problem

Existing machine learning models have a "black box" property when predicting neoclassical circumferential viscous torque, resulting in poor model interpretability and an inability to assess the importance of features to the prediction results or understand the interaction between features.

Method used

A novel classical circumferential viscous torque interpretable machine learning method based on SHAP is adopted. The model is trained by the CatBoost algorithm, and the PFI and SHAP methods are combined to determine the importance of features. Spearman rank correlation coefficient is used to determine the consistency of ranking, and bee colony diagrams and interaction diagrams are drawn to analyze the influence of features.

Benefits of technology

It achieves rapid and accurate calculation of neoclassical circumferential viscous torque while ensuring the interpretability of the model, revealing the importance of features and interaction relationships, and providing new ideas for three-dimensional tokamak physics experiments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409742B_ABST
    Figure CN120409742B_ABST
Patent Text Reader

Abstract

This invention provides a neoclassical circumferential viscous torque interpretable machine learning method and system based on SHAP, relating to the field of controlled nuclear fusion model interpretation technology. The invention includes acquiring input physical quantities and inputting them into a physical model to obtain output physical quantities, which are then organized into a dataset. A machine learning model is trained using this dataset. The importance of each feature in the input physical quantity dataset within the machine learning model is determined using both the PFI and SHAP methods. The importance determined by the PFI and SHAP methods is ranked, and the top-ranked features are further analyzed. The invention includes a physical quantity acquisition module, a machine learning model generation module, and a model interpretability calculation module. This invention mines the feature importance of the neoclassical circumferential viscous torque machine learning model, which has black-box properties, ensuring fast and accurate calculation while also considering the interaction relationships between different physical features, thus guaranteeing the interpretability of the prediction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of controlled nuclear fusion model interpretation technology, specifically to a new classical circumferential viscous torque interpretable machine learning method and system based on SHAP. Background Technology

[0002] Neoclassical circumferential viscous torque is an important concept in the field of tokamak plasma physics. Its research is of great significance for understanding plasma transport phenomena, controlling plasma rotation, and optimizing the design and operating parameters of tokamak devices. Therefore, it is necessary to calculate neoclassical circumferential viscous torque quickly and accurately. Currently, there are two main methods for calculating neoclassical circumferential viscous torque: one is the traditional numerical simulation program based on physical laws, and the other is the machine learning simulation program using a data-driven approach. Considering the high computational cost required for physical modeling, machine learning has been gradually applied to the development of tokamak physics simulation programs at home and abroad. Although machine learning has achieved certain results in predicting neoclassical circumferential viscous torque, it still has not solved the drawback of poor model interpretability caused by the "black box" property; that is, the machine learning surrogate model only knows the input and output and cannot evaluate the importance of each feature to the prediction result or understand the interaction relationship between different features.

[0003] Therefore, it is crucial to construct an efficient and interpretable neoclassical circumferential viscous torque model to achieve a balance between prediction accuracy, speed, and interpretability, and to provide new ideas for three-dimensional tokamak physics experiments. Summary of the Invention

[0004] The purpose of this invention is to provide a novel classical circumferential viscous torque interpretable machine learning method and system based on SHAP, so as to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A new classical circumferential viscous moment interpretable machine learning method based on SHAP, the specific steps of which include:

[0007] Step 1: Obtain experimental data through nuclear fusion discharge experiments. The experimental data includes magnetic field strength, electron density, electron temperature, ion temperature, rotation frequency, and safety factor. Calculate the radial gradient values ​​of the experimental data through radial distribution to obtain the radial gradients of electron density, electron temperature, and ion temperature. Summarize the experimental data and radial gradient values ​​into input physical quantities. Input these input physical quantities into the neoclassical circumferential viscous torque physical model to obtain output physical quantities. The output physical quantities include the neoclassical circumferential viscous torque of electrons and the neoclassical circumferential viscous torque of ions. Organize the input physical quantities into an input physical quantity dataset and correlate the corresponding output physical quantities.

[0008] Step 2: Preprocess the input physical quantity dataset. Use the input physical quantity dataset as the training set to input the neoclassical circumferential viscous torque machine learning model. Use the output physical quantity as the label of the input physical quantity and label it as the actual value. Evaluate the neoclassical circumferential viscous torque machine learning model by the mean square error, mean absolute error and coefficient of determination between the model output value and the actual value. Set thresholds for mean square error, mean absolute error and coefficient of determination. If the threshold conditions are met, the neoclassical circumferential viscous torque machine learning model is obtained.

[0009] Step 3: Determine the importance ranking of each feature in the input physical quantity dataset in the neoclassical circumferential viscous torque machine learning model using the PFI and SHAP methods respectively. The two rankings are then judged by the Spearman rank correlation coefficient. If the Spearman rank correlation coefficient meets the conditions, the same ranking is obtained. For Spearman rank correlation coefficients that do not meet the conditions, the importance value is used to judge the features with different rankings. For models with importance values ​​greater than the limit, the model is retrained until a model with the same feature ranking is obtained.

[0010] Step 4: Merge the importance feature rankings determined by the PFI and SHAP methods to form a total ranking, and draw the beehive diagram and interaction diagram of the features with the highest total ranking.

[0011] Furthermore, experimental data is obtained through nuclear fusion discharge experiments. This data includes magnetic field strength, electron density, electron temperature, ion temperature, rotation frequency, and safety factor. Radial gradient values ​​are calculated using radial distribution to obtain the radial gradients of electron density, electron temperature, and ion temperature. The experimental data and radial gradient values ​​are then summarized into input physical quantities. The output physical quantities include the neoclassical circumferential viscous torque of electrons and the neoclassical circumferential viscous torque of ions. The output physical quantities are calculated by inputting the input physical quantities into the neoclassical circumferential viscous torque physical model. The input physical quantities are then organized into a dataset, and the output physical quantities are organized into labels for each sample corresponding to the input physical quantities.

[0012] ;

[0013] in, Let i be the input sample of the i-th group, and i be the retrieval sequence of the sample group. B is the magnetic field strength, Ne is the electron density, dNe is the radial gradient of electron density, Te is the electron temperature, dTe is the radial gradient of electron temperature, Ti is the ion temperature, and dTi is the radial gradient of ion temperature. Let q be the rotational frequency and q be the safety factor.

[0014] ;

[0015] in, The output physical quantity is the corresponding sample of the i-th group in the input physical quantity dataset, where i is the sample group retrieval sequence. DL represents the neoclassical circumferential viscous torque of electrons, and LL represents the neoclassical circumferential viscous torque of ions.

[0016] Furthermore, the input physical quantity dataset is preprocessed to form feature vectors, missing values ​​are filled in and normalized, and this is used as the training set to train a neoclassical circumferential viscous torque machine learning model using the CatBoost algorithm. The output physical quantity is used as the label of the input physical quantity and labeled as its actual value. The model performance is evaluated using root mean square error, mean absolute error, and coefficient of determination, based on the following formulas:

[0017] ;

[0018] ;

[0019] ;

[0020] in, The root mean square error, The mean absolute error, As the coefficient of determination, This is the actual value. These are the model's predicted values. This represents the average of the actual values, where n is the sample size and i is the result retrieval variable corresponding to the sample. ;

[0021] Thresholds for root mean square error, mean absolute error, and coefficient of determination are set respectively. When the root mean square error, mean absolute error, and coefficient of determination all meet the threshold conditions, the new classical circumferential viscous torque machine learning model is obtained through calibration.

[0022] Furthermore, the neoclassical circumferential viscous torque machine learning model is explained using the TreeEXM method, which includes the PFI method and the SHAP method. The logic of the PFI method is as follows:

[0023] A feature value of one type in the original input physical quantity data is randomly permuted. This random permutation involves randomly shuffling the data within the same type across the sample sequence to form a replacement dataset. This replacement dataset is then input into the new classical circumferential viscous torque machine learning model to generate a new output physical quantity dataset. New determination coefficients are then calculated in the model based on this new output physical quantity dataset. The formula used is as follows:

[0024] ;

[0025] in, It is the first The first type of actual value for each sample, It is the first The second type of actual value for each sample, It is the first The model output for each sample is the first type of model output value. It is the first The model outputs the second type of model output value for each sample. It is the average of all actual values ​​of the first type. It is the average of all actual values ​​of the second type, where i is the sample retrieval variable. The first and second types are arbitrary orders of electronic neoclassical circumferential viscous torque and ionic neoclassical circumferential viscous torque;

[0026] Calculate the coefficient of determination for each feature in turn. The new coefficient of determination is compared with the original coefficient of determination using the following formula:

[0027] ;

[0028] in, Let k be the importance value of the k-th feature. Let be the new coefficient of determination for the k-th feature, where k is the retrieval variable for the feature. ,

[0029] The SHAP method involves calculating the Shapley value of each feature in each sample within the neoclassical circumferential viscous torque machine learning model, based on the following formula:

[0030] ;

[0031] in, is the Shapley value of feature i on instance sample x, and T is the set of all trees in the model. It is the weight of the t-th tree. It is the prediction value of the t-th tree for instance sample x when it contains feature i. It is the prediction value of the t-th tree for instance sample x without containing feature i.

[0032] Furthermore, the features in the input physical quantity dataset are sorted from largest to smallest importance value to form a determination coefficient ranking. The average Shapley value of each feature across all samples is used as the standard, and these features are sorted from largest to smallest absolute value to form a Shapley value ranking. The determination coefficient ranking and the Shapley value ranking are then compared to determine if they are the same. The logic for this comparison is as follows:

[0033] The internal features of the two rankings are assigned ranks, with the least important type having a rank of 1, the next most important being rank 2, then rank 3, and so on. The Spearman rank correlation coefficient is used to determine the rank, based on the following formula:

[0034] ;

[0035] in The Spearman rank correlation coefficient. Let be the difference in rank between the two rankings for the i-th feature, n be the number of input parameters, and i be the feature retrieval variable. ;

[0036] when When two sorting sequences are considered to be the same, When it is determined that two rankings have some features with different ranks, the importance value of the features with different ranks is calculated. Make a judgment, if If the position of a feature differs, the issue of different rankings is ignored, and the different positions of the feature in the two rankings are accepted. The two rankings are considered the same. If there are features with different rankings, their importance values ​​are considered... If the neoclassical circumferential viscous torque machine learning model is found to have problems, the model parameters are adjusted, the model is retrained, and the sorting is performed again according to the PFI method and SHAP method until two sorting results with the same order are obtained.

[0037] Furthermore, the ranking of determination coefficients and Shapley values ​​that meet the conditions are merged to form a global feature importance ranking. For features that have different rankings in the determination coefficient ranking and Shapley value ranking, the average ranking of their two rankings is selected and included in the global feature importance ranking. The top x features are selected for further analysis. Based on the Shapley values ​​of the top x features, a beehive diagram is drawn to analyze the influence trend of input physical quantities on output physical quantities. An interaction diagram is drawn to analyze the cooperative change relationship between input physical quantities.

[0038] This invention also includes a neoclassical circumferential viscous torque interpretable machine learning system based on SHAP, for performing the above-described neoclassical circumferential viscous torque interpretable machine learning method based on SHAP, comprising:

[0039] Data acquisition module: used to acquire experimental data through nuclear fusion discharge experiments, obtain radial gradient values ​​through radial distribution calculation, summarize experimental data and radial gradient values ​​into input physical quantities, and input the input physical quantities into the neoclassical circumferential viscous torque physical model to obtain output physical quantities;

[0040] Machine learning model generation module: Input the input physical quantities into the CatBoost algorithm to obtain a new classical circumferential viscous torque machine learning model;

[0041] Sorting module: Sorts the features of the input physical quantities using the PFI and SHAP methods, and determines the sorting result;

[0042] Model Interpretation Module: Used to draw beehive diagrams and interaction diagrams for the top-ranked features.

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

[0044] This invention can gain insight into the neoclassical circumferential viscous torque machine learning model with black-box properties, and uncover the importance of its features. While ensuring the fast and accurate calculation of the neoclassical circumferential viscous torque, it also takes into account the interaction relationship between different physical features, ensuring the interpretability of the prediction results. Thus, it achieves a balance between prediction accuracy, speed and interpretability, and provides new ideas for three-dimensional tokamak physics experiments. Attached Figure Description

[0045] Figure 1 This is a schematic diagram of the overall method flow of the present invention;

[0046] Figure 2 This is a schematic diagram of the model training process of the present invention;

[0047] Figure 3 This is a model prediction performance graph in one embodiment of the present invention;

[0048] Figure 4 This is a global feature importance ranking diagram of the neoclassical circumferential viscous torque of electrons in one embodiment of the present invention;

[0049] Figure 5 This is a global feature importance ranking diagram of the neoclassical circumferential viscous torque of ions in one embodiment of the present invention;

[0050] Figure 6 This is a global feature beehive diagram of neoclassical circumferential viscous torque based on SHAP in one embodiment of the present invention;

[0051] Figure 7 This is a global feature swarm diagram of neoclassical circumferential viscous torque based on SHAP in one embodiment of the present invention.

[0052] Figure 8 This is a schematic diagram of the system structure of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.

[0054] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0055] Example 1:

[0056] Please see Figures 1-7 The present invention provides a technical solution:

[0057] A new classical circumferential viscous moment interpretable machine learning method based on SHAP, the specific steps of which include:

[0058] Step 1: Obtain experimental data through nuclear fusion discharge experiments. The experimental data includes magnetic field strength, electron density, electron temperature, ion temperature, rotation frequency, and safety factor. Calculate the radial gradient values ​​of the experimental data through radial distribution to obtain the radial gradients of electron density, electron temperature, and ion temperature. Summarize the experimental data and radial gradient values ​​into input physical quantities. Input these input physical quantities into the neoclassical circumferential viscous torque physical model to obtain output physical quantities. The output physical quantities include the neoclassical circumferential viscous torque of electrons and the neoclassical circumferential viscous torque of ions. Organize the input physical quantities into an input physical quantity dataset and correlate the corresponding output physical quantities.

[0059] Step 1 includes the following:

[0060] Experimental data was obtained through nuclear fusion discharge experiments. This data included magnetic field strength, electron density, electron temperature, ion temperature, rotation frequency, and safety factor. Radial gradient values ​​were calculated using radial distribution to obtain the radial gradients of electron density, electron temperature, and ion temperature. The experimental data and radial gradient values ​​were then summarized into input physical quantities. The output physical quantities included the neoclassical circumferential viscous torque of electrons and ions. These output physical quantities were calculated by inputting the input physical quantities into the neoclassical circumferential viscous torque physical model. The input physical quantities were then organized into a dataset, and the output physical quantities were organized into labels for each sample corresponding to the input physical quantities.

[0061] ;

[0062] in, Let i be the input sample of the i-th group, and i be the retrieval sequence of the sample group. B is the magnetic field strength, Ne is the electron density, dNe is the radial gradient of electron density, Te is the electron temperature, dTe is the radial gradient of electron temperature, Ti is the ion temperature, and dTi is the radial gradient of ion temperature. Let q be the rotational frequency and q be the safety factor.

[0063] ;

[0064] in, The output physical quantity is the corresponding sample of the i-th group in the input physical quantity dataset, where i is the sample group retrieval sequence. DL represents the neoclassical circumferential viscous torque of electrons, and LL represents the neoclassical circumferential viscous torque of ions.

[0065] Step 2: Preprocess the input physical quantity dataset. Use the input physical quantity dataset as the training set to input the neoclassical circumferential viscous torque machine learning model. Use the output physical quantity as the label of the input physical quantity and label it as the actual value. Evaluate the neoclassical circumferential viscous torque machine learning model by the mean square error, mean absolute error and coefficient of determination between the model output value and the actual value. Set thresholds for mean square error, mean absolute error and coefficient of determination. If the threshold conditions are met, the neoclassical circumferential viscous torque machine learning model is obtained.

[0066] Step 2 includes the following:

[0067] The input physical quantity dataset is preprocessed, including outlier removal, missing value imputation, and data normalization. Similarly, the output physical quantity dataset undergoes outlier removal, missing value imputation, and logarithmic transformation to form a feature vector. Missing values ​​are imputed and normalized. The input physical quantity dataset is used as the training set to train a neoclassical circumferential viscous torque machine learning model using the CatBoost algorithm. The output physical quantity is used as the label for the input physical quantity and calibrated to its actual value. The model performance is evaluated using root mean square error, mean absolute error, and coefficient of determination, based on the following formulas:

[0068] ;

[0069] ;

[0070] ;

[0071] in, The root mean square error, The mean absolute error, As the coefficient of determination, This is the actual value. These are the model's predicted values. This represents the average of the actual values, where n is the sample size and i is the result retrieval variable corresponding to the sample. ;

[0072] Thresholds for root mean square error, mean absolute error, and coefficient of determination are set respectively. When the root mean square error, mean absolute error, and coefficient of determination all meet the threshold conditions, the new classical circumferential viscous torque machine learning model is obtained through calibration.

[0073] Step 3: Determine the importance ranking of each feature in the input physical quantity dataset in the neoclassical circumferential viscous torque machine learning model using the PFI and SHAP methods respectively. The two rankings are then judged by the Spearman rank correlation coefficient. If the Spearman rank correlation coefficient meets the conditions, the same ranking is obtained. For Spearman rank correlation coefficients that do not meet the conditions, the importance value is used to judge the features with different rankings. For models with importance values ​​greater than the limit, the model is retrained until a model with the same feature ranking is obtained.

[0074] Step 3 includes the following:

[0075] Step 301: Interpret the neoclassical circumferential viscous torque machine learning model using the TreeEXM method, which includes the PFI method and the SHAP method. The logic of the PFI method is as follows:

[0076] A feature value of one type in the original input physical quantity data is randomly permuted. This random permutation involves randomly shuffling the data within the same type across the sample sequence to form a replacement dataset. This replacement dataset is then input into the new classical circumferential viscous torque machine learning model to generate a new output physical quantity dataset. New determination coefficients are then calculated in the model based on this new output physical quantity dataset. The formula used is as follows:

[0077] ;

[0078] in, It is the first The first type of actual value for each sample, It is the first The second type of actual value for each sample, It is the first The model output for each sample is the first type of model output value. It is the first The model outputs the second type of model output value for each sample. It is the average of all actual values ​​of the first type. It is the average of all actual values ​​of the second type, where i is the sample retrieval variable. The first and second types are arbitrary orders of electronic neoclassical circumferential viscous torque and ionic neoclassical circumferential viscous torque;

[0079] Calculate the coefficient of determination for each feature in turn. The new coefficient of determination is compared with the original coefficient of determination using the following formula:

[0080] ;

[0081] in, Let k be the importance value of the k-th feature. Let be the new coefficient of determination for the k-th feature, where k is the retrieval variable for the feature. ,

[0082] Step 302: The SHAP method is as follows: Calculate the Shapley value of each feature in each sample in the neoclassical circumferential viscous torque machine learning model, based on the following formula:

[0083] ;

[0084] in, is the Shapley value of feature i on instance sample x, and T is the set of all trees in the model. It is the weight of the t-th tree. It is the prediction value of the t-th tree for instance sample x when it contains feature i. It is the prediction value of the t-th tree for instance sample x without containing feature i.

[0085] Step 303: Sort the features in the input physical quantity dataset according to their importance values ​​from largest to smallest to form a determination coefficient ranking. Then, sort the features in the input physical quantity dataset according to their average Shapley value across all samples, from largest to smallest, to form a Shapley value ranking. Determine whether the determination coefficient ranking and the Shapley value ranking are the same. The logic for determining whether the rankings are the same is as follows:

[0086] The internal features of the two rankings are assigned ranks, with the least important type having a rank of 1, the next most important being rank 2, then rank 3, and so on. The Spearman rank correlation coefficient is used to determine the rank, based on the following formula:

[0087] ;

[0088] in The Spearman rank correlation coefficient. Let be the difference in rank between the two rankings for the i-th feature, n be the number of input parameters, and i be the feature retrieval variable. ;

[0089] when When two sorting sequences are considered to be the same, When it is determined that two rankings have some features with different ranks, the importance value of the features with different ranks is calculated. Make a judgment, if If the position of a feature differs, the issue of different rankings is ignored, and the different positions of the feature in the two rankings are accepted. The two rankings are considered the same. If there are features with different rankings, their importance values ​​are considered... If the neoclassical circumferential viscous torque machine learning model is found to have problems, the model parameters are adjusted, the model is retrained, and the sorting is performed again according to the PFI method and SHAP method until two sorting results with the same order are obtained.

[0090] Step 4: Merge the importance feature rankings determined by the PFI and SHAP methods to form a total ranking, and draw the beehive diagram and interaction diagram of the features with the highest total ranking.

[0091] Step 4 includes the following:

[0092] The ranking of determinant coefficients and Shapley values ​​that meet the conditions are merged to form a global feature importance ranking. For features that have different rankings in the determinant coefficient ranking and Shapley value ranking, the average ranking of their two rankings is selected and included in the global feature importance ranking. The top x features are selected for further analysis. Based on the Shapley values ​​of the top x features, a beehive diagram is drawn to analyze the influence trend of input physical quantities on output physical quantities. An interaction diagram is drawn to analyze the cooperative change relationship between input physical quantities.

[0093] Each point in the swarm diagram represents a sample. Its horizontal coordinate position is determined by the Shapley value, and its color is determined by the magnitude of the input parameter value. The larger the input parameter value, the darker the color, and vice versa. The accumulation of points will form a density. Based on the accumulation density and color distribution of points, we can analyze the influence trend of the neoclassical circumferential viscous torque input parameter on the output and make a preliminary judgment on their interaction.

[0094] The SHAP method is used to analyze the synergistic relationship between the input parameters of the neoclassical circumferential viscous torque by plotting an interaction diagram of the input parameters. Specifically, one input parameter is used as a baseline, and another input parameter is selected for coloring. Each point in the interaction diagram represents a sample. The x-coordinate of the point is determined by the baseline input parameter value, the y-coordinate is determined by the Shapley value of the baseline input parameter, and the color of the point is determined by the value of the input parameter selected for coloring. The larger the value of the input parameter selected for coloring, the darker the color of the point. The synergistic relationship between the two input parameters is analyzed based on the color distribution and clustering of the points.

[0095] Please see Figure 8 The present invention also includes a neoclassical circumferential viscous torque interpretable machine learning system based on SHAP, for performing the above-described neoclassical circumferential viscous torque interpretable machine learning method based on SHAP, comprising:

[0096] Data acquisition module: used to acquire experimental data through nuclear fusion discharge experiments, obtain radial gradient values ​​through radial distribution calculation, summarize experimental data and radial gradient values ​​into input physical quantities, and input the input physical quantities into the neoclassical circumferential viscous torque physical model to obtain output physical quantities;

[0097] Machine learning model generation module: Input the input physical quantities into the CatBoost algorithm to obtain a new classical circumferential viscous torque machine learning model;

[0098] Sorting module: Sorts the features of the input physical quantities using the PFI and SHAP methods, and determines the sorting result;

[0099] Model Interpretation Module: Used to draw beehive diagrams and interaction diagrams for the top-ranked features.

[0100] Example 2, please refer to Figures 3 to 7 :

[0101] The features of the input physical quantities are concatenated into an input vector as input features. The output physical quantities are concatenated as output features to form an output vector. Create input-output pairs containing 568,750 samples. ), for the input vector Data processing is performed, including outlier removal, missing value imputation, and data normalization. The data normalization methods are as follows:

[0102] ;

[0103] in The original data, The data is after normalization. Indicates the first Each input feature , This indicates finding the maximum value among all samples. This indicates finding the minimum value among all samples.

[0104] For the output vector Data processing is performed, including outlier removal, missing value imputation, and logarithmic transformation. The logarithmic transformation method is as follows:

[0105] ;

[0106] in The original data, For data preprocessing, Indicates the first Each output feature ;

[0107] As a preferred embodiment, the Catboost model is trained based on the neoclassical circumferential viscous torque dataset. The Catboost model is an efficient gradient boosting decision tree framework. The number of iterations is set to 2000, the learning rate is 0.36, the maximum tree depth is 6, and the multi-output root mean square error loss function is used as the objective function for optimization. Its formula is as follows:

[0108] ;

[0109] in This represents the model's prediction of the i-th sample in the d-th dimension. This represents the true value of the i-th sample in the d-th dimension, where dim is the number of dimensions of the output vector, and N is the number of samples. .

[0110] Next, the initial machine learning model is optimized on the test set, and the model parameters of the constructed basic model are optimized. Finally, the final prediction model is evaluated on the validation set using three evaluation metrics: root mean square error, mean absolute error, and coefficient of determination. If the three metrics cannot meet the performance requirements at the same time, the training step is returned to adjust the hyperparameters of the model for retraining and testing until the performance requirements are met. Some samples are randomly selected to visually demonstrate the difference between the predicted and actual values ​​of the neoclassical circumferential viscous torque of electrons and the neoclassical circumferential viscous torque of ions.

[0111] For this example, the root mean square error (RMSE) is the evaluation metric for the model. The mean absolute error is The coefficient of determination is 0.97, and all meet the performance requirements. Randomly selected samples are used to visually demonstrate the difference between the predicted and actual values ​​of the neoclassical circumferential viscous torque for electrons and ions. Figure 3 The comparison between the predicted and actual values ​​of the neoclassical circumferential viscous torque for electrons and ions, with sample numbers from 224640 to 224705 and 440700 to 440765, shows that the model can accurately predict the neoclassical circumferential viscous torque for electrons and ions.

[0112] As a preferred embodiment, such as Figure 4 The figure shows the global feature importance ranking of the neoclassical circumferential torque of electrons. This figure illustrates the global feature importance ranking of the contribution of input features in the input physical quantities to the neoclassical circumferential torque of electrons. The safety factor has an explanatory power of more than 0.3 for the neoclassical circumferential viscous torque of electrons, indicating that the neoclassical circumferential viscous torque of electrons is relatively sensitive to the safety factor. The electron temperature has an explanatory power of more than 0.3 for the neoclassical circumferential viscous torque of electrons, and the radial gradient of electron temperature has an explanatory power of more than 0.2 for the neoclassical circumferential viscous torque of electrons, indicating that the neoclassical circumferential viscous torque of electrons is highly sensitive to electron temperature.

[0113] As a preferred embodiment, such as Figure 5 The figure shows the global feature importance ranking of the neoclassical circumferential torque of ions. This figure shows the global feature importance ranking of the contribution of features in NRI to the neoclassical circumferential torque of ions. Among them, q has an explanatory power of more than 0.5 for the neoclassical circumferential viscous torque of ions, indicating that the neoclassical circumferential viscous torque of ions is highly sensitive to q. The electron density Ne has an explanatory power of more than 0.3 for the neoclassical circumferential viscous torque of ions, indicating that the neoclassical circumferential viscous torque of ions is relatively sensitive to Ne.

[0114] As a preferred embodiment, such as Figure 6 The figure shows the global feature swarm diagram of the neoclassical circumferential viscous torque based on SHAP. This diagram illustrates the influence trend of features in the input physical quantity on the neoclassical circumferential torque of the ion. Figure 6 The global characteristic beehive plot of the neoclassical circumferential viscous torque of electrons is shown. The clusters of large eigenvalues ​​of Ti and q correspond to mostly positive Shapley values, indicating that Ti and q are positively correlated with the neoclassical circumferential viscous torque of electrons; dNe, dTe, Ne, For large clusters, the corresponding Shapley values ​​are mostly negative, showing a negative correlation with the neoclassical circumferential viscous torque of electrons. Figure 7 The global characteristic swarm diagram of the neoclassical circumferential viscous torque of ions is shown. The clusters of eigenvalues ​​with large values ​​of q, Ne, and dNe are mostly associated with negative Shapley values, which have the same negative impact on the neoclassical circumferential viscous torque of ions; dTi, Te shows a positive correlation with the neoclassical circumferential viscous torque of ions.

[0115] As a preferred embodiment, for the neoclassical circumferential viscous torque of electrons, where the eigenvalue of Te is small and the eigenvalue of q is large, the corresponding Shapley values ​​are mostly negative, indicating that the smaller Te is and the larger q is, the more it has a significant inhibitory effect on the neoclassical circumferential viscous torque of electrons. For the neoclassical circumferential viscous torque of ions, the opposite is true: the larger Te is and the smaller q is, the more it has a significant promoting effect on the neoclassical circumferential viscous torque of ions.

[0116] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0117] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0118] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0119] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A neoclassical circumferential viscous torque interpretable machine learning method based on SHAP, characterized in that... The specific steps include: Step 1: Obtain experimental data and calculate radial gradient values ​​through nuclear fusion discharge experiments. Summarize the experimental data and radial gradient values ​​into input physical quantities and input them into the neoclassical circumferential viscous torque physical model to obtain output physical quantities. Organize the input physical quantities into an input physical quantity dataset and correlate the corresponding output physical quantities. Step 2: Input the input physical quantity dataset as the training set into the new classical circumferential viscous torque machine learning model, and use the output physical quantity as the label of the input physical quantity and label it as the actual value. After training is completed, the new classical circumferential viscous torque machine learning model is obtained. Step 3: Determine the importance ranking of each feature in the input physical quantity dataset in the neoclassical circumferential viscous torque machine learning model using the PFI method and SHAP method respectively. The two rankings are judged by the Spearman rank correlation coefficient. If the Spearman rank correlation coefficient meets the conditions, the same ranking is obtained. Otherwise, the importance value is used to judge the features with different rankings. For the models with importance values ​​greater than the limit, the models are retrained until the models with the same feature ranking are obtained. The features in the input physical quantity dataset are sorted from most important to least important to form a coefficient of determination ranking. The average Shapley value of each feature across all samples is then used as the standard, and these features are sorted from most absolute to least important to form a Shapley value ranking. The coefficient of determination ranking and the Shapley value ranking are then compared to determine if they are the same. The logic for this comparison is as follows: The internal features of the two rankings are assigned ranks, with the least important type having a rank of 1, the next most important being rank 2, then rank 3, and so on. The Spearman rank correlation coefficient is used to determine the rank, based on the following formula: in The Spearman rank correlation coefficient. Let be the difference in rank between the two rankings for the i-th feature. n It is the number of input parameters. i For feature retrieval variables, ; when When two sorting sequences are considered to be the same, When it is determined that two rankings have some features with different ranks, the importance value of the features with different ranks is calculated. Make a judgment, if If the position of a feature differs, the issue of different rankings is ignored, and the different positions of the feature in the two rankings are accepted. The two rankings are considered the same. If there are features with different rankings, their importance values ​​are considered... If the neoclassical circumferential viscous torque machine learning model is found to have problems, the model parameters are adjusted, the model is retrained, and the sorting is performed again according to the PFI method and SHAP method until two sorting results with the same sorting are obtained. Step 4: Merge the importance feature rankings determined by the PFI and SHAP methods to form a total ranking, and draw the beehive diagram and interaction diagram of the features with the highest total ranking.

2. The neoclassical circumferential viscous torque interpretable machine learning method based on SHAP according to claim 1, characterized in that: Experimental data was obtained through nuclear fusion discharge experiments. This data included magnetic field strength, electron density, electron temperature, ion temperature, rotation frequency, and safety factor. Radial gradient values ​​were calculated using radial distribution to obtain the radial gradients of electron density, electron temperature, and ion temperature. The experimental data and radial gradient values ​​were then summarized into input physical quantities. These input physical quantities were input into a neoclassical circumferential viscous torque physical model to calculate output physical quantities, including the neoclassical circumferential viscous torque of electrons and ions. The input physical quantities were organized into a dataset, and the output physical quantities were organized into labels for each sample corresponding to the input physical quantities. in, For the first i Group input quantity samples, i Retrieve sequences for the sample group. , B The magnetic field strength, Ne For electron density, dNe For the radial gradient of electron density, Te For electron temperature, dTe For the radial gradient of electron temperature, Ti The ion temperature. dTi The radial gradient of ion temperature. For rotation frequency, q As a safety factor; in, For the input physical quantity dataset, the first i The output physical quantity corresponding to the sample group, where i is the sample group retrieval sequence. , DL For the neoclassical circumferential viscous torque of electrons, LL It is the neoclassical circumferential viscous torque of ions.

3. The neoclassical circumferential viscous torque interpretable machine learning method based on SHAP according to claim 2, characterized in that: The input physical quantity dataset is preprocessed to form feature vectors, missing values ​​are filled in and normalized, and this is used as the training set to train a neoclassical circumferential viscous torque machine learning model using the CatBoost algorithm. The output physical quantity is used as the label of the input physical quantity and labeled with the actual value. The model performance is evaluated by root mean square error, mean absolute error, and coefficient of determination, based on the following formulas: in, The root mean square error, The mean absolute error, As the coefficient of determination, This is the actual value. These are the model's predicted values. This represents the average of the actual values, where n is the sample size and i is the result retrieval variable corresponding to the sample. ; Thresholds for root mean square error, mean absolute error, and coefficient of determination are set respectively. When the root mean square error, mean absolute error, and coefficient of determination all meet the threshold conditions, the new classical circumferential viscous torque machine learning model is obtained through calibration.

4. The neoclassical circumferential viscous torque interpretable machine learning method based on SHAP according to claim 3, characterized in that: The neoclassical circumferential viscous torque machine learning model is explained using the TreeEXM method, which includes the PFI method and the SHAP method. The logic of the PFI method is as follows: A feature value of one type in the original input physical quantity data is randomly permuted. This random permutation involves randomly shuffling the data within the same type across the sample sequence to form a replacement dataset. This replacement dataset is then input into the new classical circumferential viscous torque machine learning model to generate a new output physical quantity dataset. New determination coefficients are then calculated in the model based on this new output physical quantity dataset. The formula used is as follows: in, It is the first The first type of actual value for each sample, It is the first The second type of actual value for each sample, It is the first The model output for each sample is the first type of model output value. It is the first The model outputs the second type of model output value for each sample. It is the average of all actual values ​​of the first type. It is the average of all actual values ​​of the second type. i For sample retrieval variables, The first and second types are arbitrary orders of the neoclassical circumferential viscous torque of electrons and the neoclassical circumferential viscous torque of ions. Calculate the coefficient of determination for each feature in turn. The new coefficient of determination is compared with the original coefficient of determination using the following formula: in, Let k be the importance value of the k-th feature. The new coefficient of determination for the k-th feature. k Retrieval variables for features , The SHAP method involves calculating the Shapley value of each feature in each sample within the neoclassical circumferential viscous torque machine learning model, based on the following formula: in, It is the Shapley value of feature i on instance sample x. T It is the set of all trees in the model. It is the first t The weight of each tree It is the first t Trees containing features i The predicted value for instance sample x at that time. It is the first t The tree's prediction of instance sample x without including feature i.

5. The neoclassical circumferential viscous torque interpretable machine learning method based on SHAP according to claim 4, characterized in that: The ranking of determinant coefficients and Shapley values ​​that meet the conditions are merged to form a global feature importance ranking. For features that have different rankings in the determinant coefficient ranking and Shapley value ranking, the average ranking of their two rankings is selected and included in the global feature importance ranking. The top x features are selected for further analysis. Based on the Shapley values ​​of the top x features, a beehive diagram is drawn to analyze the influence trend of input physical quantities on output physical quantities. An interaction diagram is drawn to analyze the cooperative change relationship between input physical quantities.

6. A neoclassical circumferential viscous torque interpretable machine learning system based on SHAP, used to execute the neoclassical circumferential viscous torque interpretable machine learning method based on SHAP as described in any one of claims 1-5, characterized in that: Data acquisition module: used to acquire experimental data through nuclear fusion discharge experiments, obtain radial gradient values ​​through radial distribution calculation, summarize experimental data and radial gradient values ​​into input physical quantities, and input the input physical quantities into the neoclassical circumferential viscous torque physical model to obtain output physical quantities; Machine learning model generation module: Input the input physical quantities into the CatBoost algorithm to obtain a new classical circumferential viscous torque machine learning model; Sorting module: Sorts the features of the input physical quantities using the PFI and SHAP methods, and determines the sorting result; Model Interpretation Module: Used to draw beehive diagrams and interaction diagrams for the top-ranked features.

Citation Information

Patent Citations

  • Machine learning method for Tokamak new classical circumferential viscous torque

    CN117371299A

  • Airborne hydraulic system flow prediction method based on data driving

    CN117892192A