Credit model updating method and device, equipment, storage medium and program product
By updating the default score threshold and weight parameters, using the method of maximizing KS statistics, the problem of sorting and stability of the credit score model is solved, and the high accuracy and stability of the credit score model is achieved.
Patent Information
- Application Number
- CN202411271491.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-06
AI Technical Summary
The existing credit scoring model is difficult to sort users according to the default risk during training, and the stability and accuracy are insufficient, mainly because the cross-entropy loss and mean square error loss functions are sensitive to outliers and the punishment for prediction errors. Does not match the actual demand in the credit scoring field.
The default score threshold and weight parameters are updated using the method of maximizing KS statistics. By constructing an estimator formula for maximizing KS statistics, iteratively updates the target model, ensuring that the model can effectively distinguish between defaulted and undefaulted users, and improve the credit score. accuracy.
It realizes stable and accurate sorting of users according to the default risk, improves the stability and accuracy of the credit model, and ensures the application effect of the target model in the credit scoring field.
Smart Images

Figure CN119090625A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of model training technology, and in particular to a credit model updating method, device, equipment, storage medium and program product. Background Art
[0002] Credit scoring refers to the activity of quantitatively evaluating the risk of default when an individual repays a loan. In related technologies, logistic regression models, tree-based methods (CART, XGBoost, LightGBM), neural network models, etc. are used to model credit scores to assess the possibility of creditors suffering losses due to borrowers' failure to perform their obligations and assist in decision-making.
[0003] However, the above schemes all use cross entropy loss, mean square error loss, etc. as loss functions for model training. During the training process, they pay more attention to the classification accuracy of the model and focus on modeling the difference between the predicted value and the true value, ignoring the need for the credit scoring model to correctly sort users according to the size of the default risk; the calculation of cross entropy loss involves logarithmic operations, which will amplify the gap between the predicted value and the true value. The mean square error squares the error of each sample and is sensitive to outliers during model training. The credit scoring field has many users and diverse data sources, which will generate a large number of outliers and affect the stability of the model; moreover, cross entropy loss and mean square error loss are both symmetric loss functions. When a prediction error occurs, the same penalty is given regardless of whether the target customer is high-quality or not. However, in the credit scoring field, if a prediction error occurs for a non-high-quality customer, it will generally cause greater losses. Therefore, the credit scoring model trained by the above scheme does not match the target demand in the credit scoring field, affecting the accuracy of the prediction.
[0004] Therefore, there is an urgent need for a credit model updating method that can sort users according to their default risk and has good stability and high accuracy. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a credit model updating method, device, equipment, storage medium and program product to solve the problem in the related art that it is difficult to sort users according to the size of default risk when training the credit scoring model, and the stability and accuracy are poor.
[0006] In a first aspect, the present invention provides a credit model updating method, the method comprising:
[0007] Obtaining credit default data; the credit default data includes user information and default status;
[0008] Based on the credit default data, a KS statistic is constructed; the KS statistic is used to indicate the accuracy of the target model in judging user default; the KS statistic includes a default score threshold of the target model and a weight parameter of the target model;
[0009] Taking the maximum KS statistic as the first update target, updating the default score threshold to obtain a target threshold;
[0010] The maximum KS statistic is used as the second update target, and the weight parameter is updated to obtain an updated target model to determine the user's credit score.
[0011] In an optional implementation, the KS statistic is:
[0012]
[0013] Among them, n 0 is the number of defaulting users, n 1 is the number of non-defaulting users, y i Used to indicate whether the i-th user has breached the contract, y i =1 means no default, y i =0 means default; x i ′ is used to indicate the credit default data of the i-th user; β is the weight parameter representing the target model; t is the default score threshold, which is used to divide the predicted value output by the target model into two categories. A predicted value less than t represents no default, and a predicted value greater than t represents a default; x i ′β is used to indicate the user score, which is inversely proportional to the default risk; It is used to indicate the proportion of user defaults correctly judged by the target model; It indicates the proportion of users who are not actually in default and are mistakenly judged as having defaulted by the target model.
[0014] In an optional implementation, before updating the default score threshold by taking the maximum KS statistic as the first update target, the method further includes:
[0015] Construct an estimator that maximizes the KS(β) statistic The formula is as follows:
[0016]
[0017] in, The initial value is set to is the least squares estimate of β.
[0018] In an optional implementation, taking the maximum KS statistic as the first update target and updating the default score threshold to obtain a target threshold includes:
[0019] To maximize The target threshold t (0) As the first update target, let the piecewise function about t be The candidate value sequence of the cutoff point in, is the user score of the i-th user;
[0020] The candidate value sequence of the truncation point τ 0 Arrange in ascending order to obtain a sorted sequence of candidate cutoff point values Among them, the user score Arrange from small to large;
[0021] by As the initial value, it is iteratively updated by the following formula
[0022]
[0023] when When the maximum value is reached, the user score at that time As the target threshold t (0) .
[0024] In an optional implementation, taking the maximum KS statistic as the second update target and updating the weight parameter includes:
[0025] Update β one by one, Used to indicate the weight parameter after the sth iteration,
[0026] It is used to indicate that the first k-1 variables have been updated at the sth iteration. Then the steps to update the kth variable are as follows:
[0027] Step A1: Record the set of truncation points D s,k The following formula:
[0028]
[0029] in, is the i-th cutoff point at the s-th iteration, t (s) is the current threshold, is the coefficient related to the current feature and the previous feature, x ik is the characteristic value of the user data,
[0030] Step A2: Set the truncation point set Ds,k Sort the elements in ascending order, and we get
[0031] Step A3: When i=1, calculate and
[0032] When i∈[2,n], update by the following grid search rule and
[0033]
[0034]
[0035] Scenario 1:
[0036] Scenario 2:
[0037] Scenario 3:
[0038] Scenario 4:
[0039] Scenario 5:
[0040] Scenario 6:
[0041] Scenario 7:
[0042] Scenario 8:
[0043] In all cases other than cases 1 to 8, and
[0044] Step A4: Calculation make make
[0045] Step A5: Repeat steps A1 to A4 to obtain the weight parameter β (s+1) .
[0046] In an optional implementation, obtaining the updated target model includes:
[0047] Repeat the steps of taking the maximum KS statistic as the first update target, updating the default score threshold, and obtaining the target threshold, and steps A1 to A5, until the target model converges; wherein the target model convergence condition is as follows:
[0048] |1-β (s-1) ′β (s) |<10 -6 ;
[0049] Get the estimator when the model converges The estimator used when the model converges is The target model is updated to obtain an updated target model.
[0050] In a second aspect, the present invention provides a credit model updating device, the device comprising:
[0051] A data acquisition module, used to acquire credit default data; the credit default data includes user information and default conditions;
[0052] A KS construction module is used to construct a KS statistic based on the credit default data; the KS statistic is used to indicate the accuracy of the target model in judging user default; the KS statistic includes a default score threshold of the target model and a weight parameter of the target model;
[0053] A target threshold acquisition module, configured to update the default score threshold with the maximum KS statistic as the first update target, so as to obtain a target threshold;
[0054] The target model updating module is used to update the weight parameters with the maximum KS statistic as the second update target to obtain an updated target model to determine the user's credit score.
[0055] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the credit model updating method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0056] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the credit model updating method of the first aspect or any corresponding embodiment thereof.
[0057] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the credit model updating method of the first aspect or any corresponding embodiment thereof.
[0058] The technical solution provided by the present invention may include the following beneficial effects:
[0059] The credit model updating method provided by the present invention maximizes the KS statistic by selecting an optimal default score threshold, thereby ensuring that the target model can effectively distinguish between defaulting and non-defaulting users. After determining the optimal target threshold, the weight parameters of the model are further adjusted to achieve a higher KS statistic, which can make the sorting ability of the target model and the accuracy of judgment in subsequent applications stronger. When updating the credit model, users can be sorted according to the size of the default risk with good stability and high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0061] Figure 1 is a flow chart of a credit model updating method according to an embodiment of the present invention;
[0062] Figure 2 is a flow chart of another credit model updating method according to an embodiment of the present invention;
[0063] Figure 3 is a structural block diagram of a credit model updating device according to an embodiment of the present invention;
[0064] Figure 4 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0066] According to an embodiment of the present invention, an embodiment of a credit model updating method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0067] In this embodiment, a credit model updating method is provided, which can be used in laptop computers, desktop computers, servers, etc. Figure 1 is a flow chart of a credit model updating method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0068] Step S101, obtaining credit default data.
[0069] Credit default data includes user information and default situations. For example, user information includes demographic data and financial data. Demographic data includes gender, education level, marital status, age, etc. Financial data includes bill statements, loan repayment history, etc. Default situations are used to indicate whether a user has defaulted within a period of time, such as whether a default has occurred in the past year and the number of defaults.
[0070] Optionally, the credit default data is obtained through historical records or third-party credit agencies. After obtaining the credit default data, the credit default data is preprocessed, such as performing data cleaning and deduplication operations, and re-encoding the user information in a one-hot manner, so that each item contained in the user information corresponds to a separate code to indicate the current status, such as a code corresponding to gender, with the code M representing male and W representing female.
[0071] Step S102, constructing a KS statistic based on the credit default data.
[0072] The KS (Kolmogorov-Smirnov test) statistic is used to indicate the accuracy of the target model in judging user default. The target model can adopt a credit model with a credit scoring function in the relevant technology. The KS statistic includes the default scoring threshold of the target model and the weight parameter of the target model. The default scoring threshold is used to distinguish between defaulting users and non-defaulting users. For example, users who reach the default scoring threshold are defaulting users. The weight parameter affects the performance of the model in credit scoring. The more accurate the weight parameter, the higher the accuracy of the model in credit scoring.
[0073] Step S103, taking the maximum KS statistic as the first update target, updating the default score threshold to obtain a target threshold.
[0074] The goal of this step is to find an optimal default score threshold through algorithm iteration to maximize the KS statistic (reach the maximum value). The target threshold is the default score threshold that maximizes the KS statistic. By selecting an optimal default score threshold to maximize the KS statistic, it is ensured that the target model can effectively distinguish between defaulting and non-defaulting users.
[0075] Step S104, taking the maximum KS statistic as the second update target, updating the weight parameters, and obtaining an updated target model to determine the user's credit score.
[0076] After obtaining the target threshold, the algorithm will continue to iterate and update the weight parameters of the target model to further maximize the KS statistic. Exemplarily, the target model is iteratively updated by an iterative marginal optimization algorithm or other optimization algorithms, and the value of the weight parameter is continuously adjusted during the iteration process, so that the KS statistic gradually increases until the KS statistic no longer increases significantly and the target model converges.
[0077] After the optimal target threshold is determined in step S103, the weight parameters of the model are further adjusted to achieve a higher KS statistic, which can enhance the sorting capability of the target model and the accuracy of judgment in subsequent applications.
[0078] The credit model updating method provided in this embodiment maximizes the KS statistic by selecting an optimal default score threshold, thereby ensuring that the target model can effectively distinguish between defaulting and non-defaulting users. After determining the optimal target threshold, the weight parameters of the model are further adjusted to achieve a higher KS statistic, which can make the sorting ability of the target model and the accuracy of judgment in subsequent applications stronger. When updating the credit model, users can be sorted according to the size of the default risk with good stability and high accuracy.
[0079] In this embodiment, a credit model updating method is provided, which can be used in laptop computers, desktop computers, servers, etc. Figure 2 is a flow chart of a credit model updating method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0080] Step S201, obtaining credit default data.
[0081] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0082] Step S202, constructing a KS statistic based on the credit default data.
[0083] The KS statistic is used to measure the maximum difference between two cumulative distribution functions. In this embodiment, the KS statistic is used to indicate the accuracy of the target model in judging user default. The KS statistic includes the default score threshold of the target model and the weight parameter of the target model.
[0084] Optionally, the KS statistic is:
[0085]
[0086] Among them, n 0 is the number of defaulting users, n 1 is the number of non-defaulting users, y i Used to indicate whether the i-th user has breached the contract, y i =1 means no default, y i =0 means default; x i ′ is used to indicate the credit default data of the i-th user; β is the weight parameter representing the target model; t is the default score threshold, which is used to divide the predicted value output by the target model into two categories. A predicted value less than t represents no default, and a predicted value greater than t represents a default; x i ′β is used to indicate the user score, which is inversely proportional to the default risk; It is used to indicate the proportion of user defaults correctly judged by the target model; It indicates the proportion of users who are not actually in default and are mistakenly judged as having defaulted by the target model.
[0087] Step S203, constructing an estimator for indicating the maximum KS statistic.
[0088] Construct an estimator that maximizes the KS(β) statistic The formula is as follows:
[0089]
[0090] in, The initial value is set to is the least squares estimate (MLE) of β, After standardization, we get The initial value of .
[0091] Step S204, taking the maximum KS statistic as the first update target, updating the default score threshold to obtain a target threshold.
[0092] Specific, to maximize The target threshold t (0) As the first update target, let the piecewise function about t be The candidate value sequence of the cutoff point Among them, the cutoff point is used to select possible target thresholds, is the user score of the ith user.
[0093] The candidate value sequence of the truncation point τ 0 Arrange in ascending order to obtain a sorted sequence of candidate cutoff point values Among them, the user score Arrange from small to large;
[0094] In getting τ 0After that, the algorithm starts from the smallest Start by calculating the KS statistic step by step and find the threshold t that maximizes KS (0) Specifically, Initially, the KS statistic is updated at each user score and iteratively updated using the following formula
[0095]
[0096] If the current sample is a default user (i.e. y (i) =0), the KS statistic increases by one If the current sample is a non-default user (i.e., y (i) =1), the KS statistic decreases by one when When the maximum value is reached, the user score at that time As the target threshold t (0) .
[0097] By choosing the optimal threshold t (0) , step 204 maximizes the KS statistic under the current parameters and provides a direction for the subsequent updating of the weight parameters, so that in the next iteration, the model can better distinguish between defaulting users and non-defaulting users.
[0098] Step S205, taking the maximum KS statistic as the second update target, updating the weight parameters, and obtaining an updated target model to determine the user's credit score.
[0099] Update β one by one, Used to indicate the weight parameter after the sth iteration, It is used to indicate that the first k-1 variables have been updated at the sth iteration. Then the steps to update the kth variable are as follows:
[0100] Step A1: Record the set of truncation points D s,k The following formula:
[0101]
[0102] in, is the i-th cutoff point at the s-th iteration, t (s) is the current threshold, is the coefficient related to the current feature and the previous feature, x ik is the characteristic value of the user data,
[0103] The cutoff point is used to divide the data into different intervals in order to calculate the KS statistic;
[0104] Step A2: Set the truncation point set D s,k Sort the elements in ascending order, and we get In order to perform iterative calculations in the next steps;
[0105] Step A3: After finding the cutoff point, calculate the initial value of the KS statistic, which is divided into two parts, It indicates the proportion of users’ defaults correctly judged by the model, It indicates the proportion of users who have not actually defaulted that the model incorrectly judges to have defaulted.
[0106] Initially, when i=1, calculate and
[0107] Next, a grid search is performed on each element in the cutoff point set, and the KS statistic is gradually updated to find the maximum Specifically, when i∈[2,n], update by the following grid search rule and
[0108]
[0109] Scenario 1:
[0110] Scenario 2:
[0111] Scenario 3:
[0112] Scenario 4:
[0113] Scenario 5:
[0114] Scenario 6:
[0115] Scenario 7:
[0116] Scenario 8:
[0117] In all cases except cases 1 to 8, keep and
[0118] Step A4: Calculation make make
[0119] Step A5: Repeat steps A1 to A4 to obtain the parameter that can maximize the KS statistic as the weight parameter β(s+1) .
[0120] The steps to update the target model are:
[0121] Repeat step S204 and step S205 until the target model converges to a value less than a preset threshold and then stops iterating. -6 , then the target model convergence condition is as follows:
[0122] |1-β (s-1) ′β (s) |<10 -6 .
[0123] Get the estimator when the model converges Use the estimator when the model converges The target model is updated to obtain an updated target model.
[0124] The credit model updating method provided in this embodiment maximizes the KS statistic by selecting an optimal default score threshold, thereby ensuring that the target model can effectively distinguish between defaulting and non-defaulting users. After determining the optimal target threshold, the weight parameters of the model are further adjusted to achieve a higher KS statistic, which can make the sorting ability of the target model and the accuracy of judgment in subsequent applications stronger. When updating the credit model, users can be sorted according to the size of the default risk with good stability and high accuracy.
[0125] In this embodiment, a credit model updating device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0126] This embodiment provides a credit model updating device, such as Figure 3 As shown, including:
[0127] Data acquisition module 301, used to acquire credit default data; credit default data includes user information and default status;
[0128] A KS construction module 302 is used to construct a KS statistic based on the credit default data; the KS statistic is used to indicate the accuracy of the target model in judging user default; the KS statistic includes the default score threshold of the target model and the weight parameter of the target model;
[0129] A target threshold acquisition module 303 is used to update the default score threshold with the maximum KS statistic as the first update target to obtain a target threshold;
[0130] The target model updating module 304 is used to update the weight parameters with the maximum KS statistic as the second update target, and obtain an updated target model to determine the credit score of the user.
[0131] In an optional implementation, the KS statistic is:
[0132]
[0133] Among them, n 0 is the number of defaulting users, n 1 is the number of non-defaulting users, y i Used to indicate whether the i-th user has breached the contract, y i =1 means no default, y i =0 means default; x i ′ is used to indicate the credit default data of the i-th user; β is the weight parameter representing the target model; t is the default score threshold, which is used to divide the predicted value output by the target model into two categories. A predicted value less than t represents no default, and a predicted value greater than t represents a default; x i ′β is used to indicate the user score, which is inversely proportional to the default risk; It is used to indicate the proportion of user defaults correctly judged by the target model; It indicates the proportion of users who are not actually in default and are mistakenly judged as having defaulted by the target model.
[0134] In an optional implementation, before updating the default score threshold with the maximum KS statistic as the first update target, the method further includes:
[0135] Construct an estimator that maximizes the KS(β) statistic The formula is as follows:
[0136]
[0137] in, The initial value is set to is the least squares estimate of β.
[0138] In an optional implementation, taking the maximum KS statistic as the first update target, updating the default score threshold to obtain the target threshold includes:
[0139] To maximize The target threshold t (0) As the first update target, let the piecewise function about t be The candidate value sequence of the cutoff point in, is the user score of the i-th user;
[0140] The candidate value sequence of the truncation point τ 0 Arrange in ascending order to obtain a sorted sequence of candidate cutoff point values Among them, the user score Arrange from small to large;
[0141] by As the initial value, it is iteratively updated by the following formula
[0142]
[0143] when When the maximum value is reached, the user score at that time As the target threshold t (0) .
[0144] In an optional implementation, taking the maximum KS statistic as the second update target, updating the weight parameter includes:
[0145] Update β one by one, Used to indicate the weight parameter after the sth iteration, It is used to indicate that the first k-1 variables have been updated at the sth iteration. Then the steps to update the kth variable are as follows:
[0146] Step A1: Record the set of truncation points D s,k The following formula:
[0147]
[0148] in, is the i-th cutoff point at the s-th iteration, t (s) is the current threshold, is the coefficient related to the current feature and the previous feature, x ik is the characteristic value of the user data,
[0149] Step A2: Set the truncation point set D s,k Sort the elements in ascending order, and we get
[0150] Step A3: When i=1, calculate and
[0151] When i∈[2,n], update by the following grid search rule and
[0152]
[0153]
[0154] Scenario 1:
[0155] Scenario 2:
[0156] Scenario 3:
[0157] Scenario 4:
[0158] Scenario 5:
[0159] Scenario 6:
[0160] Scenario 7:
[0161] Scenario 8:
[0162] In all cases other than cases 1 to 8, and
[0163] Step A4: Calculation make make
[0164] Step A5: Repeat steps S1 to S4 to obtain the weight parameter β (s+1) .
[0165] In an optional implementation, obtaining an updated target model includes:
[0166] Repeat the steps of taking the maximum KS statistic as the first update target, updating the default score threshold, and obtaining the target threshold, and steps S1 to S5, until the target model converges; wherein the target model convergence condition is as follows:
[0167] |1-β (s-1)′ β (s) |<10 -6 .
[0168] Get the estimator when the model converges Use the estimator when the model converges The target model is updated to obtain an updated target model.
[0169] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0170] The credit model updating device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0171] The embodiment of the present invention also provides a computer device having the above Figure 3 The credit model updating device shown.
[0172] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 4 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0173] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0174] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0175] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0176] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0177] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0178] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0179] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0180] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0181] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations shall all fall within the scope of protection of the present invention.
Claims
1. A credit model updating method, characterized in that: The method comprises: Obtaining credit default data; the credit default data includes user information and default status; Based on the credit default data, a KS statistic is constructed; the KS statistic is used to indicate the accuracy of the target model in judging user default; the KS statistic includes a default score threshold of the target model and a weight parameter of the target model; Taking the maximum KS statistic as the first update target, updating the default score threshold to obtain a target threshold; The maximum KS statistic is used as the second update target, and the weight parameter is updated to obtain an updated target model to determine the user's credit score.
2. The method according to claim 1, characterized in that The KS statistic is: Among them, n0 is the number of defaulting users, n1 is the number of non-defaulting users, and y i Used to indicate whether the i-th user has breached the contract, y i =1 means no default, y i =0 represents default; x i ′ is used to indicate the credit default data of the i-th user; β is the weight parameter representing the target model; t is the default score threshold, which is used to divide the predicted value output by the target model into two categories. A predicted value less than t represents no default, and a predicted value greater than t represents a default; x i ′β is used to indicate the user score, which is inversely proportional to the default risk; It is used to indicate the proportion of user defaults correctly judged by the target model; It indicates the proportion of users who are not actually in default and are mistakenly judged as having defaulted by the target model.
3. The method according to claim 2, characterized in that Before updating the default score threshold by taking the maximum KS statistic as the first update target, the method further includes: Construct an estimator that maximizes the KS(β) statistic The formula is as follows: in, The initial value is set to is the least squares estimate of β.
4. The method according to claim 3, characterized in that The step of taking the maximum KS statistic as the first update target and updating the default score threshold to obtain a target threshold comprises: To maximize The target threshold t (0) As the first update target, let the piecewise function about t be The candidate value sequence of the cutoff point in, is the user score of the i-th user; Arrange the truncation point candidate value sequence τ0 in ascending order to obtain the sorted truncation point candidate value sequence Among them, the user score Arrange from small to large; by As the initial value, it is iteratively updated by the following formula when When the maximum value is reached, the user score at that time As the target threshold t (0) .
5. The method according to claim 4, characterized in that The updating of the weight parameter by taking the maximum KS statistic as the second updating target comprises: Update β one by one, Used to indicate the weight parameter after the sth iteration, It is used to indicate that the first k-1 variables have been updated at the sth iteration. Then the steps to update the kth variable are as follows: Step A1: Record the set of truncation points D s,k The following formula: in, is the i-th cutoff point at the s-th iteration, t (s) is the current threshold, is the coefficient related to the current feature and the previous feature, x ik is the characteristic value of the user data, Step A2: Set the truncation point set D s,k Sort the elements in ascending order, and we get Step A3: When i=1, calculate and When i∈[2,n], update by the following grid search rule and Scenario 1: Scenario 2: Scenario 3: Scenario 4: Scenario 5: Scenario 6: Scenario 7: Scenario 8: In all cases other than cases 1 to 8, and Step A4: Calculation make make Step A5: Repeat steps A1 to A4 to obtain the weight parameter β (s+1) .
6. The method according to claim 5, characterized in that The updated target model includes: Repeat the steps of taking the maximum KS statistic as the first update target, updating the default score threshold, and obtaining the target threshold, and steps A1 to A5, until the target model converges; wherein the target model convergence condition is as follows: |1-β (s-1)′ β (s) |<10 -6 ; Get the estimator when the model converges The estimator used when the model converges is The target model is updated to obtain an updated target model.
7. A credit model updating device, characterized in that: The device comprises: A data acquisition module, used to acquire credit default data; the credit default data includes user information and default conditions; A KS construction module is used to construct a KS statistic based on the credit default data; the KS statistic is used to indicate the accuracy of the target model in judging user default; the KS statistic includes a default score threshold of the target model and a weight parameter of the target model; A target threshold acquisition module, used to update the default score threshold with the maximum KS statistic as the first update target to obtain a target threshold; The target model updating module is used to update the weight parameters with the maximum KS statistic as the second update target to obtain an updated target model to determine the user's credit score.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the credit model updating method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the credit model updating method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the credit model updating method according to any one of claims 1 to 6.
