Method, device and system for constructing credit risk assessment model and storage medium

By screening relevant features and building an initial credit risk assessment model, and then using simulated annealing algorithm to optimize the model, the shortcomings of traditional credit risk assessment models in feature selection and parameter optimization are solved, and the prediction accuracy of the model is significantly improved.

CN119648382APending Publication Date: 2025-03-18AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411715687.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Traditional credit risk assessment models rely on manual experience or simple statistical methods in feature selection, resulting in a lack of comprehensiveness and accuracy of the model, and are prone to fall into local optimal solutions when optimizing parameters, affecting prediction accuracy.

Method used

By obtaining the training sample set, the Pearson correlation coefficient between each feature and the credit risk score is calculated, the features with correlation coefficient greater than the threshold are selected as input to the initial model, the initial credit risk assessment model is constructed, and the model is iteratively optimized using a simulated annealing algorithm to avoid local optimal solutions.

Benefits of technology

It improves the comprehensiveness and accuracy of the feature selection of the credit risk assessment model, avoids local optimal solutions, and significantly improves the prediction accuracy of the credit risk assessment model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648382A_ABST
    Figure CN119648382A_ABST
Patent Text Reader

Abstract

The invention discloses a method, device and system for constructing a credit risk assessment model and a storage medium. In the scheme, a first training sample set is obtained, and the first training sample set comprises a plurality of first features and credit risk scores corresponding to corresponding samples. A Pearson correlation coefficient between each first feature and the credit risk score is calculated. And screening out a plurality of second features from the plurality of first features based on a Pearson correlation coefficient between each first feature and the credit risk score. And constructing an initial credit risk assessment model based on the plurality of second features. And iteratively optimizing the initial credit risk assessment model based on a simulated annealing algorithm to obtain a final credit risk assessment model. According to the method, feature selection is performed through the Pearson correlation coefficient, and parameter optimization is performed by using the simulated annealing algorithm, so that the selected features are more comprehensive and are prevented from falling into a local optimal solution at the same time, and the accuracy of the high credit risk assessment model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, system and storage medium for constructing a credit risk assessment model. Background Art

[0002] With the rapid development of the financial industry and the increasing complexity of credit business, the importance of credit risk assessment models has become increasingly prominent. Credit risk assessment models provide a key basis for credit decision-making by accurately assessing customer credit risk.

[0003] However, traditional credit risk assessment models often rely on manual experience or simple statistical methods for feature selection, and use traditional machine learning algorithms for parameter optimization. This model construction method not only leads to a lack of comprehensiveness and accuracy in feature selection, but also makes the model prone to local optimal solutions during parameter optimization, thus affecting the prediction accuracy of the credit risk assessment model. Summary of the invention

[0004] Based on the above problems, the present application provides a method, device, system and storage medium for constructing a credit risk assessment model, with the purpose of improving the accuracy of the credit risk assessment model.

[0005] The embodiments of the present application disclose the following technical solutions:

[0006] The first aspect of the present application provides a method for constructing a credit risk assessment model, the method comprising:

[0007] Obtaining a first training sample set; the first training sample set includes a plurality of first training samples, each of which includes a plurality of first features and a credit risk score corresponding to the first training sample, wherein the credit risk score is used to indicate the probability of sample default;

[0008] Calculating a Pearson correlation coefficient between each first feature and the credit risk score based on the first training sample set; the Pearson correlation coefficient indicates a linear correlation between each first feature and the credit risk score;

[0009] Filtering a plurality of second features from the plurality of first features based on the Pearson correlation coefficient between each of the first features and the credit risk score; the second feature being a feature whose Pearson correlation coefficient with the credit risk score is greater than a preset correlation coefficient threshold;

[0010] constructing an initial credit risk assessment model based on the plurality of second features;

[0011] The initial credit risk assessment model is iteratively optimized based on a simulated annealing algorithm to obtain a final credit risk assessment model.

[0012] In a possible implementation, the plurality of second features include numerical features and categorical features; after selecting the plurality of second features from the plurality of first features based on the Pearson correlation coefficient between each of the first features and the credit risk score, the method further includes:

[0013] Extracting the plurality of second features and corresponding credit risk scores from the first training sample set to generate a second training sample set;

[0014] The classification features in the second training sample set are digitally processed to obtain a third training sample set.

[0015] In a possible implementation, the step of constructing an initial credit risk assessment model based on the plurality of second features includes:

[0016] Using the plurality of second features as input features of the initial credit risk assessment model to construct a feature matrix; and using the credit risk score as a label corresponding to the input feature;

[0017] The initial credit risk assessment model is constructed by training the third training sample set using a logistic regression algorithm with minimization of negative log-likelihood loss as the objective function; the specific formula of the objective function θ is:

[0018] θ=∑ n i=0 [y i *log(p i )+(1-y i )*log(1-p i )]

[0019] Wherein, ∑ represents a summation operation, n represents the total number of samples in the third training sample set, i represents the i-th sample in the third training sample set, and y i represents the actual label of the i-th sample in the third training sample set, p i represents the probability of default of the i-th sample in the third training sample set predicted by the initial credit risk assessment.

[0020] In a possible implementation, the iterative optimization of the initial credit risk assessment model based on a simulated annealing algorithm to obtain a final credit risk assessment model includes:

[0021] Calculating a first objective function value under a first parameter combination; the first parameter combination is a current optimal parameter combination of the initial credit risk assessment model;

[0022] Randomly perturbing the first parameter combination to generate a second parameter combination;

[0023] Calculating a second objective function value under the second parameter combination;

[0024] Determine whether to accept the second parameter combination as the current optimal parameter combination based on the first objective function value, the second objective function value and the acceptance probability;

[0025] Repeat the above steps to iterate the simulated annealing algorithm until the termination condition is met, and obtain the final credit risk assessment model based on the current optimal parameter combination when the iteration terminates.

[0026] In a possible implementation manner, determining whether to accept the second parameter combination as the current optimal parameter combination based on the first objective function value, the second objective function value, and the acceptance probability includes:

[0027] If the second objective function value is less than the first objective function value, the second parameter combination is accepted as the current optimal parameter combination, and the corresponding first parameter combination and first objective function value are updated to the second parameter combination and the second objective function value;

[0028] If the second objective function value is greater than the first objective function value, whether to accept the second parameter combination as the current optimal parameter combination is determined according to the acceptance probability; the acceptance probability gradually decreases as the number of iterations increases.

[0029] In a possible implementation, the termination condition includes: the number of iterations of the simulated annealing algorithm reaches a preset termination number of iterations.

[0030] In a possible implementation, the method for constructing a credit risk assessment model further includes:

[0031] Setting credit risk determination thresholds;

[0032] When the output of the credit risk assessment model is greater than the credit risk determination threshold, the credit risk result is determined to be a high credit risk; when the output of the credit risk assessment model is less than the determination threshold, the credit risk assessment result is determined to be a low credit risk;

[0033] The credit risk result is outputted.

[0034] A second aspect of the present application provides a device for constructing a credit risk assessment model, the device comprising:

[0035] A data set acquisition module, used to acquire a first training sample set; the first training sample set includes a plurality of first training samples, each of which includes a plurality of first features and a credit risk score corresponding to the first training sample, wherein the credit risk score is used to indicate the probability of sample default;

[0036] A correlation coefficient calculation module, configured to calculate a Pearson correlation coefficient between each first feature and the credit risk score based on the first training sample set; the Pearson correlation coefficient indicates a linear correlation between each first feature and the credit risk score;

[0037] A second feature extraction module, configured to select a plurality of second features from the plurality of first features based on the Pearson correlation coefficient between each of the first features and the credit risk score; the second feature is a feature whose Pearson correlation coefficient with the credit risk score is greater than a preset correlation coefficient threshold;

[0038] An initial model building module, used to build an initial credit risk assessment model based on the plurality of second features;

[0039] The final model optimization module is used to iteratively optimize the initial credit risk assessment model based on a simulated annealing algorithm to obtain a final credit risk assessment model.

[0040] A third aspect of the present application provides a system for constructing a credit risk assessment model, the system comprising:

[0041] a memory having a computer program stored thereon;

[0042] A processor is used to execute the computer program in the memory to implement the steps of the method for constructing a credit risk assessment model introduced in any implementation manner of the first aspect.

[0043] The fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for constructing a credit risk assessment model introduced in any implementation manner of the first aspect are implemented.

[0044] Compared with the prior art, this application has the following beneficial effects:

[0045] In the technical solution of the present application, firstly, a first training sample set is obtained, and the multiple first training samples in the first training sample set all include multiple first features and the credit risk score corresponding to the first training sample; secondly, the Pearson correlation coefficient between each first feature and the credit risk score is calculated based on the first training sample set; then, multiple second features are selected from the multiple first features based on the Pearson correlation coefficient between each first feature and the credit risk score; then, an initial credit risk assessment model is constructed based on the multiple second features; finally, the initial credit risk assessment model is iteratively optimized based on the simulated annealing algorithm to obtain the final credit risk assessment model. It can be seen that the technical solution of the present application improves the comprehensiveness and accuracy of features and reduces redundant features by adopting the Pearson correlation coefficient for feature selection. At the same time, the simulated annealing algorithm is used to optimize model parameters to avoid local optimal solutions. The accuracy of the credit risk assessment model is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0047] Figure 1 A flow chart of a method for constructing a credit risk assessment model provided in an embodiment of the present application;

[0048] Figure 2 A flow chart of another method for constructing a credit risk assessment model provided in an embodiment of the present application;

[0049] Figure 3 A schematic diagram of the structure of a device for constructing a credit risk assessment model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] As described above, the current method of constructing a credit risk assessment model not only lacks comprehensiveness and accuracy in feature selection, but is also prone to falling into local optimal solutions during parameter optimization, thereby affecting the prediction accuracy of the credit risk assessment model.

[0051] After research, the inventor proposed a method, device, system and storage medium for constructing a credit risk assessment model. First, a first training sample set is obtained, and multiple first training samples in the first training sample set each include multiple first features and the credit risk score corresponding to the first training sample; secondly, the Pearson correlation coefficient between each first feature and the credit risk score is calculated based on the first training sample set; then, multiple second features are selected from the multiple first features based on the Pearson correlation coefficient between each first feature and the credit risk score; then, an initial credit risk assessment model is constructed based on the multiple second features; finally, the initial credit risk assessment model is iteratively optimized based on the simulated annealing algorithm to obtain the final credit risk assessment model.

[0052] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0053] See also Figure 1 , which is a flow chart of a method for constructing a credit risk assessment model provided by an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0054] S101: Obtain a first training sample set.

[0055] In an embodiment of the present application, the first training sample set includes multiple first training samples, each of which includes multiple first features and a credit risk score corresponding to the first training sample. The credit risk score is used to indicate the probability of sample default. The higher the credit risk score, the greater the probability of default of the customer corresponding to the sample, and the lower the credit risk score, the smaller the probability of default of the customer corresponding to the sample. For example, sample A corresponds to customer A, sample B corresponds to customer B, the credit risk score of sample A is 0.8, and the credit risk score of sample B is 0.2, then the probability of default of customer A is higher than the probability of default of customer B.

[0056] The first training sample set includes, but is not limited to, various customer information and financial information, historical credit records and other features, and credit risk scores.

[0057] The customer information includes age, gender, marital status, education, health status, family situation, etc.; financial information includes income, expenditure, loan amount, loan type, repayment record, and financial stability indicators such as debt-to-income ratio, credit card usage rate, asset-liability ratio, and savings rate; historical credit records include. These features are the first features in the first training sample set.

[0058] It should be noted that the customer information involved in this application (including but not limited to customer information (such as age, gender and marital status), financial information (income, expenditure, loan amount and loan type, etc.) and historical credit records, etc.) are all information and data authorized by the customer or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0059] S102: Calculate the Pearson correlation coefficient between each first feature and the credit risk score based on the first training sample set.

[0060] The Pearson correlation coefficient is a statistic used to measure the strength and direction of the linear relationship between two variables. In the embodiment of the present application, the Pearson correlation coefficient indicates the linear correlation between each first feature and the credit risk score.

[0061] In the embodiment of the present application, before calculating the Pearson correlation coefficient, the first training sample set is preprocessed. Specifically, the preprocessing process includes but is not limited to processing missing values, abnormal values ​​and repeated values ​​in the first training sample set.

[0062] In an example implementation, for missing values, a direct deletion operation is taken; for abnormal values ​​that obviously deviate from the normal range, a direct deletion operation is also taken; when duplicate values ​​appear in customer personal information, the duplicate samples are deleted and corresponding merging processing is performed.

[0063] In the embodiment of the present application, the Pearson correlation coefficient between each first feature and the credit risk score is calculated based on the processed first training sample set.

[0064] According to the calculation results, the linear correlation strength between each first feature and the credit risk score can be analyzed. Specifically, a Pearson correlation coefficient close to 1 indicates a positive correlation, that is, an increase in the first feature will lead to an increase in the credit risk score; a Pearson correlation coefficient close to -1 indicates a negative correlation, that is, an increase in the first feature will lead to a decrease in the credit risk score; a Pearson correlation coefficient close to 0 indicates that there is no obvious linear correlation between the first feature and the credit risk score.

[0065] For example, the Pearson correlation coefficient between repayment record and credit risk score is -0.7, indicating that there is a negative correlation between repayment record and credit risk score, which means that a good repayment record will reduce the credit risk score; while the Pearson correlation coefficient between credit card utilization rate and credit risk score is 0.8, indicating that there is a positive correlation between credit card utilization rate and credit risk score, that is, high credit card utilization rate may increase credit risk score.

[0066] In an exemplary implementation, the Pearson correlation coefficient between each first feature and the credit risk score may be calculated using the pandas library.

[0067] S103. Filter out a plurality of second features from the plurality of first features based on the Pearson correlation coefficient between each first feature and the credit risk score.

[0068] In the embodiment of the present application, the second feature is a feature whose Pearson correlation coefficient with the credit risk score is greater than a preset correlation coefficient threshold. The preset correlation coefficient threshold is used to determine which features have a sufficiently strong correlation with the credit risk score.

[0069] In the embodiment of the present application, the correlation coefficient threshold can be set based on experience or statistical test results, and is not specifically limited here.

[0070] The first feature whose Pearson correlation coefficient with the credit risk score calculated in the previous step is greater than a preset correlation coefficient threshold is selected as the second feature.

[0071] In an exemplary implementation, the correlation coefficient threshold is preset to 0.7. The Pearson correlation coefficients between all first features and credit risk scores are traversed, and first features with Pearson correlation coefficients greater than 0.7 are screened out as second features.

[0072] In an example implementation, the screened second features include: income, expenditure, loan amount, loan type, repayment record, debt-to-income ratio, credit card usage rate, repayment record, debt-to-asset ratio, and savings rate.

[0073] S104. Construct an initial credit risk assessment model based on the multiple second features.

[0074] In the embodiment of the present application, an initial credit risk assessment model is constructed based on the second feature selected by the Pearson correlation coefficient.

[0075] The Pearson correlation coefficient is used to effectively screen out the most critical features for constructing a credit risk assessment model, making the feature selection of the credit risk assessment model faster and more accurate, thereby improving the accuracy of the credit risk assessment model.

[0076] S105. Iteratively optimize the initial credit risk assessment model based on a simulated annealing algorithm to obtain a final credit risk assessment model.

[0077] Simulated annealing is a heuristic search algorithm that solves complex optimization problems by simulating the process of slowly cooling a metal after heating to find the lowest energy state.

[0078] In an embodiment of the present application, the initial parameters of the simulated annealing algorithm, such as the initial temperature, cooling rate, and termination conditions, are first set. Then, the global search capability and adaptability to complex problems of the simulated annealing algorithm are utilized to continuously iterate and optimize the initial credit risk assessment model, thereby obtaining a more accurate and stable credit risk assessment model, thereby further improving the efficiency and accuracy of the credit risk assessment model.

[0079] The embodiment of the present application improves the comprehensiveness and accuracy of features and reduces redundant features by performing feature selection through the Pearson correlation coefficient. At the same time, the simulated annealing algorithm is used to optimize model parameters to avoid local optimal solutions, thereby improving the accuracy of the credit risk assessment model as a whole.

[0080] Figure 2 Another method flow chart for constructing a credit risk assessment model provided in an embodiment of the present application. In the embodiment introduced by this figure, a more detailed description is provided for the implementation of the method for constructing a credit risk assessment model.

[0081] like Figure 2 The method for constructing a credit risk assessment model shown includes the following steps:

[0082] S201: Obtain a first training sample set.

[0083] S202: Calculate the Pearson correlation coefficient between each first feature and the credit risk score based on the first training sample set.

[0084] S203. Filter out a plurality of second features from the plurality of first features based on the Pearson correlation coefficient between each first feature and the credit risk score.

[0085] The implementation of S201-S203 is basically the same as S101-S103 in the method embodiment described above, and will not be elaborated here. For related technical implementations, please refer to the introduction and description of S101-S103 above.

[0086] S204: Extract multiple second features and corresponding credit risk scores from the first training sample set to generate a second training sample set.

[0087] In the embodiment of the present application, the plurality of second features include numerical features and category features.

[0088] Numerical features are quantifiable features with numerical magnitudes, and are often used to represent measurable attributes. These features can be integers or floating point numbers, and are often used for numerical calculations and statistical analysis. In credit risk assessment, numerical features may include age, income, and loan amount. These features usually appear in the form of continuous variables.

[0089] Categorical features are features that represent the category or attribute of an object. These features are usually discrete and cannot be directly quantified. Categorical features are usually used to describe the attributes, types, or classifications of objects. In credit risk assessment, categorical features may include gender, marital status, loan type, and repayment record. These features usually appear in the form of text or strings, but before training a machine learning model, they usually need to be encoded (such as one-hot encoding, label encoding, etc.) to convert them into numerical form.

[0090] In an embodiment of the present application, based on the second feature determined in the aforementioned steps, the second feature of each first training sample and the corresponding credit risk score are extracted from the first training sample set to form multiple second training samples, ensuring that each extracted second feature and its corresponding credit risk score correspond one-to-one at the sample level.

[0091] A plurality of second training samples are combined to form a second training sample set.

[0092] S205: Digitally process the classification features in the second training sample set to obtain a third training sample set.

[0093] Since the category features cannot be directly used for subsequent calculations, the category features in the second training sample set need to be digitized.

[0094] In the embodiments of the present application, the category features can be digitized by using methods such as label encoding, one-hot encoding or ordinal encoding. The specific method to be selected depends on the characteristics of the data and the requirements of the task, and is not specifically limited here. For example, one-hot encoding is suitable for situations where the number of categories is small and there is no order relationship between the categories; label encoding is suitable for situations where the number of categories is large but there is an order relationship between the categories; ordinal encoding is suitable for situations where the number of categories is small and there is a clear order relationship between the categories.

[0095] In an example implementation, the categorical features in the second feature are converted into numerical values ​​using label encoding for subsequent model processing. For example, the loan type includes several different values ​​such as "personal loan", "commercial loan" and "mortgage loan". Each different loan type value is assigned a unique integer code, and the loan type value in each sample is replaced with the corresponding integer code, such as replacing "personal loan" with 0, "commercial loan" with 1, "mortgage loan" with 2, etc. In addition, the repayment record includes "number of overdue payments", "repayment status", "repayment amount", "repayment frequency" and "credit rating", among which the repayment status includes "normal repayment", "delayed repayment" and "non-repayment of debts", etc., which can also be processed using label encoding to convert them into numerical values.

[0096] S206: Use the multiple second features as input features of the initial credit risk assessment model, construct a feature matrix, and use the credit risk score as a label corresponding to the input feature.

[0097] In the embodiment of the present application, multiple second features are used as input features of the initial credit risk assessment model. These input features will be organized into a feature matrix, in which each row represents a sample and each column represents a second feature. At the same time, the credit risk score is used as a label corresponding to these input features, and these labels are the output values ​​corresponding to the corresponding samples, which are used to guide the learning of the model during the model training process.

[0098] S207. Using a logistic regression algorithm, an initial credit risk assessment model is constructed by training the third training sample set with minimization of negative log-likelihood loss as the objective function.

[0099] Logistic regression is a widely used classification algorithm, especially for binary classification problems, which can output a probability value between 0 and 1, which is used to represent the probability of individual default. In this scenario, the credit risk score is regarded as the output of a binary classification problem (for example, customers with scores above a certain threshold can be considered high risk, and customers below the threshold can be considered low risk). Our goal is to find a set of weights that minimizes the negative log-likelihood loss between the output of the model (i.e., the predicted credit risk probability) and the actual credit risk score label.

[0100] The specific formula of the objective function θ is as follows

[0101] θ=∑ n i=0 [y i *log(p i )+(1-y i )*log(1-p i )]

[0102] Wherein, ∑ represents a summation operation, n represents the total number of samples in the third training sample set, i represents the i-th sample in the third training sample set, and y i represents the actual label (y i =1 or y i =0), p i represents the probability of default of the i-th sample in the third training sample set predicted by the initial credit risk assessment.

[0103] The meaning of the objective function is: for the actual default sample (y i =1), and we hope that the model predicts the probability p i The larger the better; for the actual non-default sample (y i =0), then we hope that the model predicts the probability (1-p i )The larger the better, so the optimal model parameters are found by minimizing this objective function so that the model can more accurately predict the individual's default probability.

[0104] S208. Calculate a first objective function value under a first parameter combination.

[0105] In the embodiment of the present application, the first parameter combination is the current optimal parameter combination of the initial credit risk assessment model.

[0106] The objective function value (i.e., the first objective function value) is calculated using the objective function formula in step S207 using the current optimal parameter combination (i.e., the first parameter combination) of the initial credit risk assessment model. This objective function value can measure the prediction performance of the model under the current parameter combination.

[0107] S209. Randomly perturb the first parameter combination to generate a second parameter combination.

[0108] In the embodiment of the present application, the first parameter combination is randomly disturbed to generate a new parameter combination (second parameter combination). The disturbance can be adding a small random number to each parameter, or randomly selecting a new value within a certain range.

[0109] In an exemplary implementation, a random number that follows a normal distribution (with a mean of 0 and a variance of a small positive number) may be added to each parameter to generate a second parameter combination.

[0110] S210. Calculate a second objective function value under a second parameter combination.

[0111] In the embodiment of the present application, the initial credit risk assessment model is used to calculate the objective function value (i.e., the second objective function value) under the second parameter combination through the objective function formula in step S207. This objective function value can measure the prediction performance of the model under the second parameter combination.

[0112] S211. Determine whether to accept the second parameter combination as the current optimal parameter combination based on the first objective function value, the second objective function value, and the acceptance probability.

[0113] In the embodiment of the present application, the first objective function value and the second objective function value are compared, and whether to accept the second parameter combination as the new optimal parameter combination is determined according to the acceptance probability of the simulated annealing algorithm. If the second objective function value is smaller (i.e., the model performance is better), it is directly accepted; if the second objective function value is larger, whether to accept is determined according to a gradually decreasing acceptance probability.

[0114] In one example implementation, the acceptance probability is initially 80% and decreases by 5% with each iteration.

[0115] Specifically, if the second objective function value is less than the first objective function value, the second parameter combination is accepted as the current optimal parameter combination, and the corresponding first parameter combination and first objective function value are updated to the second parameter combination and second objective function value.

[0116] If the second objective function value is greater than the first objective function value, it is determined whether to accept the second parameter combination as the current optimal parameter combination according to the acceptance probability.

[0117] The acceptance probability decreases gradually as the number of iterations increases.

[0118] S212, repeat the above steps to perform simulated annealing algorithm iteration until the termination condition is met, and obtain the final credit risk assessment model based on the current optimal parameter combination when the iteration terminates.

[0119] In the embodiment of the present application, steps S209 to S211 are continuously repeated until a termination condition is met.

[0120] Optionally, the termination condition may be that the number of iterations of the simulated annealing algorithm reaches a preset termination number of iterations, or the temperature of the simulated annealing algorithm drops to a termination temperature.

[0121] In an example implementation, a maximum number of iterations is set to 15 as the termination condition. In each iteration, a new parameter combination is generated according to steps S209 to S211, the objective function value is calculated, and whether to accept the new parameter combination is determined based on the acceptance probability. When the number of iterations reaches 15, the algorithm stops and outputs the current optimal parameter combination as the final credit risk assessment model.

[0122] Optionally, the method for constructing a credit risk assessment model further includes:

[0123] Set a credit risk determination threshold;

[0124] When the output of the credit risk assessment model is greater than the credit risk determination threshold, the credit risk result is determined to be a high credit risk; when the output of the credit risk assessment model is less than the determination threshold, the credit risk assessment result is determined to be a low credit risk;

[0125] In an example implementation, since the credit risk assessment model is a logistic regression model, its output is a probability value between 0 and 1, indicating the probability of a customer defaulting. A credit risk determination threshold can be set according to business requirements, for example, the credit risk determination threshold is set to 0.5. This means that if the output probability of the credit risk assessment model is greater than 0.5, the customer's credit risk will be determined to be high; if the output probability is less than 0.5, the customer's credit risk will be determined to be low.

[0126] The output probability value is compared with the judgment threshold to obtain the judgment result of the credit risk and output the credit risk result.

[0127] The embodiment of the present application effectively improves the accuracy and reliability of the credit risk assessment model by using the Pearson correlation coefficient to screen the second feature and construct a second training sample set. The initial credit risk assessment model is constructed using a logistic regression algorithm, and the model parameters are optimized using a simulated annealing algorithm, so that the model can better fit the actual data while avoiding falling into a local optimal solution, reducing the prediction error and improving the accuracy of the credit risk assessment model. By setting a credit risk determination threshold, the output of the model is converted into a specific credit risk determination result, making the output more intuitive and clear.

[0128] Based on the method for constructing a credit risk assessment model provided in the aforementioned embodiment, the present application also provides a device for constructing a credit risk assessment model. Figure 3 A schematic diagram of a structure of a device for constructing a credit risk assessment model provided in an embodiment of the present application. Figure 3 As shown, the device for constructing a credit risk assessment model includes: a data set acquisition module 301, a correlation coefficient calculation module 302, a second feature extraction module 303, an initial model construction module 304 and a final model optimization module 305.

[0129] The data set acquisition module 301 is used to acquire a first training sample set; the first training sample set includes multiple first training samples, each of which includes multiple first features and a credit risk score corresponding to the first training sample, and the credit risk score is used to indicate the probability of sample default.

[0130] In the embodiment of the present application, the data set acquisition module 301 is responsible for collecting the first training sample set from the data source. The first training sample set contains a large amount of historical credit data, and each first training sample records in detail multiple first characteristics of the customer (such as age, income, marital status, loan type, etc.) and the corresponding credit risk score. The credit risk score is a value between 0 and 1 that is used to quantify the possibility of customer default. For example, the closer the score is to 1, the higher the risk of customer default; the closer the score is to 0, the lower the risk.

[0131] A correlation coefficient calculation module 302 is used to calculate the Pearson correlation coefficient between each first feature and the credit risk score based on the first training sample set; the Pearson correlation coefficient indicates the linear correlation between each first feature and the credit risk score;

[0132] In the embodiment of the present application, the correlation coefficient calculation module 302 receives the first training sample set obtained by the data set acquisition module 301 as input, and calculates the linear correlation between each first feature and the credit risk score using the Pearson correlation coefficient formula. The Pearson correlation coefficient is a value between -1 and 1, which is used to measure the strength and direction of the linear relationship between two variables.

[0133] The correlation coefficient calculation module 302 calculates the correlation coefficients between all first features and credit risk scores and outputs these coefficients for subsequent analysis.

[0134] A second feature extraction module 303 is used to select a plurality of second features from a plurality of first features based on the Pearson correlation coefficient between each first feature and the credit risk score; the second feature is a feature whose Pearson correlation coefficient with the credit risk score is greater than a preset correlation coefficient threshold;

[0135] In the embodiment of the present application, the second feature extraction module 303 selects features that have a significant linear correlation with the credit risk score, i.e., the second features, based on the output of the correlation coefficient calculation module 302. These features are those whose Pearson correlation coefficient with the credit risk score is greater than a preset correlation coefficient threshold. For example, if the correlation coefficient threshold is set to 0.7, the module 303 will select all features with a correlation coefficient greater than 0.7 with the credit risk score as the second features.

[0136] An initial model building module 304, used to build an initial credit risk assessment model based on a plurality of second features;

[0137] In the embodiment of the present application, the initial model construction module 304 uses the second feature extracted by the second feature extraction module 303 as an input feature to construct an initial credit risk assessment model. The model can be a logistic regression model, a decision tree model, or other types of classification models, which are not specifically limited here. The initial model construction module 304 organizes the second features into a feature matrix, and uses the credit risk score as a label, and then uses these data to train the model. After the training is completed, the initial model construction module 304 outputs the initial credit risk assessment model.

[0138] The final model optimization module 305 is used to iteratively optimize the initial credit risk assessment model based on the simulated annealing algorithm to obtain the final credit risk assessment model.

[0139] In the embodiment of the present application, the final model optimization module 305 uses a simulated annealing algorithm to iteratively optimize the initial credit risk assessment model. The final model optimization module 305 first sets the initial parameters of the algorithm, such as the initial temperature, the cooling rate, and the termination condition. Then, it starts the iterative process, and as the number of iterations increases, the algorithm gradually converges to the optimal parameter combination, thereby obtaining the final credit risk assessment model.

[0140] Optionally, the plurality of second features include numerical features and categorical features, and the device for constructing a credit risk assessment model further includes:

[0141] A second training sample set generating module, used for extracting a plurality of second features and corresponding credit risk scores from the first training sample set to generate a second training sample set;

[0142] The digital processing module is used to digitally process the classification features in the second training sample set to obtain a third training sample set.

[0143] Optionally, the initial model building module 304 is specifically used for:

[0144] The plurality of second features are used as input features of the initial credit risk assessment model to construct a feature matrix; the credit risk score is used as a label corresponding to the input feature; a logistic regression algorithm is used to minimize the negative log-likelihood loss as the objective function to construct the initial credit risk assessment model by training the third training sample set.

[0145] Optionally, the final model optimization module 305 is specifically used for:

[0146] Calculating a first objective function value under a first parameter combination; the first parameter combination is a current optimal parameter combination of the initial credit risk assessment model;

[0147] Randomly perturbing the first parameter combination to generate a second parameter combination;

[0148] Calculate the second objective function value under the second parameter combination;

[0149] Determine whether to accept the second parameter combination as the current optimal parameter combination based on the first objective function value, the second objective function value and the acceptance probability;

[0150] Repeat the above steps to iterate the simulated annealing algorithm until the termination condition is met, and obtain the final credit risk assessment model based on the current optimal parameter combination when the iteration terminates.

[0151] Optionally, determining whether to accept the second parameter combination as the current optimal parameter combination based on the first objective function value, the second objective function value, and the acceptance probability includes:

[0152] If the second objective function value is less than the first objective function value, the second parameter combination is accepted as the current optimal parameter combination, and the corresponding first parameter combination and first objective function value are updated to the second parameter combination and the second objective function value;

[0153] If the second objective function value is greater than the first objective function value, then whether to accept the second parameter combination as the current optimal parameter combination is determined according to the acceptance probability; the acceptance probability gradually decreases as the number of iterations increases.

[0154] Optionally, the termination condition includes: the number of iterations of the simulated annealing algorithm reaches a preset termination number of iterations.

[0155] Optionally, the device for constructing a credit risk assessment model also includes a result judgment module, which is used to set a credit risk judgment threshold; when the output of the credit risk assessment model is greater than the credit risk judgment threshold, the credit risk result is judged as a high credit risk; when the output of the credit risk assessment model is less than the judgment threshold, the credit risk assessment result is judged as a low credit risk; and the credit risk result is output.

[0156] In addition, an embodiment of the present application also provides a system for constructing a credit risk assessment model. The system for constructing a credit risk assessment model includes a processor and a memory.

[0157] The memory is used to store program codes and transmit the program codes to the processor;

[0158] The processor is used to execute the steps of the method for constructing a credit risk assessment model introduced in any of the above method embodiments according to the instructions in the program code.

[0159] In addition, an embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the program is executed by a processor, the method for constructing a credit risk assessment model as described in any of the method embodiments is implemented.

[0160] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0161] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for constructing a credit risk assessment model, characterized in that: The method comprises: Obtaining a first training sample set; the first training sample set includes a plurality of first training samples, each of which includes a plurality of first features and a credit risk score corresponding to the first training sample, wherein the credit risk score is used to indicate the probability of sample default; Calculating a Pearson correlation coefficient between each first feature and the credit risk score based on the first training sample set; the Pearson correlation coefficient indicates a linear correlation between each first feature and the credit risk score; Filtering a plurality of second features from the plurality of first features based on the Pearson correlation coefficient between each of the first features and the credit risk score; the second feature being a feature whose Pearson correlation coefficient with the credit risk score is greater than a preset correlation coefficient threshold; constructing an initial credit risk assessment model based on the plurality of second features; The initial credit risk assessment model is iteratively optimized based on a simulated annealing algorithm to obtain a final credit risk assessment model.

2. The method according to claim 1, characterized in that The plurality of second features include numerical features and categorical features; after selecting a plurality of second features from the plurality of first features based on the Pearson correlation coefficient between each of the first features and the credit risk score, the method further includes: Extracting the plurality of second features and corresponding credit risk scores from the first training sample set to generate a second training sample set; The classification features in the second training sample set are digitally processed to obtain a third training sample set.

3. The method according to claim 2, characterized in that The constructing an initial credit risk assessment model based on the plurality of second features comprises: Using the plurality of second features as input features of the initial credit risk assessment model to construct a feature matrix; and using the credit risk score as a label corresponding to the input feature; The initial credit risk assessment model is constructed by training the third training sample set using a logistic regression algorithm with minimization of negative log-likelihood loss as the objective function; the specific formula of the objective function θ is: θ=∑ n i=0 [y i *log(p i )+(1-y i )*log(1-p i )] Wherein, ∑ represents a summation operation, n represents the total number of samples in the third training sample set, i represents the i-th sample in the third training sample set, and y i represents the actual label of the i-th sample in the third training sample set, p i represents the probability of default of the i-th sample in the third training sample set predicted by the initial credit risk assessment.

4. The method according to claim 3, characterized in that: The iterative optimization of the initial credit risk assessment model based on the simulated annealing algorithm to obtain the final credit risk assessment model includes: Calculating a first objective function value under a first parameter combination; the first parameter combination is a current optimal parameter combination of the initial credit risk assessment model; Randomly perturbing the first parameter combination to generate a second parameter combination; Calculating a second objective function value under the second parameter combination; Determine whether to accept the second parameter combination as the current optimal parameter combination based on the first objective function value, the second objective function value and the acceptance probability; Repeat the above steps to iterate the simulated annealing algorithm until the termination condition is met, and obtain the final credit risk assessment model based on the current optimal parameter combination when the iteration terminates.

5. The method according to claim 4, characterized in that The determining whether to accept the second parameter combination as the current optimal parameter combination based on the first objective function value, the second objective function value and the acceptance probability includes: If the second objective function value is less than the first objective function value, the second parameter combination is accepted as the current optimal parameter combination, and the corresponding first parameter combination and first objective function value are updated to the second parameter combination and the second objective function value; If the second objective function value is greater than the first objective function value, whether to accept the second parameter combination as the current optimal parameter combination is determined according to the acceptance probability; the acceptance probability gradually decreases as the number of iterations increases.

6. The method according to claim 4, characterized in that The termination condition includes: the number of iterations of the simulated annealing algorithm reaches a preset termination number of iterations.

7. The method according to claim 1, characterized in that The method further comprises: Setting credit risk determination thresholds; When the output of the credit risk assessment model is greater than the credit risk determination threshold, the credit risk result is determined to be a high credit risk; when the output of the credit risk assessment model is less than the determination threshold, the credit risk assessment result is determined to be a low credit risk; The credit risk result is outputted.

8. A device for constructing a credit risk assessment model, characterized in that: The device comprises: A data set acquisition module, used to acquire a first training sample set; the first training sample set includes a plurality of first training samples, each of which includes a plurality of first features and a credit risk score corresponding to the first training sample, wherein the credit risk score is used to indicate the probability of sample default; A correlation coefficient calculation module, configured to calculate a Pearson correlation coefficient between each first feature and the credit risk score based on the first training sample set; the Pearson correlation coefficient indicates a linear correlation between each first feature and the credit risk score; A second feature extraction module, configured to select a plurality of second features from the plurality of first features based on the Pearson correlation coefficient between each of the first features and the credit risk score; the second feature is a feature whose Pearson correlation coefficient with the credit risk score is greater than a preset correlation coefficient threshold; An initial model building module, used to build an initial credit risk assessment model based on the plurality of second features; The final model optimization module is used to iteratively optimize the initial credit risk assessment model based on a simulated annealing algorithm to obtain a final credit risk assessment model.

9. A system for constructing a credit risk assessment model, characterized in that: The system comprises: a memory having a computer program stored thereon; A processor is used to execute the computer program in the memory to implement the steps of the method for constructing a credit risk assessment model according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for constructing a credit risk assessment model described in any one of claims 1 to 7 are implemented.