Risk identification method based on decision tree algorithm
Through the adjustment of dynamic feature importance scores and feature selection thresholds, the feature selection and node splitting standards of the decision tree model are optimized, and the performance degradation of the existing decision tree in high-dimensional data and complex feature interaction scenarios is solved, and a higher performance is achieved prediction accuracy and robustness.
Patent Information
- Application Number
- CN202411207023.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When handling high-dimensional data and complex feature interactions, existing decision tree models are susceptible to noise data and outliers, and the feature selection strategy is static and cannot adapt to data changes, resulting in a degradation of model performance.
Dynamic adjustment methods of dynamic feature importance score and feature selection threshold are adopted, combined with information gain, variance normalization and correlation analysis, node splitting standards are optimized, and integrated models are generated to improve the flexibility and stability of the model.
It significantly improves the model's response to data feature changes, improves the prediction accuracy and robustness of the model, avoids overfitting and underfitting problems, and enhances its adaptability to complex data environments.
Smart Images

Figure CN119167218A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of decision trees, and in particular to a risk identification method based on a decision tree algorithm. Background Art
[0002] In the field of modern risk management and prediction, especially in finance, insurance and industrial applications, accurate identification and prediction of risks are key to decision making. With the development of big data technology and the advancement of data analysis methods, machine learning and artificial intelligence technologies have been widely used in risk identification systems. Traditional risk identification methods usually rely on statistical analysis and rule-based systems, which perform well when dealing with scenarios with small data scale or relatively simple patterns. However, with the increase in data complexity and scale, especially in areas such as financial market risk identification, credit scoring and fraud detection, these traditional methods face significant challenges.
[0003] Risk identification methods in the prior art mostly rely on traditional statistical and machine learning models such as linear regression, logistic regression, and support vector machine (SVM). These models perform well in tasks with relatively simple relationships between features, but they are often unable to handle high-dimensional data, multiple nonlinear relationships, and data with complex interactions between features. Decision trees and their variants (such as random forests and gradient boosting trees) have become important tools in the field of risk identification in recent years because of their easy interpretation and ability to handle nonlinear relationships. Decision tree models construct a hierarchical decision structure by recursively splitting data into smaller subsets. However, although decision trees and their ensemble methods have shown superior performance in complex data environments, they still face some problems and challenges. First, existing decision tree models are easily affected by noisy data and outliers during feature selection. Since the node splitting of decision trees is based on criteria such as information gain or Gini index, noise and outliers may lead to incorrect splitting decisions, thereby affecting the overall performance of the model. In the prior art, random forests mitigate this effect by ensembling and averaging multiple trees, but the effect of random forests may not be ideal when the data is highly complex or the feature importance changes dramatically. In addition, each tree in the random forest is independently generated on a different subset of the original data, lacking overall consideration of the global characteristics of the data. Therefore, the predictive ability of the model may be limited in scenarios with complex feature interactions. Summary of the invention
[0004] The purpose of the present invention is to provide a risk identification method based on a decision tree algorithm, which improves the risk identification accuracy and stability of the model and enhances the model's adaptability to different data environments and application scenarios.
[0005] In order to solve the above technical problems, the present invention provides a risk identification method based on a decision tree algorithm, which comprises:
[0006] Step 1: Obtain a target sample data set, wherein the target sample data set includes multiple original data points; preprocess the target sample data set to make features of different scales comparable, thereby obtaining a preprocessed data set, wherein the preprocessed data set includes multiple features, each feature corresponding to an original data point; perform nonlinear feature transformation and enhancement on the processed data set to obtain an enhanced data set; the enhanced data set includes the same number of features as the preprocessed data set;
[0007] Step 2: Determine the target variable for risk identification, calculate the dynamic feature importance of the enhanced data set, and obtain the feature importance score; based on the feature importance score, dynamically determine the threshold for feature selection;
[0008] Step 3: Generate a decision tree for the enhanced data set. In each node of the decision tree, include the features in multiple enhanced data sets. According to the threshold of feature selection, define the node splitting criterion in the decision tree generation process, split the decision tree, and obtain multiple split decision trees.
[0009] Step 4: Combine multiple split decision trees into an integrated model; calculate the output result based on the integrated model, the target sample data set and the enhanced data set, wherein the output result is a risk value; calibrate the output result, and compare the calibrated output result with the preset threshold range to obtain the risk identification result.
[0010] Furthermore, in step 1, the mean μ, standard deviation σ, median (X), median absolute deviation MAD (X) and interquartile range IQR (X) of the target sample data set collected are first calculated, and then the target sample data set is preprocessed by the following formula to obtain the preprocessed data set X processed :
[0011]
[0012] Where N is the number of original data points in the target sample data set X; i is a positive integer subscript index.
[0013] Furthermore, in step 1, the processed data set is transformed and enhanced by nonlinear features using the following formula to obtain the enhanced data set F enhanced :
[0014]
[0015] Where arcsinh is the inverse hyperbolic sine function; IQR(X processed ) is the interquartile range of the preprocessed data; Kurt(X processed) is the kurtosis of the preprocessed data; erf is the error function; is the mean value of the preprocessed data; is the standard deviation of the preprocessed data; Skew(X processed ) is the skewness of the preprocessed data; MAD(X processed ) is the median absolute deviation of the preprocessed data; the enhanced dataset F enhanced It includes the same number of features as in the preprocessed dataset, and the i-th feature is F i .
[0016] Furthermore, in step 2, the dynamic feature importance of the enhanced data set is calculated by the following formula to obtain the feature importance score I(F i ):
[0017]
[0018] Among them, H(Y) is the entropy of the target variable, H(Y|F i ) is a given feature F i Conditional entropy under conditions, Var(F i ) is the feature F i The variance of Corr(F i ,Y) is the feature F i The correlation coefficient with the target variable Y; the feature importance scores of all features are combined into the feature importance score I.
[0019] Furthermore, in step 2, the threshold T for feature selection is dynamically determined based on the feature importance score by the following formula: select :
[0020]
[0021] Among them, μ I and σ I are the mean and standard deviation of the feature importance score I, erf is the error function, kurtosis(I) is the kurtosis of the feature importance score I, and entropy(F enμanced ) is the entropy of the enhanced feature.
[0022] Furthermore, in step 3, after generating multiple decision trees, the process of defining the node splitting criteria in the decision tree generation process according to the feature selection threshold specifically includes: for each node of the decision tree, calculating the depth depth of the current node and the number of features of the current node |S|; for each possible split feature F i , get the importance score of the feature I(F i), calculate the entropy H(Y) of the target variable; for each possible segmentation point of the feature, calculate the number of features of the left child node and the right child node after segmentation |S L | and |S R |; Calculate F i The maximum and minimum values at the current node; calculate the split point value and T select The distance between nodes is calculated by using the preset column splitting standard calculation model to obtain the splitting standard Split of the i-th node. criterion,i ; Select Split criterion,i The largest feature and split point are taken as the best split; child nodes are created based on the best split and the process is repeated for the child nodes until the maximum depth is reached.
[0023] Furthermore, the preset column classification standard calculation model is expressed by the following formula:
[0024]
[0025] Furthermore, in step 4, multiple split decision trees are combined into an integrated model F by the following formula: ensemble :
[0026]
[0027] Where M is the number of decision trees, w i is the preset weight of the ith decision tree, T i is the output of the ith decision tree, OOB i is the out-of-bag error rate of the ith decision tree, L tree,i is the structural complexity of the i-th decision tree; L tree is the loss function of the decision tree.
[0028] Furthermore, the loss function L of the decision tree tree It is expressed by the following formula:
[0029]
[0030] Among them, S t is the number of features of the tth node; H(Y t ) is the entropy of the target variable of the tth node; |leaves| is the number of leaf nodes; Split criterion,t is the splitting criterion of node t; |used(F i )| is feature F i The number of times it is used in the decision tree; |total(F i )| is feature F i The total number of times available.
[0031] Furthermore, the target sample data set is input into the integrated model, and the output result R is obtained through the following formula: score :
[0032]
[0033] Among them, μ F F ensemble The mean of F F ensemble The standard deviation of erf -1 is the inverse function of the error function; μ Fi is the average value of the i-th feature; max(F i ) and min(F i ) are the maximum and minimum values of the i-th feature respectively; Corr(F i ,Y) is the correlation coefficient between the i-th feature and the target variable Y;
[0034] max(|Corr(F,Y)|) is the maximum absolute value of the correlation coefficient between all features and the target variable; if R score >1, it is considered high risk; if 0.5 <R score ≤1, it is considered as medium risk; if R score ≤0.5, it is judged as low risk.
[0035] A risk identification method based on a decision tree algorithm of the present invention has the following beneficial effects: the present invention significantly improves the responsiveness of the model to changes in data features by introducing dynamic feature importance scores and dynamic adjustment of feature selection thresholds. In traditional decision tree algorithms, feature selection is often based on fixed criteria, such as information gain or Gini index. This static feature selection method cannot fully adapt to the situation where data distribution and feature importance change over time or scenarios. The dynamic feature importance score calculation method proposed in the present invention combines a variety of statistical and information theory indicators such as information gain, variance normalization, correlation analysis, and feature range adjustment, so that the feature importance score can more comprehensively reflect the actual contribution of each feature to the target variable. Through this multi-dimensional scoring mechanism, the model can dynamically adjust the feature selection strategy when the data distribution changes, ensuring that the features that are most valuable for risk prediction are preferentially selected in the splitting process of each node, significantly improving the flexibility and accuracy of the model. Secondly, the present invention effectively balances the relationship between the frequency of feature use and its prediction contribution in the process of feature selection. By introducing a loss function for feature use frequency, the present invention can dynamically adjust the selection and use strategy of features to prevent the model from over-relying on certain features and ignoring other potentially important features. This loss function design takes into account the ratio between the frequency of use of a feature in the entire decision tree and its total available number of times, and avoids the overfitting problem of the model by limiting the excessive use of features. At the same time, the method of the present invention can also automatically identify and adjust the deviation in feature selection, ensuring that the model can make full use of all potentially valuable features during the training process, thereby improving the overall performance and robustness of the model. In addition, the present invention optimizes the construction process of the decision tree through an improved node splitting criterion calculation model. In traditional decision tree generation methods, the node splitting criterion is usually based on a single metric, such as information gain or Gini index, which may lead to suboptimal splitting selection, especially in high-dimensional data environments. In contrast, the present invention proposes a multi-level node splitting criterion by comprehensively considering the node depth, the number of sub-node features, the feature selection threshold and the correlation between features. This splitting criterion can not only maximize the purity of the node after each split, but also dynamically control the depth and structure of the tree, prevent the overfitting or underfitting problem of the model, and improve the generalization ability and prediction performance of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0037] Figure 1 A method flow chart of a risk identification method based on a decision tree algorithm provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] Example 1: Reference Figure 1 , a risk identification method based on decision tree algorithm, which includes:
[0040] Step 1: Obtain a target sample data set, wherein the target sample data set includes multiple original data points; preprocess the target sample data set to make features of different scales comparable, thereby obtaining a preprocessed data set, wherein the preprocessed data set includes multiple features, each feature corresponding to an original data point; perform nonlinear feature transformation and enhancement on the processed data set to obtain an enhanced data set; the enhanced data set includes the same number of features as the preprocessed data set;
[0041] First of all, obtaining the target sample data set is the basis of the whole process. The data set contains multiple raw data points, which are usually composed of multiple features, such as customer income, age, credit score, etc. in the financial field. In practical applications, these features often have different scales and dimensions, which makes them unable to be directly compared during model training. Therefore, in order to eliminate the deviation caused by different feature scales, the data must be preprocessed. The main goal of preprocessing is to make features of different scales comparable, which is usually achieved through standardization or normalization. Standardization is a common method, and its formula is Where x′ is the standardized eigenvalue, x is the original eigenvalue, μ and σ are the mean and standard deviation of the feature, respectively. Through standardization, all features are converted to distributions with zero mean and unit variance, thereby eliminating the dimensional differences between features and ensuring that the model will not be biased towards a feature due to the large absolute value of a feature during training. On the basis of the preprocessed data set, nonlinear feature transformation and enhancement are further performed. The core purpose of feature transformation is to improve the expressive power of the model so that the model can not only capture linear relationships, but also identify more complex nonlinear relationships. In the present invention, nonlinear feature transformation may include polynomial feature generation, logarithmic transformation, exponential transformation, etc. For example, the original "income" feature can be converted into "square income", "cube income", etc. through polynomial feature generation, or "logarithm of income" can be obtained through logarithmic transformation. The features of these nonlinear transformations can effectively reveal the potential nonlinear structure in the data and enhance the prediction ability of the model. At the same time, in order to further enhance the model's ability to capture complex relationships, the present invention also performs feature enhancement. This enhancement not only includes nonlinear feature transformation, but also includes feature crossover or combination. By performing cross operations on different features, such as multiplying "income" and "age" to generate a new cross feature, the relationship between the two features can be better captured. This feature cross operation can reveal patterns that have not been fully mined in the original data, thereby improving the overall performance of the model. The enhanced dataset is an important part of the present invention. It is generated through nonlinear transformation and feature enhancement on the basis of data preprocessing. This enhanced dataset not only retains the original information of the preprocessed dataset, but also enriches the representation ability of the dataset by adding new features. The number of features in the enhanced dataset is the same as the number of features in the preprocessed dataset, but each feature has undergone a deeper level of processing. For example, the enhanced "credit score" feature, in addition to its original value, may also include its square, logarithmically transformed value, and cross features with other features. This multi-level and multi-angle feature representation method enables the enhanced dataset to more comprehensively express the characteristics of the original data, which helps to improve the training effect of the model.
[0042] Step 2: Determine the target variable for risk identification, calculate the dynamic feature importance of the enhanced data set, and obtain the feature importance score; based on the feature importance score, dynamically determine the threshold for feature selection;
[0043] The main purpose of this step is to enhance the explanatory power and predictive performance of the model through accurate feature selection, so as to provide the most effective input data for the subsequent decision tree generation. First, the determination of the target variable is a key step in risk identification. The target variable represents the output that the model is trying to predict. For example, in financial risk assessment, the target variable may be "the probability of customer default" or "credit risk level". Once the target variable is determined, the model needs to learn how to extract the most relevant information from the input features to accurately predict this variable. After the enhanced dataset is constructed, the dynamic feature importance of each feature to the target variable needs to be calculated. The key to this step is to quantify the contribution of each feature to the prediction target. Feature importance scores are usually based on some measurement criteria, such as information gain, Gini index or entropy. Taking information gain as an example, it measures the degree of uncertainty that a feature can reduce when classifying a dataset. Specifically, information gain calculates the reduction in entropy of the target variable after a feature is used to split the dataset. Entropy is a measure of the chaos of a dataset. Therefore, by reducing entropy, information gain reflects the usefulness of a feature in classification. For example, for a certain enhanced feature "logarithm of income", the greater its information gain, the more important this feature is in distinguishing risk categories. However, in practical applications, different features may show different importance in different data subsets or at different time points. This requires that our feature selection process cannot be static, but should have the ability to be dynamically adjusted. The present invention ensures that the feature selection process can adapt to the changing data environment by introducing a calculation method for dynamic feature importance scoring. The calculation process of dynamic feature importance scoring is not static, but adjusts the importance score of the feature in real time according to the different distribution of data and the change of target variables. For example, if the "income growth rate" of a customer suddenly becomes more predictive in a certain period of time, the system will dynamically adjust its importance score so as to give more attention to it in subsequent model training. Based on the dynamic feature importance score, the present invention proposes a method for dynamically determining the feature selection threshold. This threshold is not fixed, but is dynamically adjusted according to the importance score of the feature. The core idea of the feature selection threshold is that only those features with scores higher than a certain threshold will be selected for model training, which can effectively reduce the interference of noise features and improve the training efficiency and prediction accuracy of the model. The setting method of dynamic feature selection threshold varies according to the actual situation of the current data set and target variable. For example, when the importance score of some features in the data set is significantly higher than that of other features, the threshold will be increased accordingly, so that only the most valuable features are selected for model training; and when the importance scores of all features are close, the threshold will be lowered to include more feature information to train the model. The introduction of this dynamic feature selection mechanism not only improves the prediction accuracy of the model, but also enhances the model's ability to adapt to data changes.Unlike traditional static feature selection methods, the dynamic feature selection method of the present invention can quickly respond and adjust the feature selection strategy when the data environment changes. For example, in the financial risk identification scenario, the importance of different features may change significantly as the market environment changes. The dynamic feature selection mechanism can capture such changes in real time and adjust the threshold of feature selection so that the model is always trained and predicted on the optimal feature set.
[0044] Step 3: Generate a decision tree for the enhanced data set. In each node of the decision tree, include the features in multiple enhanced data sets. According to the threshold of feature selection, define the node splitting criterion in the decision tree generation process, split the decision tree, and obtain multiple split decision trees.
[0045] A decision tree is a supervised learning model that is constructed by recursively splitting a data set into smaller subsets. Each splitting node divides the data according to a certain threshold of a specific feature, thereby gradually generating a tree structure. This splitting strategy enables decision trees to capture complex patterns in data, and is particularly suitable for classification and regression tasks. In risk identification scenarios, decision trees classify new data by learning patterns in historical data and identifying feature combinations associated with high and low risks. In the process of generating a decision tree, it is first necessary to define the splitting criteria for each node. In the present invention, the node splitting criteria are not only based on the importance score of the feature, but also determined by the dynamic threshold of feature selection. The enhanced data set contains data that has been processed with nonlinear feature transformation and feature enhancement. These enhanced features provide more information dimensions, so that the decision tree has greater flexibility and richer choices when performing node splitting. The core of the splitting criterion is to select an optimal feature and threshold so that the subset after each split can maximize the purity. Purity is an indicator of the degree of homogeneity of a node, which can be expressed by the Gini index, entropy or variance reduction. For example, the Gini index is a commonly used classification splitting criterion that measures the degree of confusion in a data set and is given by Where T represents the data set, p iRepresents the proportion of category i in the data set. The decision tree selects the feature and threshold with the smallest Gini index at each split to ensure that the homogeneity of the subset is maximized. In the method of the present invention, a dynamic splitting strategy is used to further improve the accuracy and stability of the model. This strategy determines the splitting features of each node based on the dynamic feature importance score and the dynamic threshold of feature selection. By introducing enhanced data sets and dynamic splitting criteria, the present invention can better capture the complex patterns of data when constructing decision trees. The advantage of this method is that it can adapt to different data features and risk identification needs, which is different from traditional decision tree generation methods, which usually use fixed splitting criteria and static feature selection strategies, which are prone to overfitting or underfitting problems. The application of the dynamic splitting strategy enables the splitting of each node to be optimized according to the characteristics of the current data and the target variable, thereby improving the generalization ability and prediction accuracy of the model.
[0046] After generating multiple split decision trees, the present invention proposes to combine these decision trees into an integrated model. Ensemble learning is a method for improving the overall model performance by combining multiple weak learners (in this case, multiple split decision trees). In risk identification, the integrated model can improve the robustness and accuracy of identification by integrating the prediction results of multiple split decision trees. The integrated model can be constructed in various ways, and a bagging method (such as a random forest) or a boosting method (such as a gradient boosting tree) can be used. In a random forest, multiple decision trees reduce the variance of the model by introducing the randomness of data and features during training, while in a gradient boosting tree, each new tree is generated to reduce the prediction error of the previous model. Therefore, the integrated model can effectively balance the bias and variance when processing risk identification tasks, and provide more reliable prediction results. Finally, based on the integrated model, the present invention calculates the risk value of each input data. The risk value represents the possibility that the data belongs to a certain risk category. In the integrated model, the prediction results of multiple decision trees are combined into the final output by weighted average or majority voting. In order to ensure that the prediction results of the model have sufficient confidence and accuracy, the present invention also introduces a calibration step for the output results. The calibration process is to adjust the model output by comparing the probability distribution predicted by the model with the actual observed distribution, so that the probability predicted by the model is closer to the actual probability. This calibration method can effectively reduce the deviation in model prediction and improve the practical application value of the model.
[0047] Step 4: Combine multiple split decision trees into an integrated model; calculate the output result based on the integrated model, the target sample data set and the enhanced data set, wherein the output result is a risk value; calibrate the output result, and compare the calibrated output result with the preset threshold range to obtain the risk identification result.
[0048] The construction of the integrated model adopts a bagging strategy, that is, multiple decision trees are constructed by randomly selecting data and features, and then the outputs of these trees are combined. Specifically, the implementation method of bagging includes randomly sampling the training set to generate multiple different subsets, which can overlap, and then training an independent decision tree on each subset. Each decision tree generated in this way may learn different patterns and features when facing different data subsets, so that the final integrated model can cover more data features and patterns. This method improves the stability and robustness of the model by increasing the diversity of training data. In addition, the integrated model can effectively reduce the overall prediction bias caused by the error of a single model by weighted averaging or voting the prediction results of multiple decision trees. Assuming that each split decision tree has a certain error rate, the overall error rate of the final prediction result can be greatly reduced by combining the integrated model. After the integrated model is generated, the next step is to calculate the risk value of the enhanced data set and the target sample data set based on the model. The calculation of the risk value is based on the output of each split decision tree in the integrated model, reflecting the probability or risk level of each sample data point belonging to different risk categories. This risk value calculation usually uses the output results of all decision trees in the integrated model, which are integrated in a weighted manner to finally obtain a comprehensive risk score. The specific calculation method can use strategies such as simple average, weighted average or majority voting. For example, in the weighted average method, the prediction results of each decision tree are given different weights according to their performance in the training process (such as accuracy or AUC value). The tree with a higher weight has a greater impact on the final risk value. The advantage of this is that it can fully utilize the prediction advantages of each decision tree and improve the risk prediction ability of the overall model. However, the output results of the integrated model are not always completely consistent with the actual risk situation, which requires calibration. The purpose of calibration is to adjust the output probability of the model to make it closer to the actual observed probability distribution, thereby improving the prediction reliability of the model. Commonly used calibration methods include Plattscaling and Isotonic regression, which can adjust the probability distribution of the model output so that the output risk value more accurately reflects the actual risk level. The calibration process adjusts the model output by comparing the difference between the risk value predicted by the model and the actual risk event, so that the model's prediction results are more consistent under the same risk threshold. For example, if the model tends to overestimate the risk level of certain data points, the calibration process will adjust the output probability of these data points so that their risk prediction values are more in line with the actual situation. Based on the calibrated risk value, the final risk identification result is determined by comparing it with the preset risk threshold range. The setting of the risk threshold is based on the requirements of the specific application scenario and usually represents a risk level cutoff point.For example, in financial risk identification, a credit score threshold can be set, and customers below this threshold are identified as high-risk customers and need to take further risk control measures. Through this threshold comparison method, the model can convert continuous risk values into specific risk levels (such as "low risk", "medium risk", "high risk"), thereby providing a direct basis for decision-making.
[0049] Embodiment 2: In step 1, for the collected target sample data set, first calculate the mean μ, standard deviation σ, median median(X), median absolute deviation MAD(X) and interquartile range IQR(X) of the target sample data set, and then preprocess the target sample data set using the following formula to obtain the preprocessed data set X processed :
[0050]
[0051] Where N is the number of original data points in the target sample data set X; i is a positive integer subscript index.
[0052] Specifically, before the target sample data set is preprocessed, embodiment 2 emphasizes the comprehensive statistical analysis of the data set, which includes calculating the mean, standard deviation, median, median absolute deviation and interquartile range of the data set. These statistics describe the distribution of the data from different angles and provide necessary references for subsequent preprocessing steps. As traditional descriptive statistics, the mean and standard deviation can reflect the central tendency and dispersion of the data, but when there are outliers in the data set, the mean and standard deviation are often affected by these extreme values, resulting in a distorted description of the data distribution. In order to make up for this deficiency, the present invention introduces the median and median absolute deviation as auxiliary statistics. As a representative of the central tendency of the data set, the median is not affected by outliers, so when there are more extreme values in the data set, a more robust central tendency measurement can be provided. The median absolute deviation further strengthens the description of the discreteness of the data, and unlike the standard deviation, it is also not significantly affected by outliers, so that the actual distribution of the data can be more accurately reflected. The interquartile range provides information on the range of data distribution, especially in the case of asymmetric data distribution, the interquartile range can effectively reflect the dispersion of the data. After obtaining these statistics, the present invention preprocesses the target sample data set through a comprehensive formula. The core idea of preprocessing is to standardize the data, and use exponential smoothing technology to reduce the influence of noise and outliers in the data, and finally adjust the data to a suitable scale range to enhance the comparability and representativeness of the data. Standardization is to subtract the mean from each data point and divide it by the standard deviation so that the data is centered on zero and has a unified dimension. This step ensures that different features have the same weight and influence in subsequent model training, and will not dominate the model training process because of the large original scale of some features. However, standardization alone is not enough to completely eliminate the influence of noise and outliers in the data on model training. Therefore, the present invention further introduces exponential smoothing based on median and median absolute deviation. The key to this process is to use an exponential function to smooth the standardized data, which is similar to the processing method of Gaussian distribution, but it is based on the median and median absolute deviation, so as to better adapt to the actual distribution of data. Through exponential smoothing, the extreme values in the data are suppressed, so that the distribution of the data is closer to the ideal normal distribution, thereby reducing the interference of outliers on model training. In addition, in order to further adjust the scale range of the data, the present invention uses the interquartile range to scale the preprocessed data. The purpose of this step is to ensure that the distribution of the data is within a reasonable range, so that the subsequent decision tree model can more easily capture the key patterns in the data. The interquartile range is a measure of the data distribution range. By scaling the preprocessed data, it can effectively prevent the data from being overly discrete or overly concentrated in model training, thereby improving the generalization ability and prediction accuracy of the model.It is worth noting that through this comprehensive preprocessing method, the present invention can not only improve the standardization of data, but also enhance the representativeness and robustness of data by reducing the impact of noise and outliers. This preprocessing method is particularly suitable for fields with extremely high data quality requirements such as financial risk identification. In this scenario, the reliability of data directly affects the prediction effect of the model and the accuracy of risk assessment.
[0053] Embodiment 3: In step 1, the processed data set is subjected to nonlinear feature transformation and enhancement by the following formula to obtain an enhanced data set F enhanced :
[0054]
[0055] Where arcsinh is the inverse hyperbolic sine function; IQR(X processed ) is the interquartile range of the preprocessed data; Kurt(X processed ) is the kurtosis of the preprocessed data; erf is the error function; is the mean value of the preprocessed data; is the standard deviation of the preprocessed data; Skew(X processed ) is the skewness of the preprocessed data; MAD(X processed ) is the median absolute deviation of the preprocessed data; the enhanced dataset F enhanced It includes the same number of features as in the preprocessed dataset, and the i-th feature is F i .
[0056] Specifically, in the construction of the formula, the inverse hyperbolic sine function arcsinh is introduced, which is a commonly used nonlinear transformation tool. Unlike the traditional logarithmic transformation, arcsinh can not only process negative values in the data, but also has a better smoothing effect when the data value is close to zero. This feature makes the arcsinh transformation particularly effective in processing extreme values and asymmetric distribution data. In the present invention, by preprocessing the data X processed Arcsinh transformation can effectively compress extreme values in the data and reduce the interference of outliers on model training, thereby improving the robustness and generalization ability of the model. Next, the formula also introduces the interquartile range (IQR) of the preprocessed data (X processed ) as a scaling factor. The interquartile range is an important statistic for measuring the distribution range of data, which can effectively reflect the concentration and dispersion of data. In the present invention, IQR(X processed) is introduced to further adjust the scale of the data so that the data has a consistent range and unit between different features, thereby eliminating the dimensional differences that may exist between features. Through this scaling process, the overall distribution of the data is standardized, which provides a more balanced feature input for the subsequent decision tree model and avoids the model bias caused by inconsistent scales between features. In addition, the enhanced formula also includes the kurtosis Kurt (X processed ). Kurtosis is a statistic that measures the sharpness of data distribution. High kurtosis means that the data distribution has a sharp peak, while low kurtosis means that the data distribution is relatively flat. By exponentially transforming the kurtosis, the formula can amplify the impact of sharp peaks in the data, making these features more prominent in subsequent model training. This processing method can enhance the model's sensitivity to data distribution characteristics. Especially in risk identification, extreme behaviors or abnormal patterns in the data are often associated with high-risk events. Therefore, enhancing the kurtosis can help the model better identify these risk characteristics. The error function erf in the formula is a function commonly used in the field of probability and statistics, which can map data changes to a smooth probability space. The purpose of introducing the erf function is to further smooth the distribution of data so that the data can better reflect its inherent probability structure after various transformations. This is particularly important for processing financial data with noise and uncertainty. Through this smoothing process, the enhanced data set can more accurately express the probability characteristics in the data, thereby improving the prediction accuracy of the model. In order to further enhance the symmetry and stability of the data, the formula also combines the skewness Skew (X processed ) and median absolute deviation MAD(X processed ). Skewness is a statistic that measures the degree of skewness of data distribution. By processing skewness, the formula can correct the possible asymmetry in the data and make the data distribution closer to the normal distribution. The median absolute deviation provides another means of measuring the degree of data dispersion. It is not affected by extreme values and can more robustly describe the central tendency and dispersion of the data. By combining these two statistics, the formula not only enhances the symmetry of the data, but also improves the robustness of the data to extreme values, so that the model can learn more stably during the training process.
[0057] Example 4: In step 2, the dynamic feature importance of the enhanced data set is calculated by the following formula to obtain the feature importance score I(F i ):
[0058]
[0059] Among them, H(Y) is the entropy of the target variable, H(Y|F i ) is a given feature F iConditional entropy under conditions, Var(F i ) is the feature F i The variance of Corr(F i ,Y) is the feature F i The correlation coefficient with the target variable Y; the feature importance scores of all features are combined into the feature importance score I.
[0060] Specifically, first, the calculation of feature importance score is based on the concept of information gain, which is a key indicator to measure the contribution of features to the target variable. The basis of information gain is entropy, which is a concept used to quantify uncertainty. It describes the degree of confusion of the target variable when there is no feature information. By calculating the entropy H(Y) of the target variable and comparing it with a given feature F i Entropy H(Y|F i ), we can get the information gain, which means that after introducing feature F i After the information gain is calculated, the uncertainty of the target variable is reduced by how much. If a feature can significantly reduce the entropy of the target variable, it means that the feature is very valuable for predicting the target variable. However, evaluating the importance of a feature based solely on information gain may not be comprehensive enough. In order to reasonably normalize the information gain, the present invention introduces the variance Var(F i ). Variance is a measure of the range of feature distribution, which reflects the degree of discreteness of feature values. When standardizing information gain, the square root of the variance is used to adjust it to ensure that the importance score of the feature will not be biased due to the absolute scale or distribution range of the feature. Through this normalization process, the importance score of the feature can more fairly reflect the predictive ability of the feature itself, rather than being dominated by the dimension of the feature. This processing method is particularly suitable for processing feature data of multiple scales and dimensions, thereby enhancing the generalization ability of the model. In order to further optimize the importance score of the feature, the formula of the present invention also introduces the feature F i The correlation between the feature and the target variable Y. The correlation reflects the linear relationship between the feature and the target variable, which is calculated by calculating the feature F i Correlation coefficient with target variable Y Corr(F i ,Y), can measure the linear contribution of the feature in predicting the target variable. However, in order to avoid the model bias caused by the high correlation of a certain feature, the formula also considers the correlation between other features and the target variable, and Corr(F i,Y) is compared with the correlation of all other features. This relative correlation method can make the feature importance score more accurately reflect the uniqueness and contribution of the feature in the entire feature space, rather than just its simple linear relationship with the target variable. In addition, an adjustment factor related to the range of feature values is included in the formula. This factor further enhances the feature importance score by comparing the maximum and minimum values of the feature values and combining their standard deviations. The purpose of this adjustment is to ensure that when calculating feature importance, not only the direct impact of the feature on the target variable is considered, but also the distribution characteristics of the feature itself and its representativeness in the feature space. For example, if a feature has a wide range of values and a small standard deviation, it may have a stable and significant impact on the target variable in different situations, which makes the role of this feature in the model more important.
[0061] Example 5: In step 2, the threshold T for feature selection is dynamically determined based on the feature importance score using the following formula: select :
[0062]
[0063] Among them, μ I and σ I are the mean and standard deviation of the feature importance score I, erf is the error function, kurtosis(I) is the kurtosis of the feature importance score I, and entropy(F enμanced ) is the entropy of the enhanced feature.
[0064] Specifically, the formula is constructed based on the mean μ of the feature importance score I and standard deviation σ I , which is to capture the overall distribution of feature importance scores. The mean μ I Provides the central tendency of the feature importance score, standard deviation σ IIt reflects the degree of dispersion of these scores. By combining the mean and standard deviation, the formula can preliminarily determine a basic feature selection criterion. However, relying solely on the mean and standard deviation is not enough to cope with the complex changes in the data. Therefore, the formula further introduces the error function erf and kurtosis (I) for adjustment and optimization. The error function erf is a function widely used in probability theory and statistics to quantify the uncertainty in data distribution. In the present invention, the error function is combined with the kurtosis of the feature importance score to make nonlinear adjustments to the impact of the standard deviation. Kurtosis (I) measures the sharpness of the distribution of feature importance scores and describes whether the peak of the distribution is sharp or flat. By combining kurtosis with the error function, the formula can dynamically adjust the threshold so that when the feature importance score distribution is sharp (that is, there are a few extremely important features), the feature selection threshold is more stringent to ensure that only the most important features are selected; when the score distribution is relatively flat, the threshold is moderately relaxed to allow more features to participate in model training. This adjustment mechanism ensures the flexibility and adaptability of the model when dealing with different data distributions. In addition, the formula also introduces the entropy of the enhanced feature (F enhanced ) as an adjustment factor. Entropy is a basic concept in information theory, which is used to quantify the uncertainty and amount of information in the data. In the process of feature selection, the introduction of entropy helps to evaluate the overall information content of the enhanced data set, thereby further optimizing the feature selection threshold. When the entropy of the enhanced data set is high, it means that the amount of information in the data is rich and the distribution is complex. At this time, the formula allows more features to enter the model by increasing the feature selection threshold to make full use of the information resources in the data; conversely, when the entropy is low, the amount of information in the data is relatively limited. At this time, the formula will lower the feature selection threshold and eliminate those features that may increase the complexity of the model but do not contribute much to prevent the model from overfitting. This entropy-based adjustment mechanism enables the model to handle data sets with different information richness more intelligently, ensuring the stability and predictive performance of the model. At the same time, in order to avoid extreme changes in the threshold, the formula also normalizes the entropy by adjusting the entropy, using a logarithmic function with a base of 2, log 2(N), where N represents the number of samples in the data set. Through normalization, the formula can maintain the relative consistency of feature selection under different sample sizes, avoiding excessive fluctuations in the threshold value caused by changes in the number of samples. This normalization measure is particularly important in practical applications, especially when dealing with data sets of different sizes, and can effectively ensure the stability of the feature selection standard. Overall, the formula in Example 5 constructs a dynamically adjusted feature selection threshold model by combining the mean, standard deviation, error function, kurtosis and entropy of the feature importance score. The model can automatically adjust the feature selection standard according to the feature distribution, information content and sample size of the data set adaptively. The introduction of this dynamic adjustment mechanism greatly improves the adaptability and prediction accuracy of the present invention in different data environments. In actual risk identification applications, this flexible feature selection method can not only improve the efficiency of the model, but also reduce the interference of noise features on the model, thereby enhancing the robustness and accuracy of the model.
[0065] Embodiment 6: In step 3, after generating multiple decision trees, the process of defining the node splitting criteria in the decision tree generation process according to the feature selection threshold specifically includes: for each node of the decision tree, calculating the depth depth of the current node and the number of features of the current node |S|; for each possible split feature F i , get the importance score of the feature I(F i ), calculate the entropy H(Y) of the target variable; for each possible segmentation point of the feature, calculate the number of features of the left child node and the right child node after segmentation |S L | and |S R |; Calculate F i The maximum and minimum values at the current node; calculate the split point value and T select The distance between nodes is calculated by using the preset column splitting standard calculation model to obtain the splitting standard Split of the i-th node. criterion,i ; Select Split criterion,i The largest feature and split point are taken as the best split; child nodes are created based on the best split and the process is repeated for the child nodes until the maximum depth is reached.
[0066] Specifically, first, the depth of each decision tree node and the number of features |S| contained in the current node are calculated. The depth of the node reflects the hierarchical position of the current node in the decision tree, while the number of features indicates the size of the set of data features that can be used for splitting the node. By calculating these parameters, the model can dynamically adjust the splitting strategy so that nodes with shallower depths focus on distinguishing global features, while nodes with deeper depths focus on more fine-grained local features. For each possible split feature F i , get its feature importance score I(Fi ) is a key step. The feature importance score reflects the predicted contribution of the feature to the target variable Y during the current node splitting process. In order to further determine the optimal splitting point, Example 6 requires the calculation of the entropy H(Y) of the target variable, which is an important indicator for measuring the uncertainty of the target variable. In the decision tree construction process, the reduction of entropy (information gain) is used to evaluate the pros and cons of the splitting features. Therefore, selecting the feature that can maximize the information gain as the splitting point is an important means to improve the model classification performance.
[0067] When calculating possible split points, it is necessary to calculate the number of features of the left child node and the right child node after the split |S L | and |S R |. The purpose of this process is to ensure that the child nodes after the split still contain enough feature data for further decision-making, which is particularly important for maintaining the robustness of the model and avoiding overfitting. The selection of the split point is based on the range between the maximum and minimum values of the feature at the current node. This method enables the model to explore the best split point in the entire value range of the feature to obtain the best classification result. In addition, the split point value is closely related to the feature selection threshold T select The distance is also calculated. The purpose of this step is to measure the effectiveness of the split point and ensure that the selected split point can significantly improve the purity of the node. Feature selection threshold T select It is dynamically determined based on the feature importance score, which reflects the importance level of the most contributing feature in the current node split. select The model can further optimize the splitting criteria to ensure that the best decision is made at each splitting point. Then, the preset splitting criteria calculation model is used to evaluate each possible splitting point and calculate the splitting criteria for each node. criterion The choice of splitting criteria is usually based on metrics such as information gain, Gini index or entropy reduction, aiming to maximize the purity of each node or minimize the uncertainty of the node. criterion The largest feature and split point are used as the best split. This approach ensures that the child nodes generated after each split have the highest degree of homogeneity in the target variable, thereby improving the prediction accuracy of the model. Once the best splitting feature and splitting point are determined, the model will create child nodes based on these selections and repeat the splitting process for each child node. In this recursive way, the model gradually builds a complete decision tree until it reaches the preset maximum depth. The maximum depth is set to prevent the decision tree from overgrowing and avoid overfitting the model to the training data. By controlling the node depth, the model can strike a balance between complexity and generalization ability, ensuring that its performance on training data and test data is consistent.
[0068] Embodiment 7: The preset classification standard calculation model is expressed by the following formula:
[0069]
[0070] Specifically,
[0071] Example 8: In step 4, multiple split decision trees are combined into an integrated model F by the following formula: ensemble :
[0072]
[0073] Where M is the number of decision trees, w i is the preset weight of the ith decision tree, T i is the output of the ith decision tree, OOB i is the out-of-bag error rate of the ith decision tree, L tree,i is the structural complexity of the i-th decision tree; L tree is the loss function of the decision tree.
[0074] Specifically, the core part of the splitting criterion formula involves the feature importance score I(F i ) and the entropy of the target variable H(Y). The feature importance score I(F i ) measures the feature F i The prediction contribution of the current node to the target variable Y. i ) is normalized with the entropy of the target variable H(Y). The formula ensures that the feature selection process not only focuses on the predictive power of the feature itself, but also takes into account the overall uncertainty of the target variable. This normalization helps avoid model bias due to over-reliance on a certain feature in high entropy situations, ensuring the diversity and robustness of feature selection. Next, the formula introduces the ratio of the number of sub-node features after splitting As a penalty term, it represents the ratio of the number of features on the smaller side of the child node after the split to the total number of features of the current node. The introduction of this ratio aims to balance the feature distribution of the child nodes after the split and avoid overly unbalanced splits. By maximizing the number of features of the child nodes, the model can ensure that each node after the split has enough features for further splitting and decision-making, thereby improving the robustness and generalization ability of the decision tree. If the split results in a very small number of features on one side of the child node, the split criterion will be subject to a large penalty, thereby reducing the probability of selecting such a split. In addition, the formula contains an exponential decay factor related to the node depth The depth of a node is the hierarchical position of a node in the decision tree during its generation process. As the depth increases, the decision tree tends to overfit the training data, resulting in a decrease in generalization ability. Through the exponential decay factor, the formula penalizes the split of nodes with greater depth, reducing their split probability. This penalty mechanism helps control the complexity of the decision tree and prevents the model from being too complex to generalize to new data. The denominator in the exponential decay factor is log 2 (|S|) reflects the impact of the number of features on the depth penalty. This treatment can balance the relationship between node depth and number of features, ensuring that the splitting criterion neither over-punishes nor allows the node to grow infinitely in depth. The last part of the formula introduces a feature selection threshold T. select Distance-dependent adjustment factor This adjustment factor quantifies the relative position of the current feature in the feature space by calculating the relative distance between the feature value and the selection threshold. This factor is intended to give priority to features that are close to the selection threshold, so that the split nodes are closer to the optimal classification state. Feature selection threshold T select It is dynamically determined based on feature importance, which reflects the most predictive feature level in the current node. Therefore, the feature value is related to T select The relative distance can effectively distinguish which features are more conducive to the splitting of the current node, thereby optimizing the decision-making process.
[0075] Example 9: Loss function L of decision tree tree It is expressed by the following formula:
[0076]
[0077] Among them, S t is the number of features of the tth node; H(Y t ) is the entropy of the target variable of the tth node; |leaves| is the number of leaf nodes; Split criterion,t is the splitting criterion of node t; |used(F i )| is feature F i The number of times it is used in the decision tree; |total(F i )| is feature F i The total number of times available.
[0078] Specifically, in Example 9 of the risk identification method based on the decision tree algorithm of the present invention, the loss function L of the decision tree tree It is designed as a measure of each feature F i The ratio of the frequency of use in the decision tree construction process. The design intention of this loss function is to optimize the feature selection process of the model and improve the prediction performance and generalization ability of the model by evaluating the relative frequency of features used in the decision tree.
[0079] First, here, |used(F i )| represents feature F i The number of times it is actually used in the decision tree, and
[0080] |total(F i )| is feature F i The total number of times that a feature can be used when building a decision tree. Through this ratio calculation, the loss function can reflect the relationship between the actual frequency of use of each feature in the decision tree generation process and its theoretical possible frequency of use. This measurement method is crucial for understanding and optimizing the construction process of decision tree models, because it can reveal which features have higher actual importance and contribution in the model. i When frequently used in a decision tree, |used(F i )| is high, the corresponding loss function value will also be high, which means that the feature plays an important role in the model. Therefore, the model may tend to continue to select and use these features in future decision-making processes. This bias is intentional because in the process of decision tree construction, frequently used features are often those that are most effective in reducing uncertainty (i.e., reducing entropy). Through this design, the loss function of the present invention can dynamically adapt to changes in data and enhance the rationality and efficiency of the feature selection process. On the other hand, if the feature F i of|used(F i )| and|total(F i)| is low, which means that the feature is not frequently used during the construction process. The reason may be that the feature does not contribute much to the prediction of the target variable, or it does not have discriminative power at some nodes under the current tree structure. Therefore, the loss function can help the model reduce its dependence on these features in future split decisions and concentrate more computing resources on more predictive features. In addition, this design of the loss function can also prevent the model from over-relying on certain features during the construction process. For high-dimensional data sets, over-reliance on certain features may cause the model to overfit, and the design of this loss function effectively balances the selection of features by controlling the frequency of feature usage, preventing the model from deviating from the global optimal feature set. In this way, the present invention can maintain the robustness and generalization ability of the model in a complex and changeable risk data environment. By analyzing the loss function of the frequency of feature usage, the present invention can also provide a feedback mechanism for the model to identify and optimize potential deviations in the model construction process. For example, if the frequency of use of certain features is much higher than that of other features, and these features do not significantly improve the overall performance of the model, then this may mean that the model is at risk of overfitting on these features. By observing the changing trend of the loss function, the model can dynamically adjust the feature selection strategy to avoid over-reliance on a few features.
[0081] Example 10: Input the target sample data set into the integrated model and obtain the output result R through the following formula: score :
[0082]
[0083] Among them, μ F F ensemble The mean of F F ensemble The standard deviation of erf -1 is the inverse function of the error function; is the average value of the i-th feature; max(F i ) and min(F i ) are the maximum and minimum values of the i-th feature respectively; Corr(F i ,Y) is the correlation coefficient between the i-th feature and the target variable Y;
[0084] max(|Corr(F,Y)|) is the maximum absolute value of the correlation coefficient between all features and the target variable; if R score >1, it is considered high risk; if 0.5 <R score ≤1, it is considered as medium risk; if R score ≤0.5, it is judged as low risk.
[0085] Specifically, the first part of the formula uses an improved Logistic function to calculate the initial risk score. The Logistic function is a commonly used activation function that can map any real number to between 0 and 1, which is very useful in probability estimation. Here, F ensemble is the output of the integrated model, which represents the weighted combination of multiple split decision trees. ensemble The standardized value of (F ensemble -μ F ) / σ F , which can eliminate the scale effect of the data and make the results of different data sets comparable. The standardized results are further multiplied by and the inverse function of the error function erf -1 This process can map the standardized results to a nonlinear space, thereby enhancing the model's ability to respond to extreme values and ensuring that the model can better capture high-risk samples. The following section further adjusts the risk score by adjusting it by the ratio of the sum of absolute deviations with a weight to the feature range. i ) is used to weigh the contribution of each feature to risk prediction. Here, the formula is calculated by calculating each feature F i With its mean The absolute deviation of the feature range (max(F i )-min(F i )) to capture the degree of deviation of the sample in the feature space. The greater the deviation, the greater the difference between the performance of the sample in these important features and the normal level, and thus the higher the risk. In this way, the formula can dynamically adjust the risk score R score , so that the model can more accurately reflect the true risk level of the sample. In addition, the formula also introduces a feature selection threshold T select and the correlation between the feature and the target variable Corr(F i ,Y)-related exponential factor. The design of this factor takes into account the importance and relevance of feature selection. Specifically, by scoring the importance of each feature I(F i ) divided by the feature selection threshold T select, and multiplied by the absolute value of the correlation coefficient between the feature and the target variable, the formula can effectively increase the weights of those features that have a high correlation with the target variable and are considered important. The use of exponential factors further amplifies the influence of these features in the risk score, thereby improving the sensitivity and accuracy of the model. The last part of the formula combines the sum of the weighted absolute deviations of the features to further optimize the calculation of the risk score. This sum of weighted absolute deviations is an overall assessment of the performance of the sample on all features. By accumulating the deviations of all features, the formula can more comprehensively consider the overall feature performance of the sample. This comprehensive consideration helps the model avoid relying too much on the abnormal performance of a single feature, but instead makes risk assessments based on the joint effect of all important features. The advantage of this approach is that the model can more robustly cope with the diversity and complexity of the data and improve the ability to distinguish different types of samples. Finally, according to the calculated risk score R score , the present invention divides it into three risk levels: high risk (R score >1), medium risk (0.5 <R score ≤1) and low risk (R score ≤0.5). This risk classification method is intuitive and practical, and can provide clear guidance for risk management. High-risk samples usually require immediate action for risk control, while medium-risk samples may require further monitoring and evaluation, and low-risk samples may not require special attention.
[0086] The present invention is described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A risk identification method based on decision tree algorithm, It is characterized in that It includes: Step 1: Obtain a target sample data set, wherein the target sample data set includes multiple original data points; preprocess the target sample data set to make features of different scales comparable, thereby obtaining a preprocessed data set, wherein the preprocessed data set includes multiple features, each feature corresponding to an original data point; perform nonlinear feature transformation and enhancement on the processed data set to obtain an enhanced data set; the enhanced data set includes the same number of features as the preprocessed data set; Step 2: Determine the target variable for risk identification, calculate the dynamic feature importance of the enhanced data set, and obtain the feature importance score; based on the feature importance score, dynamically determine the threshold for feature selection; Step 3: Generate a decision tree for the enhanced data set. In each node of the decision tree, include the features in multiple enhanced data sets. According to the threshold of feature selection, define the node splitting criterion in the decision tree generation process, split the decision tree, and obtain multiple split decision trees. Step 4: Combine multiple split decision trees into an integrated model; calculate the output result based on the integrated model, the target sample data set and the enhanced data set, wherein the output result is a risk value; calibrate the output result, and compare the calibrated output result with the preset threshold range to obtain the risk identification result.
2. The risk identification method based on the decision tree algorithm according to claim 1, It is characterized in that In step 1, for the collected target sample data set, first calculate the mean μ, standard deviation σ, median median(X), median absolute deviation MAD(X) and interquartile range IQR(X) of the target sample data set, and then preprocess the target sample data set using the following formula to obtain the preprocessed data set X processed : Where N is the number of original data points in the target sample data set X; i is a positive integer subscript index.
3. The risk identification method based on the decision tree algorithm as claimed in claim 2, It is characterized in that In step 1, the processed data set is transformed and enhanced by nonlinear features using the following formula to obtain the enhanced data set F enhanced : Where arcsinh is the inverse hyperbolic sine function; IQR(X processed ) is the interquartile range of the preprocessed data; Kurt(X processed ) is the kurtosis of the preprocessed data; erf is the error function; μ Xprocessed is the mean value of the preprocessed data; σ Xprocessed is the standard deviation of the preprocessed data; Skew(X processed ) is the skewness of the preprocessed data; MAD(X processed ) is the median absolute deviation of the preprocessed data; the enhanced dataset F enhanced It includes the same number of features as in the preprocessed dataset, and the i-th feature is F i .
4. The risk identification method based on the decision tree algorithm as claimed in claim 3, It is characterized in that In step 2, the dynamic feature importance of the enhanced data set is calculated by the following formula to obtain the feature importance score I(F i ): Among them, H(Y) is the entropy of the target variable, H(Y|F i ) is a given feature F i Conditional entropy under conditions, Var(F i ) is the feature F i The variance of Corr(F i ,Y) is the feature F i The correlation coefficient with the target variable Y; the feature importance scores of all features are combined into the feature importance score I.
5. The risk identification method based on the decision tree algorithm as claimed in claim 4, It is characterized in that In step 2, the feature selection threshold T is dynamically determined based on the feature importance score using the following formula: select : Among them, μ I and σ I are the mean and standard deviation of the feature importance score I, erf is the error function, kurtosis(I) is the kurtosis of the feature importance score I, and entropy(F enhanced ) is the entropy of the enhanced feature.
6. The risk identification method based on the decision tree algorithm as claimed in claim 5, It is characterized in that In step 3, after generating multiple decision trees, the process of defining the node splitting criteria in the decision tree generation process according to the feature selection threshold specifically includes: for each node of the decision tree, calculating the depth depth of the current node and the number of features of the current node |S|; for each possible split feature F i , get the importance score of the feature I(F i ), calculate the entropy H(Y) of the target variable; for each possible segmentation point of the feature, calculate the number of features of the left child node and the right child node after segmentation |S L | and |S R |; Calculate F i The maximum and minimum values at the current node; calculate the split point value and T select The distance between nodes is calculated by using the preset column splitting standard calculation model to obtain the splitting standard Split of the i-th node. criterion,i ; Select Split criterion,i The largest feature and split point are taken as the best split; child nodes are created based on the best split and the process is repeated for the child nodes until the maximum depth is reached.
7. The risk identification method based on the decision tree algorithm as claimed in claim 6, It is characterized in that The preset column standard calculation model is expressed by the following formula:
8. The risk identification method based on the decision tree algorithm as claimed in claim 7, It is characterized in that In step 4, multiple split decision trees are combined into an integrated model F through the following formula: ensemble : Where M is the number of decision trees, w i is the preset weight of the ith decision tree, T i is the output of the ith decision tree, OOB i is the out-of-bag error rate of the ith decision tree, L tree,i is the structural complexity of the i-th decision tree; L tree is the loss function of the decision tree.
9. The risk identification method based on the decision tree algorithm as claimed in claim 8, It is characterized in that The loss function L of the decision tree tree It is expressed by the following formula: Among them, S t is the number of features of the tth node; H(Y t ) is the entropy of the target variable of the tth node; |leaves| is the number of leaf nodes; Split criterion,t is the splitting criterion of node t; |used(F i )| is feature F i The number of times it is used in the decision tree; |total(F i )| is feature F i The total number of times available.
10. The risk identification method based on decision tree algorithm as claimed in claim 8, It is characterized in that Input the target sample data set into the integrated model and obtain the output result R through the following formula: score : Among them, μ F F ensemble The mean of F F ensemble The standard deviation of erf -1 is the inverse function of the error function; μ Fi is the average value of the i-th feature; max(F i ) and min(F i ) are the maximum and minimum values of the i-th feature respectively; Corr(F i ,Y) is the correlation coefficient between the i-th feature and the target variable Y; max(|Corr(F,Y)|) is the maximum absolute value of the correlation coefficient between all features and the target variable; if R score >1, it is considered high risk; if 0.5 <R score ≤1, it is considered as medium risk; if R score ≤0.5, it is judged as low risk.
Citation Information
Cited By
Temperature monitoring system and temperature monitoring method of water jacket heater
CN119538165A
Computer data interaction management system based on big data
CN119558664A
Real-time account checking method and system based on rule engine
CN119904324A
Intelligent identification and analysis method and system for data release risk
CN121881161A
Clinical data analysis-based tumor prognosis evaluation method and system
CN122158144A
