Agricultural machinery lease pre-loan risk control method and system, electronic equipment and storage medium
The pre-loan risk control method for agricultural machinery leasing, which is based on decision tree pruning optimization and confusion matrix verification, solves the problems of overfitting and insufficient feature engineering in traditional models, achieves high-accuracy and stable bad customer identification, and enhances the interpretability and applicability of risk control strategies.
Patent Information
- Application Number
- CN202510674040.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-05-23
AI Technical Summary
Among the existing pre-loan risk control methods for agricultural machinery leasing, traditional risk assessment models are unable to capture the nonlinear relationships of complex credit data, resulting in low classification accuracy and weak generalization ability. Decision tree models are prone to overfitting and have poor rule interpretability. Feature engineering processing is not refined enough and cannot effectively mine risk-related characteristics.
A classification model is constructed using a decision tree algorithm combined with pruning optimization. Feature engineering is used to generate a feature set that meets the preset risk control modeling requirements. The confusion matrix is used to verify the generalization performance of the model, and high-discrimination rules are screened through the ratio of rule hits to bad customers to form a target risk control strategy set.
It improves the accuracy and stability of bad customer identification, enhances the interpretability of rules and business adaptability, provides reliable decision-making support, and ensures the accuracy and stability of risk control strategies.
Smart Images

Figure CN120765366A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of pre-loan risk control technology, and in particular to a pre-loan risk control method, system, electronic device and storage medium for agricultural machinery leasing. Background Art
[0002] In the field of pre-loan risk control for agricultural machinery leasing, existing technologies typically use traditional risk assessment models (such as logistic regression). These models are insufficiently capable of capturing the nonlinear relationships in complex credit data, resulting in low classification accuracy and weak generalization. Furthermore, traditional decision tree models, lacking pruning optimization, are prone to overfitting and lack stability. The generated rules are poorly interpretable, making them difficult to directly adapt to actual business needs. Furthermore, existing methods lack sufficient refinement in data processing during the feature engineering phase, resulting in limited quality of the input feature set and an inability to effectively mine risk-related features. These issues make it difficult to ensure the accuracy and effectiveness of risk control strategies.
[0003] Therefore, it is urgent to provide a technical solution to solve the above problems. Summary of the Invention
[0004] In order to solve the above technical problems, the present invention provides a pre-loan risk control method, system, electronic device and storage medium for agricultural machinery leasing.
[0005] In a first aspect, the present invention provides a pre-loan risk control method for agricultural machinery leasing, the technical solution of which is as follows:
[0006] Perform feature engineering on the target user's credit-related data to generate a feature set that meets the preset risk control modeling requirements, and divide the feature set into a training set and a test set;
[0007] Based on the training set, an initial classification model is constructed using a decision tree algorithm. The complexity of the initial classification model is controlled through pruning optimization to obtain a target classification model. The classification rules of each leaf node in the target classification model are extracted to form an initial risk control strategy set.
[0008] Based on the test set and the target classification model, a confusion matrix is used to calculate a performance indicator representing the generalization ability of the target classification model;
[0009] According to the initial risk control strategy set, the ratio of the bad customer rate of each classification rule in the training set and the test set to the overall bad customer rate is respectively calculated, and combined with the performance indicators, the classification rules that meet the preset conditions are screened as the target risk control strategy set for the target user.
[0010] The beneficial effects of the pre-loan risk control method for agricultural machinery leasing of the present invention are as follows:
[0011] The method of the present invention adopts a decision tree combined with pruning optimization to construct a classification model to avoid overfitting, uses a confusion matrix to verify the generalization performance of the model, and screens high-discrimination rules through the ratio of rule hit bad customer rates, thereby improving the accuracy and stability of bad customer identification, enhancing the interpretability of rules and business adaptability, and providing reliable decision support.
[0012] Based on the above scheme, the pre-loan risk control method for agricultural machinery leasing of the present invention can also be improved as follows.
[0013] In an optional method, the steps of performing feature engineering on the target user's credit-related data to generate a feature set that meets the preset risk control modeling requirements include:
[0014] Based on the credit-related data, generating a plurality of derived variables through feature derivation;
[0015] Discretize each derived variable into multiple groups to obtain binning results, and perform monotonicity verification on the binning results to obtain verification results; wherein the binning results are the set of bins for each derived variable; each derived variable is independently binned to generate multiple groups; each group corresponds to a feature variable;
[0016] Based on the binning results and the verification results, screening the feature variables in the binning results that meet the preset risk control modeling requirements to generate the feature set; the screening process includes: data quality screening, business logic screening, and statistical validity screening;
[0017] The data quality screening includes:
[0018] Based on the missing rate of each feature variable in the binning result, the feature variables whose missing rate is greater than a preset missing rate threshold are eliminated;
[0019] Based on the number of groups of each characteristic variable in the binning result, eliminating the characteristic variables with the same number of groups as one;
[0020] The business logic screening includes:
[0021] Eliminate, based on the risk trend of each characteristic variable in the verification result, characteristic variables whose risk trends are inconsistent with business logic;
[0022] The statistical validity screening includes:
[0023] Based on the information value of each feature variable in the binning result, eliminating feature variables whose information value is less than a preset information value threshold;
[0024] Based on the correlation coefficients between different feature variables in the binning results, determine the variable pairs whose correlation coefficients are greater than a preset correlation coefficient threshold, and retain the feature variable with the highest information value in each variable pair, and eliminate the remaining feature variables;
[0025] Based on the variance inflation factor of each feature variable in the binning results, a collinear variable group whose variance inflation factor is greater than a preset threshold is determined, and all feature variables in the collinear variable group except the feature variable with the highest information value are eliminated.
[0026] In this optional approach, the generation of multidimensional derivative variables through feature derivation combined with binning, discretization, and screening effectively eliminates low-quality and redundant feature variables, improving the interpretability and risk differentiation capabilities of the feature set. The multiple high-information feature variables retained after screening significantly enhance the model input quality, addressing the model bias issues often associated with redundant or logically inconsistent feature variables in traditional approaches and providing a more robust data foundation for the subsequent construction of classification models.
[0027] In an optional manner, based on the training set, an initial classification model is constructed using a decision tree algorithm, the complexity of the initial classification model is controlled through pruning optimization to obtain a target classification model, and the classification rules of each leaf node in the target classification model are extracted to form an initial risk control strategy set, including the following steps:
[0028] Based on the training set, a decision tree is constructed using the CART algorithm to generate the initial classification model; the CART algorithm uses the Gini coefficient as a splitting rule and selects the feature variable with the smallest Gini coefficient for node splitting; the initial classification model includes a root node, internal nodes, and leaf nodes;
[0029] When the current information entropy of the node after splitting is less than the preset information entropy threshold, stop the node splitting and use the current node as the leaf node;
[0030] Performing a merge verification on each child node having the same parent node in the initial classification model to form the target classification model; the merge verification includes:
[0031] Calculate the entropy increase before and after the merger respectively; when the entropy increase is less than or equal to a preset entropy increase threshold, treat each child node after the merger as a single leaf node; when the entropy increase is greater than the preset entropy increase threshold, retain each child node with the same parent node and maintain the original branch structure;
[0032] Based on each leaf node of the target classification model, all classification rules are extracted to form the initial risk control strategy set.
[0033] In the above optional method, the CART algorithm is used with the Gini coefficient as the splitting rule, combined with the information entropy threshold to control the pre-pruning operation of node splitting, and the post-pruning operation to merge redundant branches according to the entropy increase threshold. This accurately balances the complexity and generalization ability of the classification model, avoids the overfitting problem of traditional decision trees, and at the same time improves the interpretability of the classification rules, ensuring the stability of the classification model in actual scenarios.
[0034] In an optional manner, the step of calculating a performance indicator representing the generalization ability of the target classification model using a confusion matrix based on the test set and the target classification model includes:
[0035] Based on the test set and the target classification model, a classification prediction is performed on each sample in the test set to obtain a prediction result; the prediction result is a predicted label for each sample; each sample is a plurality of credit-related data currently existing in the test set that has been processed by the feature engineering;
[0036] Determine the TP parameter, FN parameter, FP parameter, and TN parameter of the confusion matrix according to the true label and the predicted label of the test set, and construct the confusion matrix; each column of the confusion matrix represents the predicted label, and each row represents the true label;
[0037] The TP parameter is the number of customers whose true label is bad and whose predicted label is bad, the FN parameter is the number of customers whose true label is bad and whose predicted label is good, the FP parameter is the number of customers whose true label is good and whose predicted label is bad, and the TN parameter is the number of customers whose true label is good and whose predicted label is good.
[0038] The performance indicators are calculated using the confusion matrix, and the performance indicators include the precision, recall and F1 score of the target classification model.
[0039] In the above optional method, the precision, recall and F1 score are calculated based on the confusion matrix, providing a quantitative evaluation standard for the generalization ability of the classification model. The TP, FN, FP and TN parameters are used to accurately quantify the classification model's recognition effect on bad and good customers, solving the limitation of traditional evaluation methods that rely on a single indicator. It ensures that the classification model has both high precision and recall in real business, and improves the comprehensiveness and reliability of risk control decisions.
[0040] In an optional manner, according to the initial risk control strategy set, the ratio of the rule hit bad customer rate of each classification rule to the overall bad customer rate in the training set and the test set is calculated, and the performance indicators are combined to screen the classification rules meeting the preset conditions as the target risk control strategy set of the target user, comprising:
[0041] The ratio of the rule hit bad customer rate of each classification rule to the overall bad customer rate in the training set and the test set is calculated respectively to obtain the training set Lift value and the test set Lift value of each classification rule; wherein the rule hit bad customer rate is the ratio of the number of bad customers hit by each classification rule to the total number of customers hit by the rule.
[0042] All classification rules with a test set Lift value less than a preset Lift threshold value are removed to obtain a first risk control strategy set.
[0043] The Lift deviation value between the training set Lift value and the test set Lift value of each classification rule in the first risk control strategy set is calculated, and all classification rules with a Lift deviation value greater than a preset fluctuation threshold value are removed to obtain a second risk control strategy set.
[0044] According to the precision, the recall and the F1 score, all classification rules with a precision less than a preset precision threshold value, all classification rules with a recall less than a preset recall threshold value, and all classification rules with an F1 score less than a preset F1 score threshold value in the second risk control strategy set are removed respectively to obtain the target risk control strategy set of the target user.
[0045] In the above optional manner, by combining the Lift value difference between the training set and the test set and the performance indicator threshold value, classification rules with low discrimination and excessive fluctuation are removed in stages, classification rules with high stability can be screened, the generalization ability and business adaptability of the strategy set across data sets are ensured, and the overfitting or strategy failure problem caused by the dependence of traditional rule screening on a single data set is solved, providing efficient protection for risk control strategy deployment.
[0046] In a second aspect, the present application provides a farm machine rental pre-loan risk control system, and the technical scheme of the system is as follows:
[0047] The farm machine rental pre-loan risk control system comprises a preprocessing module, a model optimization module, an index calculation module and a strategy screening module.
[0048] The preprocessing module is used for performing feature engineering processing on credit-related data of a target user, generating a feature set meeting the preset risk control modeling requirements, and dividing the feature set into a training set and a test set.
[0049] The model optimization module is used to: construct an initial classification model based on the training set using a decision tree algorithm, control the complexity of the initial classification model through pruning optimization to obtain a target classification model, and extract the classification rules of each leaf node in the target classification model to form an initial risk control strategy set;
[0050] The indicator calculation module is used to calculate the performance indicator representing the generalization ability of the target classification model using a confusion matrix based on the test set and the target classification model;
[0051] The strategy screening module is used to: based on the initial risk control strategy set, the ratio of the rule hit bad customer rate of each classification rule in the training set and the test set to the overall bad customer rate, combined with the performance indicators, screen the classification rules that meet the preset conditions as the target risk control strategy set for the target user.
[0052] The beneficial effects of the pre-loan risk control system for agricultural machinery leasing of the present invention are as follows:
[0053] The system of the present invention adopts a decision tree combined with pruning optimization to construct a classification model to avoid overfitting, uses a confusion matrix to verify the generalization performance of the model, and screens high-discrimination rules through the ratio of rule hit bad customer rates, thereby improving the accuracy and stability of bad customer identification, enhancing the interpretability of rules and business adaptability, and providing reliable decision support.
[0054] Based on the above solution, the pre-loan risk control system for agricultural machinery leasing of the present invention can also be improved as follows.
[0055] In an optional manner, the preprocessing module is specifically used to:
[0056] Based on the credit-related data, generating a plurality of derived variables through feature derivation;
[0057] Discretize each derived variable into multiple groups to obtain binning results, and perform monotonicity verification on the binning results to obtain verification results; wherein the binning results are the set of bins for each derived variable; each derived variable is independently binned to generate multiple groups; each group corresponds to a feature variable;
[0058] Based on the binning results and the verification results, screening the feature variables in the binning results that meet the preset risk control modeling requirements to generate the feature set; the screening process includes: data quality screening, business logic screening, and statistical validity screening;
[0059] The data quality screening includes:
[0060] Based on the missing rate of each feature variable in the binning result, the feature variables whose missing rate is greater than a preset missing rate threshold are eliminated;
[0061] Based on the number of groups of each characteristic variable in the binning result, eliminating the characteristic variables with the same number of groups as one;
[0062] The business logic screening includes:
[0063] Eliminate, based on the risk trend of each characteristic variable in the verification result, characteristic variables whose risk trends are inconsistent with business logic;
[0064] The statistical validity screening includes:
[0065] Based on the information value of each feature variable in the binning result, eliminating feature variables whose information value is less than a preset information value threshold;
[0066] Based on the correlation coefficients between different feature variables in the binning results, determine the variable pairs whose correlation coefficients are greater than a preset correlation coefficient threshold, and retain the feature variable with the highest information value in each variable pair, and eliminate the remaining feature variables;
[0067] Based on the variance inflation factor of each feature variable in the binning results, a collinear variable group whose variance inflation factor is greater than a preset threshold is determined, and all feature variables in the collinear variable group except the feature variable with the highest information value are eliminated.
[0068] In this optional approach, the generation of multidimensional derivative variables through feature derivation combined with binning, discretization, and screening effectively eliminates low-quality and redundant feature variables, improving the interpretability and risk differentiation capabilities of the feature set. The multiple high-information feature variables retained after screening significantly enhance the model input quality, addressing the model bias issues often associated with redundant or logically inconsistent feature variables in traditional approaches and providing a more robust data foundation for the subsequent construction of classification models.
[0069] In an optional manner, the model optimization module is specifically used to:
[0070] Based on the training set, a decision tree is constructed using the CART algorithm to generate the initial classification model; the CART algorithm uses the Gini coefficient as a splitting rule and selects the feature variable with the smallest Gini coefficient for node splitting; the initial classification model includes a root node, internal nodes, and leaf nodes;
[0071] When the current information entropy of the node after splitting is less than the preset information entropy threshold, stop the node splitting and use the current node as the leaf node;
[0072] Performing a merge verification on each child node having the same parent node in the initial classification model to form the target classification model; the merge verification includes:
[0073] Calculate the entropy increase before and after the merger respectively; when the entropy increase is less than or equal to a preset entropy increase threshold, treat each child node after the merger as a single leaf node; when the entropy increase is greater than the preset entropy increase threshold, retain each child node with the same parent node and maintain the original branch structure;
[0074] Based on each leaf node of the target classification model, all classification rules are extracted to form the initial risk control strategy set.
[0075] In the above optional method, the CART algorithm is used with the Gini coefficient as the splitting rule, combined with the information entropy threshold to control the pre-pruning operation of node splitting, and the post-pruning operation to merge redundant branches according to the entropy increase threshold. This accurately balances the complexity and generalization ability of the classification model, avoids the overfitting problem of traditional decision trees, and at the same time improves the interpretability of the classification rules, ensuring the stability of the classification model in actual scenarios.
[0076] In a third aspect, the technical solution of an electronic device of the present invention is as follows:
[0077] It includes a memory, a processor, and a program stored in the memory and running on the processor. When the processor executes the program, it implements the steps of the pre-loan risk control method for agricultural machinery leasing as described in the present invention.
[0078] In a fourth aspect, the present invention provides a computer-readable storage medium having the following technical solution:
[0079] Instructions are stored in the computer-readable storage medium. When the computer-readable storage medium reads the instructions, the computer-readable storage medium executes the steps of the pre-loan risk control method for agricultural machinery leasing of the present invention.
[0080] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the drawings. In the drawings:
[0082] Figure 1 This is a flow chart of an embodiment of a pre-loan risk control method for agricultural machinery leasing according to the present invention;
[0083] Figure 2 Schematic diagram of the confusion matrix of the present invention;
[0084] Figure 3 This is a schematic diagram of the target risk control strategy set of the present invention;
[0085] Figure 4 This is a structural diagram of an embodiment of a pre-loan risk control system for agricultural machinery leasing according to the present invention;
[0086] Figure 5 The figure is a schematic structural diagram of an embodiment of an electronic device of the present invention. DETAILED DESCRIPTION
[0087] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0088] Figure 1 A flow chart showing an embodiment of a pre-loan risk control method for agricultural machinery leasing provided by the present invention is shown as follows: Figure 1 As shown, the following steps are included:
[0089] S1. Perform feature engineering on the target user's credit-related data to generate a feature set that meets the preset risk control modeling requirements, and divide the feature set into a training set and a test set. In S1:
[0090] Credit-related data refers to the original data used to assess the credit risk of target users of agricultural machinery leasing. Credit-related data obtained through compliant channels can ensure the consistency and traceability of the data source. Credit-related data specifically includes:
[0091] Customer basic data: such as age, occupation, income level, agricultural machinery usage history, etc.;
[0092] Third-party credit data: such as fraud risk scores, lending records, risk reports, credit scores, etc.;
[0093] Behavioral data: such as the number of loan applications in the past 12 months, the number of overdue platforms, the number of mobile phone number-linked ID numbers, etc.
[0094] Device and network data: such as the length of time a mobile phone number has been online, operator type, device fingerprint, etc.
[0095] Feature engineering refers to the process of systematically processing and transforming credit-related data to generate high-quality feature sets that meet the requirements of risk control modeling. Its core lies in transforming raw data into structured features that can effectively characterize user credit risk and meet model training requirements through steps such as data derivation, discretization, and screening. In the pre-loan risk control scenario for agricultural machinery leasing, feature engineering includes:
[0096] Feature derivation: Expand credit-related data based on business logic and statistical methods to generate multi-dimensional derivative features (such as the trend of application times in the past N months, and a combination of application amount and number of institutions);
[0097] Variable binning and monotonicity verification: Discretize continuous variables into multiple groups with business explanations (such as the length of time a mobile phone number has been online is divided into <12 months, 12-24 months, and >24 months), and check whether the bad sample rate of each group after binning shows a monotonically increasing or decreasing trend (for example, the "number of institutions applying in the past three months" after binning must meet the following requirements: the more applications, the higher the bad sample rate; otherwise, the bin boundaries will be readjusted).
[0098] Feature screening: Redundant or invalid features (such as variables with a missing rate > 99%) are eliminated through the three dimensions of data quality, business logic, and statistical validity, ultimately forming a feature set that meets the preset risk control modeling requirements.
[0099] Through the methods of stratified sampling and time window isolation, the feature set is divided into training set and test set according to a preset ratio. The purpose of stratified sampling is to ensure that the bad sample rate in the training set is consistent with that in the test set; time window isolation means that the application time of the test set samples is later than that of the training set to avoid data leakage.
[0100] In feature engineering, binning can be used to convert continuous variables into discrete variables with clear risk trends (e.g., "application amount > 150,000" is directly associated with high risk), which can improve the business interpretability of the classification model. Binning can also reduce the impact of outliers (such as extremely high-income customers) and enhance the robustness of the classification model. Low-quality variables can be eliminated through missing rate and unique value screening (e.g., if the missing rate of operator type is too high, it will be deleted). Eliminating highly correlated variables based on the correlation coefficient and variance inflation factor (VIF) (e.g., only retaining one of the "number of applications in the past 7 days" and the "number of applications in the past month") can avoid overfitting of the classification model.
[0101] It should be noted that the missing rate refers to the proportion of missing values in the data. In this embodiment, feature variables with a missing rate greater than 99% need to be eliminated (e.g., if the missing rate of "operator type" is greater than 99%, it should be deleted).
[0102] For unique values, there are different values in the feature variable, which is used to quantify the diversity of the variable (such as the number of groups after binning). When this number is equal to 1 (such as "gender" is all male), it is defined as a "unique value feature variable" and needs to be eliminated.
[0103] Information value (IV) is the ability of a feature to predict the classification label (bad customer or good customer). In this example, if the information value is ≥ 0.02, it is retained (for example, "Number of mobile phone number-linked ID cards > 3 in the past 12 months" has an IV of 0.25); if the information value is < 0.02, it is discarded (for example, "Occupation type" has an IV of 0.01).
[0104] The correlation coefficient is the strength of the linear correlation between two feature variables, and its value range is [-1,1]. The larger the absolute value of the correlation coefficient, the stronger the linear correlation. In this embodiment, if the correlation coefficient of two feature variables is greater than 0.85 (such as "number of applications in the past 7 days" and "number of applications in the past month"), the feature variable with higher information value needs to be retained and the other variable needs to be eliminated.
[0105] The variance inflation factor (VIF) is used to measure the degree of multicollinearity. A larger VIF indicates a stronger collinearity between the feature variable and other feature variables. In this example, if the VIF is greater than 10, it indicates severe collinearity, and variables with lower VIFs should be removed from the group of collinear variables (e.g., if "Amount Applied" and "Age" are highly collinear, the variable with a higher IV should be retained).
[0106] S2: Based on the training set, the decision tree algorithm is used to build an initial classification model. The complexity of the initial classification model is controlled through pruning optimization to obtain the target classification model. The classification rules of each leaf node in the target classification model are extracted to form the initial risk control strategy set. In S2:
[0107] The initial classification model refers to an original decision tree model that has not been pruned and optimized and is generated based on the training set data through a decision tree algorithm (CART algorithm is used in this embodiment).
[0108] Specifically, the input data of the initial classification model is the previously generated training set, which contains multiple filtered feature variables.
[0109] Then, calculate the Gini coefficient using the following formula:
[0110]
[0111] Where Gini(p) represents the Gini coefficient; k is the total number of categories, the number of categories of classification labels; i represents the category index, for example, i=1 represents a bad customer, i=2 represents a good customer; P iThe Gini coefficient represents the proportion of the i-th type of samples in the current node to the total number of samples. The smaller the Gini coefficient, the higher the purity of the node.
[0112] All feature variables are traversed, and the feature variable with the smallest Gini coefficient is selected as the split node for node splitting. When the information entropy of the split node is less than the preset information entropy threshold, the splitting is stopped, and the current node is marked as a leaf node. Finally, a decision tree with a certain depth is obtained, and the decision tree includes root nodes, internal nodes and leaf nodes.
[0113] After constructing the decision tree, pruning optimization is performed, that is, by merging or deleting redundant branches in the decision tree, the model complexity is reduced and the generalization ability is improved.
[0114] Specifically, all groups of child nodes with the same parent node are traversed. Then, the entropy increase amount is calculated, that is, the information entropy increase amount of the parent node before and after merging the child nodes is calculated, and the entropy value of the parent node before merging is subtracted from the entropy value of the parent node after merging. If the information entropy increase amount is less than or equal to the preset entropy increase amount threshold, merging is performed, otherwise the original branch is retained.
[0115] Finally, from the leaf node to the root node, each classification rule on the path is recorded and extracted, forming an initial risk control strategy set. The leaf node is the end node of the decision tree, representing the final classification rule.
[0116] S3, based on the test set and the target classification model, uses the confusion matrix to calculate the performance indicators representing the generalization ability of the target classification model, in S3:
[0117] The confusion matrix is a tabular tool for evaluating the performance of a classification model, and its core function is to quantify the correspondence between the model prediction results and the true labels.
[0118] First, each sample in the test set is input into the target classification model to obtain the predicted label (bad customer or good customer).
[0119] The predicted label is compared with the true label one by one, and the values of the TP parameter, the FN parameter, the FP parameter and the TN parameter are counted.
[0120] Then, the precision, recall and F1 score of the target classification model are calculated based on the confusion matrix.
[0121] Specifically:
[0122] The precision rate represents the proportion of the bad customers correctly predicted to all the bad customers predicted, reflecting the prediction reliability of the model, and the formula is as follows:
[0123]
[0124] The recall rate indicates the proportion of correctly predicted bad customers to all actual bad customers, reflecting the risk coverage capability of the model. The formula is as follows:
[0125]
[0126] The F1 score represents the harmonic mean of precision and recall, which comprehensively reflects the balanced performance of the model and is shown as follows:
[0127]
[0128] S4. Based on the initial risk control strategy set, the ratio of the bad customer rate of each classification rule in the training set and the test set to the overall bad customer rate is calculated. Combined with the performance indicators, the classification rules that meet the preset conditions are selected as the target risk control strategy set for the target user. In S4:
[0129] The rule-hitting bad customer rate represents the proportion of samples that are actually bad customers among those hit by any classification rule. Rule-hitting bad customer rate = number of bad customers hit by the rule / total number of customers hit by the rule. The number of bad customers hit by the rule refers to the number of samples that meet the corresponding classification rule and are labeled as bad customers. The total number of customers hit by the rule refers to the total number of samples that meet the corresponding classification rule.
[0130] The overall bad customer rate represents the ratio of bad customers to the total number of samples in the test or training set. Overall bad customer rate = total number of bad customers / total number of samples.
[0131] The Lift value represents the ratio of the rule's bad customer hit rate to the overall bad customer rate, measuring the rule's ability to identify bad customers. Lift = Rule's bad customer hit rate / Overall bad customer rate.
[0132] First, calculate the ratio of the bad customer rate of each classification rule in the training set and test set to the overall bad customer rate in the initial risk control strategy set, and obtain the training set lift value and test set lift value of each classification rule.
[0133] Then, in the test set, all classification rules whose lift values are less than the preset lift threshold in the initial risk control strategy set are removed to obtain the first risk control strategy set.
[0134] Next, according to the formula: Lift deviation value = |Training set Lift value - Test set Lift value|, calculate the lift deviation value between the training set lift value and the test set lift value of each classification rule in the first risk control strategy set, and eliminate all classification rules whose lift deviation value is greater than the preset fluctuation threshold to obtain the second risk control strategy set.
[0135] Finally, according to the precision, recall and F1 scores calculated in S3, all classification rules with precision less than the preset precision threshold, all classification rules with recall less than the preset recall threshold, and all classification rules with F1 scores less than the preset F1 score threshold in the second risk control strategy set are eliminated respectively to obtain the target risk control strategy set for the target user.
[0136] The technical solution of this embodiment adopts a decision tree combined with pruning optimization to construct a classification model to avoid overfitting, uses a confusion matrix to verify the generalization performance of the model, and screens high-discrimination rules through the ratio of rule hit bad customer rates, thereby improving the accuracy and stability of bad customer identification, enhancing the interpretability of rules and business adaptability, and providing reliable decision support.
[0137] In an optional method, the steps of performing feature engineering on the target user's credit-related data to generate a feature set that meets the preset risk control modeling requirements include:
[0138] Based on credit-related data, multiple derivative variables are generated through feature derivation;
[0139] Discretize each derived variable into multiple groups to obtain binning results, and perform monotonicity verification on the binning results to obtain verification results; wherein the binning results are the set of bins for each derived variable; each derived variable is binned independently to generate multiple groups; each group corresponds to a feature variable;
[0140] Based on the binning and verification results, filter the feature variables that meet the preset risk control modeling requirements in the binning results to generate a feature set. The screening process includes: data quality screening, business logic screening, and statistical validity screening.
[0141] Data quality screening includes:
[0142] Based on the missing rate of each feature variable in the binning results, the feature variables with a missing rate greater than the preset missing rate threshold are eliminated;
[0143] Based on the number of groups of each characteristic variable in the binning results, the characteristic variables with the same number of groups as one are eliminated;
[0144] Business logic filtering includes:
[0145] Based on the risk trend of each feature variable in the verification results, eliminate feature variables whose risk trends contradict business logic;
[0146] Statistical validity screening includes:
[0147] Based on the information value of each feature variable in the binning results, feature variables whose information value is less than the preset information value threshold are eliminated;
[0148] Based on the correlation coefficients between different feature variables in the binning results, determine the variable pairs whose correlation coefficients are greater than the preset correlation coefficient threshold, and retain the feature variable with the highest information value in each variable pair, and eliminate the remaining feature variables;
[0149] Based on the variance inflation factor of each characteristic variable in the binning results, the collinear variable group with a variance inflation factor greater than the preset threshold is determined, and all characteristic variables in the collinear variable group except the characteristic variable with the highest information value are eliminated.
[0150] In this embodiment, feature derivation includes:
[0151] 1) Statistical-oriented derivation: Calculate the trend of application counts over the past three, six, and twelve months (e.g., linear growth rate);
[0152] 2) Time-series-oriented derivatives: Generate the ratio of the number of applicants in the past seven days to the number of applicants in the past month to capture the density of short-term lending behavior;
[0153] 3) Grouped statistical derivation: Customers are grouped by age (e.g., <30, 30-50, >50), and the average number of overdue platforms within each group is calculated. This ultimately generates 526 derived variables, covering the multi-dimensional characteristics of user credit behavior.
[0154] In the variable binning process, continuous variables are discretized into 3-5 groups, for example:
[0155] 1) Equal-frequency binning: The "application amount" is divided into three groups according to the quantile: low (≤100,000), medium (100,000-150,000), and high (>150,000);
[0156] 2) Business-oriented binning: "Mobile phone number online duration" is divided into <12 months, 12-24 months, and >24 months based on business experience;
[0157] 3) Risk Trend Verification: Check whether the bad sample rate in each binned group shows a monotonically increasing or decreasing trend. For example, the "number of applicants in the past three months" after binning must meet the following criteria: the higher the number of applications, the higher the bad sample rate. Otherwise, the bin boundaries will be readjusted.
[0158] In feature screening, for data quality screening, variables with a missing rate > 99% are removed (e.g., if "Carrier Type" is mostly null, then remove it); variables with only a single value, that is, variables with only one group (e.g., if "Gender" is all male, then it is invalid). For business logic screening, feature variables whose risk trends contradict the business logic are removed. For example, if the bad sample rate of the "Age < 30" group is lower than that of the "Age > 50" group, which contradicts business experience (young users are at higher risk), then remove this feature variable. For statistical validity screening, feature variables with an information value ≥ 0.02 are retained, and low-predictive feature variables with an information value < 0.02 are removed. If the correlation coefficient between two feature variables is > 0.85, the feature variable with the higher information value is retained. In the variable group with a variance inflation factor > 10, redundant feature variables except for the highest information value are removed.
[0159] After the above screening, 159 feature variables were finally retained to form a feature set that meets the preset risk control modeling requirements.
[0160] Finally, the feature set is divided into a training set (5600 samples) and a test set (2400 samples) in a ratio of 7:3. The specific method is as follows:
[0161] Stratified sampling: ensure that the bad sample rate in the training set and the test set is consistent (about 15%);
[0162] Time window isolation: The application time of the test set samples is later than that of the training set to avoid data leakage.
[0163] In an optional approach, based on the training set, an initial classification model is constructed using a decision tree algorithm, the complexity of the initial classification model is controlled through pruning optimization to obtain a target classification model, and the classification rules of each leaf node in the target classification model are extracted to form an initial risk control strategy set, including the following steps:
[0164] Based on the training set, a decision tree is constructed using the CART algorithm to generate an initial classification model. The CART algorithm uses the Gini coefficient as the splitting rule and selects the feature variable with the smallest Gini coefficient for node splitting. The initial classification model includes a root node, internal nodes, and leaf nodes.
[0165] When the current information entropy after the node split is less than the preset information entropy threshold, the node split is stopped and the current node is used as a leaf node;
[0166] Each child node with the same parent node in the initial classification model is merged and verified to form the target classification model; the merge verification includes:
[0167] Calculate the entropy increase before and after the merger respectively; when the entropy increase is less than or equal to the preset entropy increase threshold, treat each child node after the merger as a single leaf node; when the entropy increase is greater than the preset entropy increase threshold, retain each child node with the same parent node and maintain the original branch structure;
[0168] Based on each leaf node of the target classification model, all classification rules are extracted to form an initial risk control strategy set.
[0169] In this embodiment, the preset information entropy threshold is 0.1; the preset entropy increase threshold is 0.05.
[0170] In an optional manner, the steps of calculating a performance indicator representing the generalization ability of the target classification model using a confusion matrix based on the test set and the target classification model include:
[0171] Based on the test set and the target classification model, a classification prediction is performed on each sample in the test set to obtain a prediction result. The prediction result is the predicted label of each sample. Each sample is a credit-related data point that has been processed by feature engineering and currently exists in the test set.
[0172] According to the true label and predicted label of the test set, the TP parameter, FN parameter, FP parameter and TN parameter of the confusion matrix are determined, and the confusion matrix is constructed; each column of the confusion matrix represents the predicted label and each row represents the true label;
[0173] Among them, the TP parameter is the number of customers whose true label is bad and whose predicted label is bad, the FN parameter is the number of customers whose true label is bad but whose predicted label is good, the FP parameter is the number of customers whose true label is good but whose predicted label is bad, and the TN parameter is the number of customers whose true label is good and whose predicted label is good;
[0174] The confusion matrix is used to calculate performance indicators, including precision, recall, and F1 score of the target classification model.
[0175] In this embodiment, the structure of the confusion matrix is as follows Figure 2 As shown, where:
[0176] TP (True Positive) represents the number of customers who are actually bad customers and are correctly predicted to be bad customers. Example: The number of overdue customers in the test set that the model correctly labeled as "bad."
[0177] FN (False Negative) represents the number of customers who are actually bad but are mistakenly predicted to be good. Example: The number of overdue customers who are mistakenly labeled as "good" by the model.
[0178] FP (False Positive) represents the number of customers who are actually good but incorrectly predicted as bad. Example: The number of customers who are actually good but incorrectly labeled as "bad" by the model.
[0179] TN (True Negative) represents the number of customers who are actually good and correctly predicted as good. Example: The number of actual good customers correctly labeled as "good" by the model.
[0180] In an optional manner, based on the ratio of the bad customer rate of each classification rule in the training set and the test set to the overall bad customer rate, and in combination with the performance indicators, the steps of selecting classification rules that meet preset conditions as the target risk control policy set for the target user include:
[0181] Calculate the ratio of the bad customer rate of each classification rule in the training set and test set to the overall bad customer rate in the initial risk control strategy set, and obtain the training set lift value and test set lift value of each classification rule. The bad customer rate is the ratio of the number of bad customers hit by each classification rule to the total number of customers hit by the rule.
[0182] Eliminate all classification rules whose test set Lift value is less than the preset Lift threshold to obtain the first risk control strategy set;
[0183] Calculate the lift deviation between the training set lift value and the test set lift value for each classification rule in the first risk control strategy set, and eliminate all classification rules with lift deviation values greater than the preset fluctuation threshold to obtain the second risk control strategy set;
[0184] According to the precision, recall and F1 score, all classification rules with precision less than the preset precision threshold, all classification rules with recall less than the preset recall threshold, and all classification rules with F1 score less than the preset F1 score threshold are eliminated from the second risk control strategy set, and the following is obtained: Figure 3 Target risk control strategy set for target users.
[0185] In this embodiment, for multiple preset thresholds: the preset lift threshold is 5.0; the preset fluctuation threshold is 0.5; the precision threshold is 75%; the recall threshold is 70%; and the F1 score threshold is 0.7.
[0186] By setting the Lift threshold to 5.0, we can identify rules whose ability to identify bad customers is significantly higher than random chance. A Lift value ≥ 5.0 indicates that the probability of a rule hitting a bad customer is more than five times the overall bad customer rate (for example, Rule 7 has a Lift of 6.1), demonstrating that the rule has strong risk-capturing capabilities. Furthermore, high-Lift rules can directly intercept high-risk customers, reducing the bad debt rate. For example, Rule 7 has a 94% bad customer hit rate and only 6% false negatives, significantly improving risk control efficiency.
[0187] By setting the lift threshold (lift deviation) to 0.5, we can identify stable rules that perform consistently across both the training and test sets. By eliminating rules with a lift threshold greater than 0.5, we can prevent overfitting of the rules to the training set and their subsequent failure in practical applications. Rules with a lift threshold ≤ 0.5 (e.g., Rule 4 with a lift deviation of 0.1) demonstrate consistent performance across sample sets and are therefore suitable for long-term deployment.
[0188] Setting the precision threshold to 75% ensures that a high percentage of customers predicted as bad by the rule are actually bad. A precision of 75% or higher means that at least 75% of intercepted customers are indeed bad, avoiding excessive rejection of good customers (e.g., a test set precision of 79% with a false positive rate of 21%). This also reduces customer churn and manual review costs caused by false positives.
[0189] Setting the recall threshold to 70% ensures that the model captures the majority of actual bad customers. A recall of 70% or higher means the model can identify at least 70% of truly bad customers (e.g., a recall of 73% in the test set), thus avoiding underestimating high-risk customers. Combining recall with precision prevents the model from missing risks due to overconservatism.
[0190] Setting the F1 score threshold to 0.7 allows for a comprehensive assessment of the classification model's balanced performance in terms of precision and recall. An F1 score ≥ 0.7 indicates that the classification model performs well in both precision and recall, thus avoiding bias caused by excessively high single metric. A high F1 score reflects the classification model's stable performance on unknown data and is suitable for real-world deployments.
[0191] Figure 4 FIG. 2 shows a schematic diagram of an embodiment of a pre-loan risk control system 200 for agricultural machinery leasing provided by the present invention. Figure 4 As shown, the system 200 includes: a pre-processing module 210, a model optimization module 220, an index calculation module 230 and a strategy screening module 240;
[0192] The pre-processing module 210 is used to perform feature engineering on the credit-related data of the target user, generate a feature set that meets the preset risk control modeling requirements, and divide the feature set into a training set and a test set;
[0193] The model optimization module 220 is used to: construct an initial classification model based on the training set using a decision tree algorithm, control the complexity of the initial classification model through pruning optimization to obtain a target classification model, and extract the classification rules of each leaf node in the target classification model to form an initial risk control strategy set;
[0194] The indicator calculation module 230 is used to calculate the performance indicator representing the generalization ability of the target classification model based on the test set and the target classification model using the confusion matrix;
[0195] The strategy screening module 240 is used to: based on the ratio of the bad customer rate of each classification rule in the training set and the test set to the overall bad customer rate in the initial risk control strategy set, combined with performance indicators, screen the classification rules that meet the preset conditions as the target risk control strategy set for the target user.
[0196] In an optional manner, the pre-processing module 210 is specifically configured to:
[0197] Based on credit-related data, multiple derivative variables are generated through feature derivation;
[0198] Discretize each derived variable into multiple groups to obtain binning results, and perform monotonicity verification on the binning results to obtain verification results; wherein the binning results are the set of bins for each derived variable; each derived variable is binned independently to generate multiple groups; each group corresponds to a feature variable;
[0199] Based on the binning and verification results, filter the feature variables that meet the preset risk control modeling requirements in the binning results to generate a feature set. The screening process includes: data quality screening, business logic screening, and statistical validity screening.
[0200] Data quality screening includes:
[0201] Based on the missing rate of each feature variable in the binning results, the feature variables with a missing rate greater than the preset missing rate threshold are eliminated;
[0202] Based on the number of groups of each characteristic variable in the binning results, the characteristic variables with the same number of groups as one are eliminated;
[0203] Business logic filtering includes:
[0204] Based on the risk trend of each feature variable in the verification results, eliminate feature variables whose risk trends contradict business logic;
[0205] Statistical validity screening includes:
[0206] Based on the information value of each feature variable in the binning results, feature variables whose information value is less than the preset information value threshold are eliminated;
[0207] Based on the correlation coefficients between different characteristic variables in the binning results, determine the variable pairs with correlation coefficients greater than a preset correlation coefficient threshold, and retain the characteristic variable with the highest information value in each variable pair and eliminate the remaining characteristic variables;
[0208] Based on the variance inflation factor of each characteristic variable in the binning results, determine the collinear variable group with a variance inflation factor greater than a preset threshold, and eliminate all characteristic variables in the collinear variable group except the characteristic variable with the highest information value.
[0209] In an optional manner, the model optimization module 220 is specifically configured to:
[0210] Based on the training set, a decision tree is constructed by a CART algorithm to generate an initial classification model; the CART algorithm selects the characteristic variable with the smallest Gini coefficient for node splitting with the Gini coefficient as the splitting rule; the initial classification model includes root nodes, internal nodes and leaf nodes;
[0211] When the current information entropy after node splitting is less than a preset information entropy threshold, stop node splitting and take the current node as a leaf node;
[0212] Each child node with the same parent node in the initial classification model is verified to form a target classification model; the merging verification includes:
[0213] The entropy increase amount before and after merging is calculated respectively; when the entropy increase amount is less than or equal to a preset entropy increase threshold, each child node after merging is taken as a single leaf node; when the entropy increase amount is greater than the preset entropy increase threshold, each child node with the same parent node is retained to maintain the original branch structure;
[0214] Based on each leaf node of the target classification model, all classification rules are extracted to form an initial risk control policy set.
[0215] The technical scheme of the embodiment adopts a decision tree combined with pruning optimization to construct a classification model to avoid overfitting, uses a confusion matrix to verify the generalization performance of the model, and screens high-discrimination rules by a rule hit bad customer rate ratio, thereby improving the bad customer identification accuracy and stability, enhancing the rule interpretability and business adaptability, and providing reliable decision support.
[0216] The above steps of the parameters and modules in the agricultural machinery leasing pre-loan risk control system 200 of the embodiment for realizing the corresponding functions can refer to the parameters and steps in the embodiments of the agricultural machinery leasing pre-loan risk control method, which will not be repeated here.
[0217] As Figure 5As shown, an electronic device 300 according to an embodiment of the present invention includes a processor 320 coupled to a memory 310. The memory 310 stores at least one computer program 330. The at least one computer program 330 is loaded and executed by the processor 320, so that the electronic device 300 implements any of the above-mentioned pre-loan risk control methods for agricultural machinery leasing, specifically:
[0218] The electronic device 300 may vary significantly due to different configurations or performance, and may include one or more processors 320 (Central Processing Units, CPUs) and one or more memories 310, wherein the one or more memories 310 store at least one computer program 330, which is loaded and executed by the one or more processors 320 to enable the electronic device 300 to implement any of the pre-loan risk control methods for agricultural machinery leasing provided in the above embodiments. Of course, the electronic device 300 may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input and output. The electronic device 300 may also include other components for implementing device functions, which will not be described in detail here.
[0219] A computer-readable storage medium according to an embodiment of the present invention stores at least one computer program, and the at least one computer program is loaded and executed by a processor so that the computer implements any of the above-mentioned pre-loan risk control methods for agricultural machinery leasing.
[0220] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, or the like.
[0221] In an exemplary embodiment, a computer program product or computer program is also provided. The computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform any of the above-described pre-loan risk control methods for agricultural machinery leasing.
[0222] It should be noted that the terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects and to define a specific order or precedence. Where appropriate, the order used for similar objects may be interchanged, such that the embodiments of the present application described herein can be implemented in an order other than the order shown or described.
[0223] Those skilled in the art will appreciate that the present invention may be implemented as a system, method, or computer program product. Therefore, the present disclosure may be implemented in the following forms: entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or in a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the present invention may be implemented in the form of a computer program product embodied in one or more computer-readable media containing computer-readable program code.
[0224] Any combination of one or more computer-readable media can be used. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device.
[0225] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A pre-loan risk control method for agricultural machinery leasing, characterized by: include: Perform feature engineering on the target user's credit-related data to generate a feature set that meets the preset risk control modeling requirements, and divide the feature set into a training set and a test set; Based on the training set, an initial classification model is constructed using a decision tree algorithm. The complexity of the initial classification model is controlled through pruning optimization to obtain a target classification model. The classification rules of each leaf node in the target classification model are extracted to form an initial risk control strategy set. Based on the test set and the target classification model, a confusion matrix is used to calculate a performance indicator representing the generalization ability of the target classification model; According to the initial risk control strategy set, the ratio of the bad customer rate of each classification rule in the training set and the test set to the overall bad customer rate is respectively calculated, and combined with the performance indicators, the classification rules that meet the preset conditions are screened as the target risk control strategy set for the target user.
2. A pre-loan risk control method for agricultural machinery leasing according to claim 1, characterized in that: The steps for performing feature engineering on the target user's credit-related data to generate a feature set that meets the preset risk control modeling requirements include: Based on the credit-related data, generating a plurality of derived variables through feature derivation; Discretize each derived variable into multiple groups to obtain binning results, and perform monotonicity verification on the binning results to obtain verification results; wherein the binning results are the set of bins for each derived variable; each derived variable is independently binned to generate multiple groups; each group corresponds to a feature variable; Based on the binning results and the verification results, screening the feature variables in the binning results that meet the preset risk control modeling requirements to generate the feature set; the screening process includes: data quality screening, business logic screening, and statistical validity screening; The data quality screening includes: Based on the missing rate of each feature variable in the binning result, the feature variables whose missing rate is greater than a preset missing rate threshold are eliminated; Based on the number of groups of each characteristic variable in the binning result, eliminating the characteristic variables with the same number of groups as one; The business logic screening includes: Eliminate, based on the risk trend of each characteristic variable in the verification result, characteristic variables whose risk trends are inconsistent with business logic; The statistical validity screening includes: Based on the information value of each feature variable in the binning result, eliminating feature variables whose information value is less than a preset information value threshold; Based on the correlation coefficients between different feature variables in the binning results, determine the variable pairs whose correlation coefficients are greater than a preset correlation coefficient threshold, and retain the feature variable with the highest information value in each variable pair, and eliminate the remaining feature variables; Based on the variance inflation factor of each feature variable in the binning results, a collinear variable group whose variance inflation factor is greater than a preset threshold is determined, and all feature variables in the collinear variable group except the feature variable with the highest information value are eliminated.
3. The pre-loan risk control method for agricultural machinery leasing according to claim 2, characterized in that: Based on the training set, an initial classification model is constructed using a decision tree algorithm, the complexity of the initial classification model is controlled through pruning optimization to obtain a target classification model, and the classification rules of each leaf node in the target classification model are extracted to form an initial risk control strategy set, including the following steps: Based on the training set, a decision tree is constructed using the CART algorithm to generate the initial classification model; the CART algorithm uses the Gini coefficient as a splitting rule and selects the feature variable with the smallest Gini coefficient for node splitting; the initial classification model includes a root node, internal nodes, and leaf nodes; When the current information entropy of the node after splitting is less than the preset information entropy threshold, stop the node splitting and use the current node as the leaf node; Performing a merge verification on each child node having the same parent node in the initial classification model to form the target classification model; the merge verification includes: Calculate the entropy increase before and after the merger respectively; when the entropy increase is less than or equal to a preset entropy increase threshold, treat each child node after the merger as a single leaf node; when the entropy increase is greater than the preset entropy increase threshold, retain each child node with the same parent node and maintain the original branch structure; Based on each leaf node of the target classification model, all classification rules are extracted to form the initial risk control strategy set.
4. The pre-loan risk control method for agricultural machinery leasing according to claim 3 is characterized in that: The step of calculating a performance indicator representing the generalization ability of the target classification model using a confusion matrix based on the test set and the target classification model includes: Based on the test set and the target classification model, a classification prediction is performed on each sample in the test set to obtain a prediction result; the prediction result is a predicted label for each sample; each sample is a plurality of credit-related data currently existing in the test set that has been processed by the feature engineering; Determine the TP parameter, FN parameter, FP parameter, and TN parameter of the confusion matrix according to the true label and the predicted label of the test set, and construct the confusion matrix; each column of the confusion matrix represents the predicted label, and each row represents the true label; The TP parameter is the number of customers whose true label is bad and whose predicted label is bad, the FN parameter is the number of customers whose true label is bad and whose predicted label is good, the FP parameter is the number of customers whose true label is good and whose predicted label is bad, and the TN parameter is the number of customers whose true label is good and whose predicted label is good. The performance indicators are calculated using the confusion matrix, and the performance indicators include the precision, recall and F1 score of the target classification model.
5. The pre-loan risk control method for agricultural machinery leasing according to claim 4 is characterized in that: The step of selecting, based on the initial risk control strategy set, the ratio of the rule hit bad customer rate of each classification rule in the training set and the test set to the overall bad customer rate, and combining the performance indicator, a classification rule that meets preset conditions as the target risk control strategy set for the target user, comprising: Calculate the ratio of the rule-hit bad customer rate to the total bad customer rate for each classification rule in the training set and the test set, respectively, in the initial risk control strategy set, to obtain the training set lift value and the test set lift value of each classification rule; wherein the rule-hit bad customer rate is the ratio of the number of bad customers hit by each classification rule to the total number of customers hit by the rule; Eliminate all classification rules whose lift values of the test set are less than a preset lift threshold to obtain a first risk control strategy set; Calculate the lift deviation between the training set lift value and the test set lift value of each classification rule in the first risk control strategy set, and eliminate all classification rules whose lift deviation value is greater than a preset fluctuation threshold to obtain a second risk control strategy set; According to the precision rate, the recall rate and the F1 score, all classification rules whose precision rate is less than a preset precision rate threshold, all classification rules whose recall rate is less than a preset recall rate threshold, and all classification rules whose F1 score is less than a preset F1 score threshold are eliminated from the second risk control strategy set to obtain the target risk control strategy set for the target user.
6. A pre-loan risk control system for agricultural machinery leasing, characterized by: include: Preprocessing module, model optimization module, indicator calculation module and strategy screening module; The preprocessing module is used to perform feature engineering on the credit-related data of the target user to generate a feature set that meets the preset risk control modeling requirements, and divide the feature set into a training set and a test set; The model optimization module is used to: construct an initial classification model based on the training set using a decision tree algorithm, control the complexity of the initial classification model through pruning optimization to obtain a target classification model, and extract the classification rules of each leaf node in the target classification model to form an initial risk control strategy set; The indicator calculation module is used to calculate the performance indicator representing the generalization ability of the target classification model based on the test set and the target classification model using a confusion matrix; The strategy screening module is used to: based on the initial risk control strategy set, the ratio of the rule hit bad customer rate of each classification rule in the training set and the test set to the overall bad customer rate, combined with the performance indicators, screen the classification rules that meet the preset conditions as the target risk control strategy set for the target user.
7. The pre-loan risk control system for agricultural machinery leasing according to claim 6 is characterized in that: The preprocessing module is specifically used for: Based on the credit-related data, generating a plurality of derived variables through feature derivation; Discretize each derived variable into multiple groups to obtain binning results, and perform monotonicity verification on the binning results to obtain verification results; wherein the binning results are the set of bins for each derived variable; each derived variable is independently binned to generate multiple groups; each group corresponds to a feature variable; Based on the binning results and the verification results, screening the feature variables in the binning results that meet the preset risk control modeling requirements to generate the feature set; the screening process includes: data quality screening, business logic screening, and statistical validity screening; The data quality screening includes: Based on the missing rate of each feature variable in the binning result, the feature variables whose missing rate is greater than a preset missing rate threshold are eliminated; Based on the number of groups of each characteristic variable in the binning result, eliminating the characteristic variables with the same number of groups as one; The business logic screening includes: Eliminate, based on the risk trend of each characteristic variable in the verification result, characteristic variables whose risk trends are inconsistent with business logic; The statistical validity screening includes: Based on the information value of each feature variable in the binning result, eliminating feature variables whose information value is less than a preset information value threshold; Based on the correlation coefficients between different feature variables in the binning results, determine the variable pairs whose correlation coefficients are greater than a preset correlation coefficient threshold, and retain the feature variable with the highest information value in each variable pair, and eliminate the remaining feature variables; Based on the variance inflation factor of each feature variable in the binning results, a collinear variable group whose variance inflation factor is greater than a preset threshold is determined, and all feature variables in the collinear variable group except the feature variable with the highest information value are eliminated.
8. The pre-loan risk control system for agricultural machinery leasing according to claim 7 is characterized in that: The model optimization module is specifically used for: Based on the training set, a decision tree is constructed using the CART algorithm to generate the initial classification model; the CART algorithm uses the Gini coefficient as a splitting rule and selects the feature variable with the smallest Gini coefficient for node splitting; the initial classification model includes a root node, internal nodes, and leaf nodes; When the current information entropy of the node after splitting is less than the preset information entropy threshold, stop the node splitting and use the current node as the leaf node; Merging and verifying each child node having the same parent node in the initial classification model to form the target classification model; The merge verification includes: Calculate the entropy increase before and after the merger respectively; when the entropy increase is less than or equal to a preset entropy increase threshold, treat each child node after the merger as a single leaf node; when the entropy increase is greater than the preset entropy increase threshold, retain each child node with the same parent node and maintain the original branch structure; Based on each leaf node of the target classification model, all classification rules are extracted to form the initial risk control strategy set.
9. An electronic device, characterized in that: The electronic device includes a processor, which is coupled to a memory. The memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor so that the electronic device implements the pre-loan risk control method for agricultural machinery leasing as described in any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that At least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by the processor so that the computer-readable storage medium implements the pre-loan risk control method for agricultural machinery leasing as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method for detecting teacher sub-health states based on classification and regression tree
CN109147949A
Automatic generation method and device of control rule, electronic equipment and readable medium
CN110135701A
Newly installed user load identification method based on characteristic index and decision tree model
CN110909786A
Enterprise credit evaluation index system based on big data
CN113011752A
Risk control model construction method and device based on multi-objective optimization and electronic equipment
CN113344700A