An agricultural machine leasing pre-loan risk control method and system, electronic equipment and storage medium
Patent Information
- Application Number
- CN202510674040.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2045-05-23
AI Technical Summary
[0002]在农机租赁贷前风控领域,现有技术通常采用传统风险评估模型(如逻辑回归),此类模型对复杂信用数据的非线性关系捕捉能力不足,导致分类准确率低且泛化能力弱
[0011]The method of this invention uses decision trees 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 selects high-discrimination rules by the rule hit rate ratio of bad customers, thereby improving the accuracy and stability of bad customer identification, enhancing the interpretability and business adaptability of rules, and providing reliable decision support.
Smart Images

Figure CN120765366B_ABST
Abstract
Description
Technical Field
[0001] This 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 Technology
[0002] In the field of pre-loan risk control for agricultural machinery leasing, existing technologies typically employ traditional risk assessment models (such as logistic regression). These models lack the ability to capture the nonlinear relationships in complex credit data, resulting in low classification accuracy and weak generalization ability. Furthermore, traditional decision tree models, due to the lack of pruning optimization, are prone to overfitting and lack stability, leading to poor interpretability of the generated rules and difficulty in directly adapting to actual business needs. In addition, existing methods lack sufficient refinement in data processing during the feature engineering stage, limiting the quality of the input feature set and hindering the effective mining of risk-related features. These problems make it difficult to guarantee the accuracy and effectiveness of risk control strategies.
[0003] Therefore, there is an urgent need to provide a technical solution to address the above problems. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a method, system, electronic device, and storage medium for pre-loan risk control in agricultural machinery leasing.
[0005] Firstly, the present invention provides a pre-loan risk control method for agricultural machinery leasing, the technical solution of which is as follows:
[0006] The credit-related data of the target user is processed by feature engineering to generate a feature set that meets the preset risk control modeling requirements, and the feature set is divided into a training set and a test set;
[0007] Based on the training set, an initial classification model is constructed using the decision tree algorithm. The complexity of the initial classification model is controlled by pruning optimization to obtain the 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 performance index characterizing the generalization ability of the target classification model is calculated using the confusion matrix.
[0009] Based on the initial risk control strategy set, the ratio of the rule hit rate of bad customers to the overall bad customer rate of each classification rule in the training set and the test set, combined with the performance indicators, is used to select classification rules that meet preset conditions 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 this invention uses decision trees 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 selects high-discrimination rules by the rule hit rate ratio of bad customers, thereby improving the accuracy and stability of bad customer identification, enhancing the interpretability and business adaptability of rules, and providing reliable decision support.
[0012] Based on the above solution, the pre-loan risk control method for agricultural machinery leasing of the present invention can be further improved as follows.
[0013] In one alternative approach, the step 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 includes:
[0014] Based on the aforementioned credit-related data, multiple derived variables are generated through feature derivation;
[0015] Each derived variable is discretized into multiple groups to obtain binning results, and the monotonicity of the binning results is verified to obtain verification results; wherein, the binning results are the sets after binning 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, feature variables that meet the preset risk control modeling requirements in the binning results are selected to generate the feature set; the selection process includes: data quality selection, business logic selection, and statistical validity selection.
[0017] The data quality screening includes:
[0018] Based on the missing rate of each feature variable in the binning results, feature variables with a missing rate greater than a preset missing rate threshold are removed.
[0019] Based on the number of groups for each feature variable in the binning results, feature variables that are grouped into one group are removed;
[0020] The business logic filtering includes:
[0021] Based on the risk trend of each feature variable in the verification results, feature variables whose risk trends contradict the business logic are eliminated.
[0022] The statistical validity screening includes:
[0023] Based on the information value of each feature variable in the binning results, feature variables whose information value is less than a preset information value threshold are removed.
[0024] Based on the correlation coefficients between different feature variables in the binning results, variable pairs with correlation coefficients greater than a preset correlation coefficient threshold are identified, and the feature variable with the highest information value is retained in each variable pair while the remaining feature variables are removed.
[0025] Based on the variance inflation factor of each feature variable in the binning results, the collinear variable group with the variance inflation factor greater than a preset threshold is determined, and all feature variables in the collinear variable group except for the feature variable with the highest information value are removed.
[0026] Among the aforementioned optional approaches, multidimensional derived variables are generated through feature derivation methods. Combined with binning discretization and screening, low-quality and redundant feature variables are effectively eliminated, improving the interpretability and risk discrimination ability of the feature set. The multiple high-information-value feature variables retained after screening significantly enhance the input quality of the model, solving the model bias problem caused by feature variable redundancy or logical contradictions in traditional methods, and providing a more robust data foundation for the construction of subsequent classification models.
[0027] In one alternative approach, the steps of constructing an initial classification model using a decision tree algorithm based on the training set, controlling the complexity of the initial classification model through pruning optimization to obtain a target classification model, and extracting the classification rules of each leaf node in the target classification model to form an initial risk control strategy set include:
[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 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.
[0029] When the current information entropy after the node split is less than the preset information entropy threshold, the node splitting is stopped, and the current node is taken as the leaf node.
[0030] The initial classification model is used to merge and validate each child node that shares the same parent node to form the target classification model; the merging and validation includes:
[0031] Calculate the entropy increase before and after merging; when the entropy increase is less than or equal to a preset entropy increase threshold, treat each child node after merging 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] Among the above-mentioned optional methods, the CART algorithm is adopted, which uses the Gini coefficient as the splitting rule, combines the pre-pruning operation of controlling node splitting with the information entropy threshold, and the post-pruning operation of merging 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, improves the interpretability of classification rules, and ensures the stability of the classification model in real-world scenarios.
[0034] In one alternative approach, the step of calculating a performance metric characterizing 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, 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 consists of multiple credit-related data currently existing in the test set after feature engineering processing;
[0036] Based on the true labels and predicted labels in the test set, the TP, FN, FP, and TN parameters 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.
[0037] Wherein, 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.
[0038] The performance metrics are calculated using the confusion matrix, and the performance metrics include the precision, recall, and F1 score of the target classification model.
[0039] Among the above-mentioned optional methods, 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 classification model's ability to identify bad and good customers is accurately quantified through TP, FN, FP, and TN parameters, which solves the limitation of traditional evaluation methods that rely on a single indicator. This 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 one optional approach, the step of selecting classification rules that meet preset conditions as the target risk control strategy set for the target user, based on the ratio of the rule hit rate of bad customers to the overall bad customer rate for each classification rule in the training set and the test set, and in conjunction with the performance indicators, includes:
[0041] Calculate the ratio of the rule hit rate of bad customers to the overall bad customer rate for each classification rule in the initial risk control strategy set in the training set and the test set, respectively, to obtain the training set Lift value and the test set Lift value for each classification rule; wherein, the rule hit rate of bad customers 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] Remove all classification rules whose Lift value in the test set is less than a preset Lift threshold to obtain the first risk control strategy set;
[0043] 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 remove all classification rules whose Lift deviation value is greater than a preset fluctuation threshold to obtain the second risk control strategy set.
[0044] Based on the precision, recall, and F1 score, all classification rules with a precision lower than a preset precision threshold, all classification rules with a recall lower than a preset recall threshold, and all classification rules with an F1 score lower than a preset F1 score threshold are removed from the second risk control strategy set to obtain the target risk control strategy set for the target user.
[0045] Among the above-mentioned optional methods, by combining the difference in Lift values between the training set and the test set and the performance index threshold, classification rules with low discriminative power and excessive fluctuations can be eliminated in stages. This can screen out highly stable classification rules, ensuring the generalization ability and business adaptability of the strategy set across datasets. It solves the problem of overfitting or strategy failure caused by the reliance on a single dataset in traditional rule screening, and provides an efficient guarantee for the deployment of risk control strategies.
[0046] Secondly, this invention provides a pre-loan risk control system for agricultural machinery leasing, the technical solution of which is as follows:
[0047] The agricultural machinery leasing pre-loan risk control system includes: a preprocessing module, a model optimization module, an indicator calculation module, and a strategy screening module;
[0048] The preprocessing module 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;
[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 a performance indicator that characterizes the generalization ability of the target classification model based on the test set and the target classification model using a confusion matrix;
[0051] The strategy screening module is used to: based on the ratio of the rule hit rate of bad customers to the overall bad customer rate of each classification rule in the training set and the test set in the initial risk control strategy set, and in combination with the performance indicators, screen classification rules that meet preset conditions as the target risk control strategy set for the target user.
[0052] The beneficial effects of the agricultural machinery leasing pre-loan risk control system of the present invention are as follows:
[0053] The system of this invention uses decision trees 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 selects high-discrimination rules by the rule hit rate ratio of bad customers, thereby improving the accuracy and stability of bad customer identification, enhancing the interpretability and business adaptability of rules, 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 be further improved as follows.
[0055] In one alternative approach, the preprocessing module is specifically used for:
[0056] Based on the aforementioned credit-related data, multiple derived variables are generated through feature derivation;
[0057] Each derived variable is discretized into multiple groups to obtain binning results, and the monotonicity of the binning results is verified to obtain verification results; wherein, the binning results are the sets after binning 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, feature variables that meet the preset risk control modeling requirements in the binning results are selected to generate the feature set; the selection process includes: data quality selection, business logic selection, and statistical validity selection.
[0059] The data quality screening includes:
[0060] Based on the missing rate of each feature variable in the binning results, feature variables with a missing rate greater than a preset missing rate threshold are removed.
[0061] Based on the number of groups for each feature variable in the binning results, feature variables that are grouped into one group are removed;
[0062] The business logic filtering includes:
[0063] Based on the risk trend of each feature variable in the verification results, feature variables whose risk trends contradict the business logic are eliminated.
[0064] The statistical validity screening includes:
[0065] Based on the information value of each feature variable in the binning results, feature variables whose information value is less than a preset information value threshold are removed.
[0066] Based on the correlation coefficients between different feature variables in the binning results, variable pairs with correlation coefficients greater than a preset correlation coefficient threshold are identified, and the feature variable with the highest information value is retained in each variable pair while the remaining feature variables are removed.
[0067] Based on the variance inflation factor of each feature variable in the binning results, the collinear variable group with the variance inflation factor greater than a preset threshold is determined, and all feature variables in the collinear variable group except for the feature variable with the highest information value are removed.
[0068] Among the aforementioned optional approaches, multidimensional derived variables are generated through feature derivation methods. Combined with binning discretization and screening, low-quality and redundant feature variables are effectively eliminated, improving the interpretability and risk discrimination ability of the feature set. The multiple high-information-value feature variables retained after screening significantly enhance the input quality of the model, solving the model bias problem caused by feature variable redundancy or logical contradictions in traditional methods, and providing a more robust data foundation for the construction of subsequent classification models.
[0069] In one alternative approach, the model optimization module is specifically used for:
[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 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.
[0071] When the current information entropy after the node split is less than the preset information entropy threshold, the node splitting is stopped, and the current node is taken as the leaf node.
[0072] The initial classification model is used to merge and validate each child node that shares the same parent node to form the target classification model; the merging and validation includes:
[0073] Calculate the entropy increase before and after merging; when the entropy increase is less than or equal to a preset entropy increase threshold, treat each child node after merging 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] Among the above-mentioned optional methods, the CART algorithm is adopted, which uses the Gini coefficient as the splitting rule, combines the pre-pruning operation of controlling node splitting with the information entropy threshold, and the post-pruning operation of merging 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, improves the interpretability of classification rules, and ensures the stability of the classification model in real-world scenarios.
[0076] Thirdly, the technical solution of an electronic device according to 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, wherein the processor executes the program to implement the steps of the agricultural machinery leasing pre-loan risk control method of the present invention.
[0078] Fourthly, the technical solution of a computer-readable storage medium provided by the present invention is as follows:
[0079] The computer-readable storage medium stores instructions that, when read, cause the computer-readable storage medium to perform the steps of the agricultural machinery leasing pre-loan risk control method of the present invention.
[0080] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0081] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0082] Figure 1 This is a flowchart illustrating an embodiment of a pre-loan risk control method for agricultural machinery leasing according to the present invention.
[0083] Figure 2 This is a 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 schematic diagram of an embodiment of the pre-loan risk control system for agricultural machinery leasing according to the present invention;
[0086] Figure 5 This is a schematic diagram of an embodiment of an electronic device according to the present invention. Detailed Implementation
[0087] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0088] Figure 1 The diagram illustrates a flowchart of an embodiment of a pre-loan risk control method for agricultural machinery leasing provided by the present invention. Figure 1 As shown, it includes the following steps:
[0089] S1. Perform feature engineering on the credit-related data of the target users to generate a feature set that meets the preset risk control modeling requirements. Divide the feature set into a training set and a test set. In S1:
[0090] Credit-related data refers to the raw data used to assess the credit risk of target users in agricultural machinery leasing. Credit-related data obtained through compliant channels ensures the consistency and traceability of the data source. Specifically, credit-related data 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, loan 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, and the number of ID numbers associated with a mobile phone number;
[0094] Device and network data: such as the duration of a mobile phone number's network activity, carrier type, device fingerprint, etc.
[0095] Feature engineering refers to the process of systematically processing and transforming credit-related data to generate a high-quality feature set that meets the needs of risk control modeling. Its core lies in transforming raw data into structured features that effectively represent user credit risk and meet model training requirements through steps such as data derivation, discretization, and filtering. In the pre-loan risk control scenario of agricultural machinery leasing, feature engineering includes:
[0096] Feature Derivation: Based on business logic and statistical methods, credit-related data is expanded to generate multi-dimensional derived features (such as the trend of application frequency in the past N months, and the combined variable of application amount and number of institutions);
[0097] Variable binning and monotonicity verification: Discretize continuous variables into multiple business-interpretive groups (e.g., mobile phone number network duration 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 (e.g., the "number of applicant institutions in the past 3 months" after binning should meet the following condition: the more applications, the higher the bad sample rate; otherwise, readjust the binning boundaries).
[0098] Feature selection: Redundant or invalid features (such as variables with a missing rate > 99%) are eliminated through three dimensions: data quality, business logic, and statistical validity, ultimately forming a feature set that meets the preset risk control modeling requirements.
[0099] By using stratified sampling and time window isolation, the feature set is divided into training and test sets according to a preset ratio. The purpose of stratified sampling is to ensure that the bad sample rate is consistent between the training and test sets. Time window isolation means that the application time for test set samples is later than that for training set samples to avoid data leakage.
[0100] In feature engineering, binning transforms continuous variables into discrete variables with clear risk trends (e.g., "application amount > 150,000" directly correlates with high risk), improving the business interpretability of the classification model. Binning also reduces the impact of outliers (e.g., extremely high-income customers), enhancing the robustness of the classification model. Missing value and uniqueness screening eliminate low-quality variables (e.g., removing operators with excessively high missing values). Eliminating highly correlated variables based on correlation coefficients and variance inflation factor (VIF) (e.g., retaining only one of "applications in the last 7 days" and "applications in the last month") avoids overfitting in 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 > 99% need to be removed (e.g., if the missing rate of "operator type" is > 99%, it will be deleted).
[0102] For unique values, there is a number of 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 the number is equal to 1 (such as "gender" being all male), it is defined as a "unique value feature variable" and needs to be removed.
[0103] Information value (IV) is the predictive ability of a feature to classify a label (bad customer or good customer). In this embodiment, if the information value is ≥0.02, it is retained (e.g., the IV of "number of mobile phone numbers associated with ID cards in the past 12 months > 3" is 0.25); if the information value is <0.02, it is removed (e.g., the IV of "occupation type" is 0.01).
[0104] The correlation coefficient is the strength of the linear correlation between two feature variables, and its value ranges from [-1, 1]. The larger the absolute value of the correlation coefficient, the stronger the linear correlation. In this embodiment, if the correlation coefficient between two feature variables is >0.85 (such as "number of applications in the past 7 days" and "number of applications in the past month"), then the feature variable with higher information value should be retained and the other variable should be removed.
[0105] The variance inflation factor (VIF) measures the degree of multicollinearity. The larger the VIF, the stronger the collinearity between the feature variable and other feature variables. In this embodiment, if the VIF > 10, it indicates severe multicollinearity, and variables with lower VIFs in the collinear variable group should be removed (e.g., when "application amount" and "age" are highly collinear, variables with higher VIFs should be retained).
[0106] S2. Based on the training set, an initial classification model is constructed using the decision tree algorithm. 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 the original decision tree model generated based on the training set data using the decision tree algorithm (CART algorithm is used in this embodiment) without pruning optimization.
[0108] Specifically, the input data for the initial classification model is the previously generated training set, which contains multiple filtered feature variables.
[0109] Then, the Gini coefficient is calculated using the following formula:
[0110]
[0111] Where Gini(p) represents the Gini coefficient; k is the total number of categories, the number of categories for the classification label; i represents the category index, for example, i=1 represents bad customers, i=2 represents good customers; P iThis represents the proportion of samples of class i in the current node out of the total number of samples. The smaller the Gini coefficient, the higher the node purity.
[0112] Iterate through all feature variables and select the feature variable with the smallest Gini coefficient as the splitting node. Stop splitting when the information entropy of the split node is less than a preset information entropy threshold, and mark the current node as a leaf node. The final result is a decision tree of a certain depth, containing a root node, 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, to reduce model complexity and improve generalization ability.
[0114] Specifically, iterate through all child node groups that share the same parent node. Then, calculate the entropy increase by subtracting the entropy value of the parent node from the entropy value of the parent node after merging the child nodes. If the entropy increase is less than or equal to a preset entropy increase threshold, then perform the merge; otherwise, retain the original branch.
[0115] Finally, tracing back from the leaf nodes to the root node, each classification rule along the path is recorded and extracted to form the initial risk control strategy set. The leaf nodes are the terminal nodes of the decision tree, representing the final classification rules.
[0116] S3. Based on the test set and the target classification model, the performance index characterizing the generalization ability of the target classification model is calculated using the confusion matrix. In S3:
[0117] A confusion matrix is a tabular tool used to evaluate the performance of classification models. Its core function is to quantify the correspondence between the model's predictions 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 labels are compared with the real labels one by one, and the values of TP, FN, FP and TN parameters are calculated.
[0120] Then, the precision, recall, and F1 score of the target classification model are calculated based on the confusion matrix.
[0121] Specifically:
[0122] Precision rate represents the proportion of correctly predicted bad customers out of all predicted bad customers, reflecting the reliability of the model's predictions. The formula is as follows:
[0123]
[0124] Recall rate represents the proportion of correctly predicted bad customers out of all actual bad customers, reflecting the model's risk coverage capability. The formula is as follows:
[0125]
[0126] The F1 score represents the harmonic mean of precision and recall, comprehensively reflecting the model's balanced performance, and is expressed as follows:
[0127]
[0128] S4. Based on the initial risk control strategy set, the ratio of the bad customer hit rate to the overall bad customer rate for each classification rule in the training and test sets, combined with performance indicators, select classification rules that meet preset conditions as the target risk control strategy set for the target user. In S4:
[0129] The rule-based bad customer hit rate represents the proportion of samples that are actually bad customers among those that are hit by any classification rule. Rule-based bad customer hit rate = Number of bad customers hit by the rule / Total number of customers hit by the rule; where, the number of bad customers hit by the rule refers to the number of samples that meet the corresponding classification rule and are actually 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 proportion of bad customers in the test or training set to the total sample size. Overall bad customer rate = Total number of bad customers / Total number of samples.
[0131] The Lift value represents the ratio of the rule's hit rate for bad customers to the overall bad customer rate, and is used to measure the rule's ability to identify bad customers. Lift = Rule hit rate for bad customers / Overall bad customer rate.
[0132] First, calculate the ratio of the rule hit rate of bad customers to the overall bad customer rate for each classification rule in the initial risk control strategy set, in both the training and test sets, to obtain the training set Lift value and the test set Lift value for each classification rule.
[0133] Then, in the test set, all classification rules in the initial risk control strategy set whose Lift value is less than the preset Lift threshold 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|, 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 Lift deviation values greater than the preset fluctuation threshold are removed to obtain the second risk control strategy set.
[0135] Finally, based on the precision, recall, and F1 score calculated in S3, all classification rules in the second risk control strategy set with a precision lower than the preset precision threshold, a recall lower than the preset recall threshold, and an F1 score lower than the preset F1 score threshold are removed, thus obtaining the target risk control strategy set for the target user.
[0136] The technical solution in this embodiment uses a decision tree combined with pruning optimization to construct a classification model to avoid overfitting, uses a confusion matrix to verify the model's generalization performance, and filters high-discrimination rules by the rule hit rate ratio of bad customers, thereby improving the accuracy and stability of bad customer identification, enhancing rule interpretability and business adaptability, and providing reliable decision support.
[0137] In one alternative approach, the step 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 includes:
[0138] Based on credit-related data, multiple derived variables are generated through feature derivation;
[0139] Each derived variable is discretized into multiple groups to obtain binning results, and the monotonicity of the binning results is verified to obtain the verification results; wherein, the binning result is the set after binning each derived variable; each derived variable is independently binned to generate multiple groups; each group corresponds to a feature variable;
[0140] Based on binning results and validation results, feature variables that meet the preset risk control modeling requirements in the binning results are selected to generate a feature set; the selection process includes: data quality selection, business logic selection, and statistical validity selection.
[0141] Data quality screening includes:
[0142] Based on the missing rate of each feature variable in the binning results, feature variables with a missing rate greater than a preset missing rate threshold are removed.
[0143] Based on the number of groups for each feature variable in the binning results, feature variables that have only one group are removed.
[0144] Business logic filtering includes:
[0145] Based on the risk trend of each feature variable in the verification results, feature variables whose risk trends contradict the business logic are eliminated.
[0146] Statistical validity screening includes:
[0147] Based on the information value of each feature variable in the binning results, feature variables with information values less than a preset information value threshold are removed.
[0148] Based on the correlation coefficients between different feature variables in the binning results, variable pairs with correlation coefficients greater than a preset correlation coefficient threshold are identified, and the feature variable with the highest information value is retained in each variable pair while the remaining feature variables are removed.
[0149] Based on the variance inflation factor of each feature variable in the binning results, the collinear variable groups with variance inflation factors greater than a preset threshold are identified, and all feature variables in the collinear variable groups except for the feature variable with the highest information value are removed.
[0150] In this embodiment, feature derivation includes:
[0151] 1) Statistically driven derivation: Calculate the trend of application frequency over the past 3 months, 6 months, and 12 months (e.g., linear growth rate);
[0152] 2) Time-series-oriented derivation: Generate the ratio of the number of applicant institutions in the past 7 days to the number of applicant institutions 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 years old, 30-50 years old, >50 years old), and the average number of overdue payments on platforms within each group is calculated. This ultimately generates 526 derived variables, covering multi-dimensional characteristics of user credit behavior.
[0154] In the process of variable binning, continuous variables are discretized into 3-5 groups, for example:
[0155] 1) Equal frequency binning: Divide the "application amount" 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 number network 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 of each group after binning shows a monotonically increasing or decreasing trend. For example, the "Number of Applicants in the Past 3 Months" after binning should meet the following requirement: the more applications, the higher the bad sample rate; otherwise, readjust the binning boundaries.
[0158] In feature selection, for data quality screening, variables with a missing rate > 99% are removed (e.g., "Operator Type" is removed if most values are empty); variables with only a single value, i.e., a single group (e.g., "Gender" is invalid if all values are male). For business logic screening, feature variables that contradict risk trends and business logic are removed. For example, if the bad sample rate of the "Age < 30 years old" group is lower than that of the "Age > 50 years old" group, contradicting business experience (younger users are at higher risk), then this feature variable is removed. For statistical validity screening, feature variables with an information value ≥ 0.02 are retained, and low predictive power 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; redundant feature variables other than the highest information value are removed from variable groups with a variance inflation factor > 10.
[0159] After the above screening, 159 feature variables were retained to form a feature set that meets the preset risk control modeling requirements.
[0160] Finally, the feature set was divided into a training set (5600 samples) and a test set (2400 samples) in a 7:3 ratio, as follows:
[0161] Stratified sampling: Ensures that the rate of bad samples is consistent between the training set and the test set (approximately 15%);
[0162] Time window isolation: The application time for test set samples is later than that for training set samples to avoid data leakage.
[0163] In one alternative approach, the steps of constructing an initial classification model based on the training set using a decision tree algorithm, controlling the complexity of the initial classification model through pruning optimization to obtain the target classification model, and extracting the classification rules of each leaf node in the target classification model to form an initial risk control strategy set include:
[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 a node split is less than a preset information entropy threshold, the node splitting stops, and the current node is designated as a leaf node.
[0166] Merge and validate each child node with the same parent node in the initial classification model to form the target classification model; the merging and validation includes:
[0167] Calculate the entropy increase before and after merging. When the entropy increase is less than or equal to the preset entropy increase threshold, treat each child node after merging 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 one alternative approach, the step of calculating a performance metric characterizing the generalization ability of the target classification model using a confusion matrix, based on a test set and the target classification model, includes:
[0171] Based on the test set and the target classification model, classification prediction is performed on each sample in the test set to obtain the prediction result; the prediction result is the predicted label of each sample; each sample consists of multiple credit-related data that have been processed by feature engineering and currently exist in the test set.
[0172] Based on the true and predicted labels in the test set, determine the TP, FN, FP, and TN parameters of the confusion matrix, and construct the confusion matrix; each column of the confusion matrix represents the predicted label, and each row represents the true label;
[0173] Among them, TP parameter is the number of customers whose actual label is bad and whose predicted label is bad; FN parameter is the number of customers whose actual label is bad but whose predicted label is good; FP parameter is the number of customers whose actual label is good but whose predicted label is bad; and TN parameter is the number of customers whose actual label is good and whose predicted label is good.
[0174] The confusion matrix is used to calculate performance metrics, which include the 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 actual overdue customers in the test set that are correctly marked as "bad" by the model.
[0177] FN (False Negative) represents the number of customers who are actually bad customers but are incorrectly predicted as good customers. Example: The number of actual overdue customers incorrectly labeled as "good" by the model.
[0178] FP (False Positive) represents the number of customers who are actually good customers but are incorrectly predicted as bad customers. Example: The number of actual good customers who are incorrectly labeled as "bad" by the model.
[0179] TN (True Negative) represents the number of customers who are actually good customers and are correctly predicted to be good customers. Example: The number of actual normal customers who are correctly labeled as "good" by the model.
[0180] In one alternative approach, the step of selecting classification rules that meet preset conditions as the target risk control strategy set for the target user, based on the ratio of the rule hit rate of bad customers to the overall bad customer rate for each classification rule in the training and test sets, combined with performance metrics, from the initial risk control strategy set includes:
[0181] Calculate the ratio of the rule hit rate of bad customers to the overall bad customer rate for each classification rule in the initial risk control strategy set, in both the training and test sets, to obtain the training set Lift value and test set Lift value for each classification rule; where the rule hit rate of bad customers 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] Remove all classification rules whose Lift value in the test set 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 of each classification rule in the first risk control strategy set, and remove all classification rules whose Lift deviation value is greater than the preset fluctuation threshold to obtain the second risk control strategy set.
[0184] Based on precision, recall, and F1 score, all classification rules in the second risk control strategy set with precision below a preset precision threshold, recall below a preset recall threshold, and F1 score below a preset F1 score threshold were removed, resulting in the following: Figure 3 A set of target risk control strategies for target users.
[0185] In this embodiment, several preset thresholds are used: the preset Lift threshold is 5.0; the preset volatility 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 a preset Lift threshold of 5.0, rules with a significantly higher ability to identify bad customers than randomness can be selected. A Lift value ≥ 5.0 indicates that the probability of a rule hitting a bad customer is more than 5 times the overall bad customer rate (e.g., Rule 7 has a Lift of 6.1), demonstrating the rule's extremely strong risk capture capability. Furthermore, high-Lift rules can directly block high-risk customers, reducing the bad debt rate. For example, Rule 7 has a 94% hit rate for bad customers and only 6% falsely identifies good customers, significantly improving risk control efficiency.
[0187] By setting a preset fluctuation threshold (Lift bias) of 0.5, stable rules that perform consistently on both the training and test sets can be selected. Rules with a preset fluctuation threshold > 0.5 are eliminated to prevent overfitting on the training set and subsequent failure in practical applications. Rules with a preset fluctuation threshold ≤ 0.5 (e.g., rule 4 with a bias of 0.1) indicate consistent performance across different sample sets and are suitable for long-term deployment.
[0188] Setting the accuracy threshold to 75% ensures that a high percentage of customers predicted as bad customers are actually bad customers. An accuracy rate of ≥75% means that at least 75% of blocked customers are indeed bad customers, avoiding the overrejection of good customers (e.g., a test set accuracy of 79% and a false positive rate of 21%). It also reduces customer churn due to false positives and the cost of manual review.
[0189] Setting the recall threshold to 70% ensures that the model can capture most of the actual bad customers. A recall rate of ≥70% means that the model can identify at least 70% of the real bad customers (e.g., a 73% recall rate on the test set), avoiding missing high-risk customers. Combining recall with precision can prevent the model from missing risks due to excessive conservatism.
[0190] Setting the F1 score threshold to 0.7 allows for a comprehensive evaluation 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 an excessively high score for a single metric. A high F1 score reflects the stable performance of the classification model on unknown data, making it suitable for practical business deployments.
[0191] Figure 4 This diagram illustrates the structure of an embodiment of an agricultural machinery leasing pre-loan risk control system 200 provided by the present invention. Figure 4 As shown, the system 200 includes: a preprocessing module 210, a model optimization module 220, an indicator calculation module 230, and a strategy screening module 240;
[0192] The preprocessing 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 the decision tree algorithm, control the complexity of the initial classification model through pruning optimization, obtain the 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 a performance indicator that characterizes 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 hit rate of each classification rule to the overall bad customer rate in the training set and test set in the initial risk control strategy set, and 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 alternative embodiment, the preprocessing module 210 is specifically used for:
[0197] Based on credit-related data, multiple derived variables are generated through feature derivation;
[0198] Each derived variable is discretized into multiple groups to obtain binning results, and the monotonicity of the binning results is verified to obtain the verification results; wherein, the binning result is the set after binning each derived variable; each derived variable is independently binned to generate multiple groups; each group corresponds to a feature variable;
[0199] Based on binning results and validation results, feature variables that meet the preset risk control modeling requirements in the binning results are selected to generate a feature set; the selection process includes: data quality selection, business logic selection, and statistical validity selection.
[0200] Data quality screening includes:
[0201] Based on the missing rate of each feature variable in the binning results, feature variables with a missing rate greater than a preset missing rate threshold are removed.
[0202] Based on the number of groups for each feature variable in the binning results, feature variables that have only one group are removed.
[0203] Business logic filtering includes:
[0204] Based on the risk trend of each feature variable in the verification results, feature variables whose risk trends contradict the business logic are eliminated.
[0205] Statistical validity screening includes:
[0206] Based on the information value of each feature variable in the binning results, feature variables with information values less than a preset information value threshold are removed.
[0207] Based on the correlation coefficients between different feature variables in the binning results, variable pairs with correlation coefficients greater than a preset correlation coefficient threshold are identified, and the feature variable with the highest information value is retained in each variable pair while the remaining feature variables are removed.
[0208] Based on the variance inflation factor of each feature variable in the binning results, the collinear variable groups with variance inflation factors greater than a preset threshold are identified, and all feature variables in the collinear variable groups except for the feature variable with the highest information value are removed.
[0209] In one alternative approach, the model optimization module 220 is specifically used for:
[0210] 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.
[0211] When the current information entropy after a node split is less than a preset information entropy threshold, the node splitting stops, and the current node is designated as a leaf node.
[0212] Merge and validate each child node with the same parent node in the initial classification model to form the target classification model; the merging and validation includes:
[0213] Calculate the entropy increase before and after merging. When the entropy increase is less than or equal to the preset entropy increase threshold, treat each child node after merging 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.
[0214] Based on each leaf node of the target classification model, all classification rules are extracted to form an initial risk control strategy set.
[0215] The technical solution in this embodiment uses a decision tree combined with pruning optimization to construct a classification model to avoid overfitting, uses a confusion matrix to verify the model's generalization performance, and filters high-discrimination rules by the rule hit rate ratio of bad customers, thereby improving the accuracy and stability of bad customer identification, enhancing rule interpretability and business adaptability, and providing reliable decision support.
[0216] The parameters and steps for implementing the corresponding functions of each module in the agricultural machinery leasing pre-loan risk control system 200 of this embodiment can be referred to the parameters and steps in the embodiments of the agricultural machinery leasing pre-loan risk control method above, and will not be repeated here.
[0217] like 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, which is loaded and executed by the processor 320 to enable the electronic device 300 to implement any of the above-mentioned pre-loan risk control methods for agricultural machinery leasing. Specifically:
[0218] The electronic device 300 can vary considerably due to differences in configuration or performance. It may include one or more processors 320 (Central Processing Units, CPUs) and one or more memories 310. The memories 310 store at least one computer program 330, which is loaded and executed by the 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 wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. It may also include other components for implementing device functions, which will not be elaborated upon here.
[0219] An embodiment of the present invention provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to enable the computer to implement 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 read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.
[0221] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. The 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 agricultural machinery leasing pre-loan risk control methods.
[0222] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.
[0223] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product 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. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0225] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A pre-loan risk control method for agricultural machinery leasing, characterized in that, include: The credit-related data of the target user is processed by feature engineering to generate a feature set that meets the preset risk control modeling requirements, and the feature set is divided into a training set and a test set; Based on the training set, an initial classification model is constructed using the decision tree algorithm. The complexity of the initial classification model is controlled by pruning optimization to obtain the 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 performance index characterizing the generalization ability of the target classification model is calculated using the confusion matrix. Based on the initial risk control strategy set, the ratio of the rule hit rate of bad customers to the overall bad customer rate of each classification rule in the training set and the test set, combined with the performance indicators, is used to select classification rules that meet the preset conditions as the target risk control strategy set for the target user. The steps for performing feature engineering on the credit-related data of target users to generate a feature set that meets the preset risk control modeling requirements include: Based on the aforementioned credit-related data, multiple derived variables are generated through feature derivation; Each derived variable is discretized into multiple groups to obtain binning results, and the monotonicity of the binning results is verified to obtain verification results; wherein, the binning results are the sets after binning 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, feature variables that meet the preset risk control modeling requirements in the binning results are selected to generate the feature set; the selection process includes: data quality selection, business logic selection, and statistical validity selection. The data quality screening includes: Based on the missing rate of each feature variable in the binning results, feature variables with a missing rate greater than a preset missing rate threshold are removed. Based on the number of groups for each feature variable in the binning results, feature variables that are grouped into one group are removed; The business logic filtering includes: Based on the risk trend of each feature variable in the verification results, feature variables whose risk trends contradict the business logic are eliminated. The statistical validity screening includes: Based on the information value of each feature variable in the binning results, feature variables whose information value is less than a preset information value threshold are removed. Based on the correlation coefficients between different feature variables in the binning results, variable pairs with correlation coefficients greater than a preset correlation coefficient threshold are identified, and the feature variable with the highest information value is retained in each variable pair while the remaining feature variables are removed. Based on the variance inflation factor of each feature variable in the binning results, determine the collinear variable group whose variance inflation factor is greater than a preset threshold, and remove all feature variables from the collinear variable group except for the feature variable with the highest information value; based on the training set, construct an initial classification model 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, including: 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 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. When the current information entropy after the node split is less than the preset information entropy threshold, the node splitting is stopped, and the current node is taken as the leaf node. 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: Calculate the entropy increase before and after merging; when the entropy increase is less than or equal to a preset entropy increase threshold, treat each child node after merging 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. Based on the initial risk control strategy set, the step of selecting classification rules that meet preset conditions as the target risk control strategy set for the target user, using the ratio of the rule hit rate of bad customers to the overall bad customer rate for each classification rule in the training set and the test set, combined with the performance indicators, includes: Calculate the ratio of the rule hit rate of bad customers to the overall bad customer rate for each classification rule in the initial risk control strategy set in the training set and the test set, respectively, to obtain the training set Lift value and the test set Lift value for each classification rule; wherein, the rule hit rate of bad customers is the ratio of the number of bad customers hit by each classification rule to the total number of customers hit by the rule. Remove all classification rules whose Lift value in the test set is less than a preset Lift threshold to obtain the first risk control strategy set; 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 remove all classification rules whose Lift deviation value is greater than a preset fluctuation threshold to obtain the second risk control strategy set; Based on precision, recall, and F1 score, all classification rules with precision less than a preset precision threshold, recall less than a preset recall threshold, and F1 score less than a preset F1 score threshold are removed from the second risk control strategy set to obtain the target risk control strategy set for the target user.
2. The pre-loan risk control method for agricultural machinery leasing according to claim 1, characterized in that, The steps of calculating a performance index characterizing the generalization ability of the target classification model using a confusion matrix based on the test set and the target classification model include: Based on the test set and the target classification model, 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 consists of multiple credit-related data currently existing in the test set after feature engineering processing; Based on the true labels and predicted labels in the test set, the TP, FN, FP, and TN parameters 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. Wherein, 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. The performance metrics are calculated using the confusion matrix, and the performance metrics include the precision, recall, and F1 score of the target classification model.
3. A pre-loan risk control system for agricultural machinery leasing, characterized in that, include: The module includes a preprocessing module, a model optimization module, an indicator calculation module, and a strategy selection module. The preprocessing module 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; 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 a performance indicator that characterizes 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 ratio of the rule hit rate of bad customers to the overall bad customer rate of each classification rule in the training set and the test set in the initial risk control strategy set, and in combination with the performance indicators, screen classification rules that meet preset conditions as the target risk control strategy set for the target user. The preprocessing module is specifically used for: Based on the aforementioned credit-related data, multiple derived variables are generated through feature derivation; Each derived variable is discretized into multiple groups to obtain binning results, and the monotonicity of the binning results is verified to obtain verification results; wherein, the binning results are the sets after binning 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, feature variables that meet the preset risk control modeling requirements in the binning results are selected to generate the feature set; the selection process includes: data quality selection, business logic selection, and statistical validity selection. The data quality screening includes: Based on the missing rate of each feature variable in the binning results, feature variables with a missing rate greater than a preset missing rate threshold are removed. Based on the number of groups for each feature variable in the binning results, feature variables that are grouped into one group are removed; The business logic filtering includes: Based on the risk trend of each feature variable in the verification results, feature variables whose risk trends contradict the business logic are eliminated. The statistical validity screening includes: Based on the information value of each feature variable in the binning results, feature variables whose information value is less than a preset information value threshold are removed. Based on the correlation coefficients between different feature variables in the binning results, variable pairs with correlation coefficients greater than a preset correlation coefficient threshold are identified, and the feature variable with the highest information value is retained in each variable pair while the remaining feature variables are removed. Based on the variance inflation factor of each feature variable in the binning results, determine the collinear variable group whose variance inflation factor is greater than a preset threshold, and remove all feature variables from the collinear variable group except for the feature variable with the highest information value. 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 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. When the current information entropy after the node split is less than the preset information entropy threshold, the node splitting is stopped, and the current node is taken as the leaf node. The initial classification model is used to merge and validate each child node that shares the same parent node to form the target classification model; the merging and validation includes: Calculate the entropy increase before and after merging; when the entropy increase is less than or equal to a preset entropy increase threshold, treat each child node after merging 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. The strategy filtering module is specifically used for: Calculate the ratio of the rule hit rate of bad customers to the overall bad customer rate for each classification rule in the initial risk control strategy set in the training set and the test set, respectively, to obtain the training set Lift value and the test set Lift value for each classification rule; wherein, the rule hit rate of bad customers is the ratio of the number of bad customers hit by each classification rule to the total number of customers hit by the rule. Remove all classification rules whose Lift value in the test set is less than a preset Lift threshold to obtain the first risk control strategy set; 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 remove all classification rules whose Lift deviation value is greater than a preset fluctuation threshold to obtain the second risk control strategy set; Based on precision, recall, and F1 score, all classification rules with precision less than a preset precision threshold, recall less than a preset recall threshold, and F1 score less than a preset F1 score threshold are removed from the second risk control strategy set to obtain the target risk control strategy set for the target user.
4. An electronic device, characterized in that, The electronic device includes a processor coupled to a memory, the memory storing at least one computer program, which is loaded and executed by the processor to enable the electronic device to implement the pre-loan risk control method for agricultural machinery leasing as described in any one of claims 1 to 2.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to enable the computer-readable storage medium to implement the pre-loan risk control method for agricultural machinery leasing as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Enterprise credit evaluation index system based on big data
CN113011752A
Pre-loan risk evaluation method and device
CN115619539A
Enterprise credit assessment automatic rule mining method and device based on improved decision tree
CN115860918A