Regression model construction method and device, program product, and storage medium
By introducing the first scale parameters and the first neutral parameters in the logistic regression, adjusting the distribution function, and calculating the KL divergence, the problem of logistic regression underestimating the probability of event occurrence under extremely uneven data is solved, and the construction of accurate regression is achieved The effect of the model.
Patent Information
- Application Number
- CN202411624514.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-11-14
AI Technical Summary
In the prior art, when logistic regression faces extremely uneven data, it is easy to ignore the sample point of y=1, resulting in an underestimated event probability and an accurate regression model cannot be constructed.
By determining the first scale parameters and the first neutral parameters based on N first target features of N objects, adjusting the first distribution function to obtain the target distribution function, and calculating the KL scatter between the second distribution function and the third distribution function Degree, target regression model is constructed based on these divergences.
It realizes the construction of an accurate regression model under extremely uneven data conditions, which can effectively adjust the target distribution function and improve the accuracy of the model.
Smart Images

Figure CN119128368B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and specifically, to a method and device for constructing a regression model, a program product, and a storage medium. Background Art
[0002] With the advent of the era of machine learning, all industries are experiencing rapid development in this era.
[0003] Nowadays, in various service industries, user behavior is gradually reflected through data, and this type of data is of great concern to businesses. When constructing user features, operators hope to meet the two major requirements of "adjusting the shape and curvature of the probability density of the feature" and "the relative proportion of users with negative and positive features can change with the scene". However, the traditional logistic regression in related technologies maintains the same attention to sample points y=0 (users have not engaged in malicious behavior) and y=1 (users have engaged in malicious behavior). As a result, when logistic regression faces extremely unbalanced data, it is easy to ignore the sample point y=1, thereby underestimating the probability of the event (y=1) and failing to build an accurate regression model. Summary of the invention
[0004] The embodiments of the present application provide a method and device for constructing a regression model, so as to at least solve the problem that an accurate regression model cannot be constructed in the related art.
[0005] According to an embodiment of the present application, a method for constructing a regression model is provided, comprising: determining a first scale parameter and a first neutral parameter based on N first target features of N objects, wherein each of the above-mentioned first target features is a feature determined based on the weighted values of M target parameters, the above-mentioned target parameters include object information of the object, the above-mentioned first scale parameter is used to adjust the shape and curvature of the probability density of the first target feature of the object, the above-mentioned first neutral parameter is used to adjust the proportion of the above-mentioned first target feature as an abnormal feature, and the above-mentioned N and M are both positive integers; adjusting a first distribution function based on the above-mentioned first scale parameter and the above-mentioned first neutral parameter to obtain a target distribution function, wherein the above-mentioned first distribution function is used to fit objects distributed in an asymmetric form, and the above-mentioned first distribution function is a complementary pair extreme value distribution function; calculating a first KL divergence between the second distribution function and the third distribution function, and a second KL divergence between the second distribution function and the target distribution function, wherein the second distribution function is used to represent the distribution of the N objects, the third distribution function is used to represent the probability distribution of the N objects having preset abnormal behaviors, the first KL divergence is used to represent the degree of difference between the second distribution function and the third distribution function, and the second KL divergence is used to represent the degree of difference between the second distribution function and the target distribution function; based on the comparison result between the first KL divergence and the second KL divergence, constructing a target regression model, wherein the target regression model is used to output the probability of the target object having the preset abnormal behavior.
[0006] In an exemplary embodiment, determining a first scale parameter and a first neutral parameter based on N first target features of N objects includes: calculating a first proportion of a first object, wherein the first object is any object among the N objects whose characteristic value is less than or equal to 0; determining a relationship between the first proportion and a fourth distribution function, wherein the fourth distribution function is , the above A neutral parameter for representing the first object, ; Determine the first neutral parameter according to the relationship between the first proportion and the fourth distribution function; and determine the first scale parameter using the first neutral parameter.
[0007] In an exemplary embodiment, the first scale parameter is determined by using the first neutral parameter, including: calculating a second proportion of a second object, wherein the second object is an object whose characteristic value is equal to 0 among the N objects; determining a relationship between a fifth distribution function and the second proportion, wherein the fifth distribution function is , the above It is used to represent the first scale parameter mentioned above. is used to represent the second proportion; based on the relationship between the fifth distribution function and the second proportion, and the first neutral parameter, the first scale parameter is determined, wherein the first scale parameter is .
[0008] In an exemplary embodiment, before calculating the first KL divergence between the second distribution function and the third distribution function, and the second KL divergence between the second distribution function and the target distribution function, the method further includes: constructing a first log-likelihood function; performing a maximum likelihood operation on the first log-likelihood function to calculate a weight vector of the target parameters of the object; and constructing the third distribution function based on the weight vector of the target parameters of the object.
[0009] In an exemplary embodiment, calculating a first KL divergence between the second distribution function and the third distribution function, and a second KL divergence between the second distribution function and the target distribution function, includes: determining a second target feature using a weight vector of target parameters of the N objects; determining the second distribution function using the second target feature; calculating a first KL divergence between the second distribution function and the third distribution function, and a second KL divergence between the second distribution function and the target distribution function.
[0010] In an exemplary embodiment, calculating the first KL divergence between the second distribution function and the third distribution function, and the second KL divergence between the second distribution function and the target distribution function, includes: calculating the first KL divergence between the second distribution function and the third distribution function by a first formula, wherein the first formula is , the above It is used to represent the second distribution function. is used to represent the third distribution function; the second KL divergence between the second distribution function and the target distribution function is calculated by the second formula, wherein the second formula is , the above Used to represent the above target distribution function.
[0011] In an exemplary embodiment, based on the comparison result between the first KL divergence and the second KL divergence, a target regression model is constructed, including: comparing the first KL divergence and the second KL divergence; when the first KL divergence is less than or equal to the second KL divergence, constructing the target regression model based on the third distribution function; or, when the first KL divergence is greater than the second KL divergence, constructing the target regression model based on the target distribution function.
[0012] In an exemplary embodiment, when the first KL divergence is greater than the second KL divergence, a target regression model is constructed based on the target distribution function, including: calculating a third KL divergence between a sixth distribution function and a seventh distribution function, wherein the sixth distribution function is used to represent the probability distribution of preset abnormal behaviors of the N objects, and the seventh distribution function is used to represent the distribution of the N objects; calculating a fourth KL divergence between the seventh distribution function and the eighth distribution function, wherein the eighth distribution function is used to fit objects distributed in an asymmetric form; and constructing the target regression model based on a comparison result between the third KL divergence and the fourth KL divergence.
[0013] In an exemplary embodiment, calculating the third KL divergence between the sixth distribution function and the seventh distribution function includes: constructing a second log-likelihood function of a third formula, wherein the third formula is , the above Used to represent the first neutral parameter mentioned above, is used to represent the first scale parameter; the second log-likelihood function is subjected to the maximum likelihood operation to obtain , among which, the above A weight vector for representing the target parameters of the above object; based on the above third formula and the above , construct the seventh distribution function.
[0014] In an exemplary embodiment, before calculating the fourth KL divergence between the seventh distribution function and the eighth distribution function, the method further includes: based on the Determine the third target feature; calculate the third proportion of the third object using the third target feature, where the fourth formula is: , the above Used to represent the characteristics of the i-th object; determine the relationship between the fourth distribution function and the above-mentioned third proportion; use the relationship between the above-mentioned fourth distribution function and the above-mentioned third proportion to determine the second neutral parameter; use the above-mentioned second neutral parameter to calculate the second scale parameter; construct the above-mentioned eighth distribution function based on the above-mentioned second neutral parameter and the above-mentioned second scale parameter.
[0015] In an exemplary embodiment, based on the comparison result between the third KL divergence and the fourth KL divergence, constructing a target regression model includes: comparing the third KL divergence and the fourth KL divergence; when the third KL divergence is less than or equal to the fourth KL divergence, based on the third KL divergence, and the above Constructing the target regression model; or, when the third KL divergence is greater than the fourth KL divergence, recalculating the third KL divergence and the fourth KL divergence, and reconstructing the target regression model, wherein the reconstructed target regression model corresponds to the sixth distribution function.
[0016] In an exemplary embodiment, when the third KL divergence is greater than the fourth KL divergence, the target regression model is reconstructed, and the third KL divergence and the fourth KL divergence are recalculated, including: iteratively calculating the third KL divergence and the fourth KL divergence, and reconstructing the target regression model; wherein iteratively calculating the third KL divergence and the fourth KL divergence includes: in the i-th iteration, based on the and the above Re-determine the third KL divergence and the fourth KL divergence, where the above in the i-th iteration Corresponding to the i-1th iteration , the above in the above i-th iteration Corresponding to the above i-1th round of iteration , the above is the neutral parameter obtained in the above i-1th round of iteration. is the scale parameter obtained in the above i-1th iteration.
[0017] In an exemplary embodiment, after constructing the target regression model based on the comparison result between the first KL divergence and the second KL divergence, it also includes: acquiring object information of the target object; based on the object information of the target object, determining a first probability using the target regression model, wherein the first probability is the probability that the target object will undergo the preset abnormal behavior; determining a management strategy based on the first probability, wherein the management strategy includes three types of management strategies: radical, conservative, and robust.
[0018] According to another embodiment of the present application, a device for constructing a regression model is provided, comprising: a first determination module, used to determine a first scale parameter and a first neutral parameter based on N first target features of N objects, wherein each of the above-mentioned first target features is a feature determined based on the weighted values of M target parameters, the above-mentioned target parameters include the object information of the above-mentioned object, the above-mentioned first scale parameter is used to adjust the shape and curvature of the probability density of the first target feature of the above-mentioned object, the above-mentioned first neutral parameter is used to adjust the proportion of the above-mentioned first target feature as an abnormal feature, and the above-mentioned N and M are both positive integers; a first adjustment module, used to adjust the first distribution function based on the above-mentioned first scale parameter and the above-mentioned first neutral parameter to obtain a target distribution function, wherein the above-mentioned first distribution function is used to fit objects distributed in an asymmetric form, and the above-mentioned first distribution function is complementary Double logarithmic extreme value distribution function; a first calculation module, used to calculate the first KL divergence between the second distribution function and the third distribution function, and the second KL divergence between the second distribution function and the target distribution function, wherein the second distribution function is used to represent the distribution of the N objects, the third distribution function is used to represent the probability distribution of the N objects having preset abnormal behaviors, the first KL divergence is used to represent the degree of difference between the second distribution function and the third distribution function, and the second KL divergence is used to represent the degree of difference between the second distribution function and the target distribution function; a first construction module, used to construct a target regression model based on the comparison result between the first KL divergence and the second KL divergence, wherein the target regression model is used to output the probability of the target object having the preset abnormal behavior.
[0019] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0020] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.
[0021] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0022] Through this application, based on the proportion of the target feature of the object being less than or equal to 0 and The first neutral parameter is calculated based on the relationship between the first scale parameter and the first neutral parameter, and the first scale parameter is calculated based on the first scale parameter and the first neutral parameter. Then, the first distribution function used to fit the objects distributed in an asymmetric form is adjusted based on the first scale parameter and the first neutral parameter to obtain the target distribution function. The first KL divergence between the second distribution function used to represent the distribution of N objects and the third distribution function used to represent the probability distribution of the preset abnormal behavior of N objects is calculated, and the second KL divergence between the second distribution function and the target distribution function is calculated. Finally, based on the comparison result between the first KL divergence and the second KL divergence, the target regression model is constructed. Therefore, by introducing the first scale parameter and the first neutral parameter, the target distribution function can be adjusted in time, thereby solving the problem that an accurate regression model cannot be constructed in the related technology, and achieving a more accurate effect of the constructed regression model. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a hardware environment schematic diagram of a method for constructing a regression model according to an embodiment of the present application;
[0024] Figure 2 is a flow chart of a method for constructing a regression model according to an embodiment of the present application;
[0025] Figure 3 is a schematic diagram of target risk characteristics of an object according to an embodiment of the present application;
[0026] Figure 4 is a sample distribution diagram of an object according to an embodiment of the present application;
[0027] Figure 5 is a schematic diagram of two KL divergences of an object according to an embodiment of the present application;
[0028] Figure 6 The relationship between the customer type of the object in the embodiment of the present application and the occurrence of the preset abnormal behavior Figure 1 ;
[0029] Figure 7 The relationship between the customer type of the object in the embodiment of the present application and the occurrence of the preset abnormal behavior Figure 2 ;
[0030] Figure 8 is a schematic diagram of a method for constructing a regression model according to an embodiment of the present application;
[0031] Fig. 9 It is a structural block diagram of a regression model construction device according to an embodiment of the present application. DETAILED DESCRIPTION
[0032] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0034] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 Schematic diagram of the hardware environment of a method for constructing a regression model in an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0035] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for constructing the regression model in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server 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.
[0036] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0037] In this embodiment, a method for constructing a regression model is provided. Figure 2 is a flow chart of a method for constructing a regression model according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0038] Step S202, determining a first scale parameter and a first neutral parameter based on N first target features of N objects, wherein each of the first target features is a feature determined based on a weighted value of M target parameters, the target parameters include object information of the object, the first scale parameter is used to adjust the shape and curvature of the probability density of the first target feature of the object, the first neutral parameter is used to adjust the proportion of the first target feature as an abnormal feature, and both N and M are positive integers;
[0039] Step S204, adjusting the first distribution function based on the first scale parameter and the first neutral parameter to obtain a target distribution function, wherein the first distribution function is used to fit an object distributed in an asymmetric form, and the first distribution function is a complementary double logarithmic extreme value distribution function;
[0040] Step S206, calculating a first KL divergence between the second distribution function and the third distribution function, and a second KL divergence between the second distribution function and the target distribution function, wherein the second distribution function is used to represent the distribution of the N objects, the third distribution function is used to represent the probability distribution of the N objects having a preset abnormal behavior, the first KL divergence is used to represent the degree of difference between the second distribution function and the third distribution function, and the second KL divergence is used to represent the degree of difference between the second distribution function and the target distribution function;
[0041] Step S208: constructing a target regression model based on the comparison result between the first KL divergence and the second KL divergence, wherein the target regression model is used to output the probability of the target object having the preset abnormal behavior.
[0042] Optionally, this embodiment may be applied to the field of data processing, specifically, including but not limited to being applied to scenarios of financial data processing.
[0043] Optionally, when this embodiment is applied in a scenario of financial data processing, the target parameter may be a risk factor.
[0044] Optionally, the N risk factors in this embodiment may be object information of the object, including but not limited to basic information of the object, property information of the object, product usage behavior information of the object, information searched by the object on the platform, and commodity information purchased by the object.
[0045] Optionally, the weighted values of the N risk factors in this embodiment are determined according to the degree of association between the object information of the historical object and the risk level of the object.
[0046] Optionally, the first target feature in this embodiment is a target feature used to represent an object. The first target feature can be displayed in the form of a numerical value. When this embodiment is applied to a financial data processing scenario, when the first target feature is greater than 0, it indicates that the target customer's behavior is positive and the risk is low. When the first target feature is equal to 0, it indicates that the target customer's behavior is neutral and the risk is medium. When the first target feature is less than 0, it indicates that the target customer's behavior is negative and the risk is high.
[0047] Optionally, when this embodiment is applied to a scenario of financial data processing, such as Figure 3 is a schematic diagram of target risk characteristics of an object according to an embodiment of the present application, such as Figure 3 As shown, the ordinate represents the probability density value of the object, and the abscissa represents the target risk characteristics of the object. Since the larger the target risk characteristics, the greater the harm of the behavior of the object, the probability density function of rare events should be a curve with a thin tail on the right and a thick tail on the left: this is because the number of customers with extremely poor target risk characteristics is far less than that of customers with extremely excellent target risk characteristics. Since the area of the probability density function within a certain interval (i.e., the integral of the probability density function within a certain interval) means the proportion of samples falling into the interval to the total population, in rare events, the area of the right tail of the probability density function should be smaller than the area of the left tail, where rare events refer to events in which the object has a preset abnormal behavior.
[0048] Optionally, in this embodiment, the first distribution function is adjusted based on the first scale parameter and the first neutral parameter, and the target distribution function obtained is obtained by improving the traditional complementary double logarithmic extreme value distribution and introducing the first scale parameter and the first neutral parameter, wherein the formula of the traditional complementary double logarithmic extreme value distribution is: , , the improved complementary double logarithmic extreme value distribution of this embodiment is: , , ,in, It is used to represent the first scale parameter, which can adjust the shape and curvature of the probability density of the target feature. It is used to represent the first neutral parameter, which can adjust the "proportion of objects with target features as abnormal features". PDF represents the probability density function and CDF represents the cumulative distribution function.
[0049] Optionally, the KL divergence in this embodiment is used to indicate the degree of difference between two distribution functions. The KL divergence may be presented in the form of a numerical value. The larger the KL divergence, the greater the degree of difference between the two distribution functions; the smaller the KL divergence, the smaller the degree of difference between the two distribution functions. If the two distribution functions are exactly the same, the KL divergence is 0.
[0050] Optionally, when this embodiment is applied in a scenario of financial data processing, the preset abnormal behavior in this embodiment is a malicious behavior of the object, including but not limited to default, loan maturity, and collection of the object.
[0051] Optionally, Table 1 is a comparison table of relevant features of the logical distribution, the traditional complementary double logarithmic extreme value distribution and the improved complementary double logarithmic extreme value distribution. As shown in Table 1, the improved complementary double logarithmic extreme value distribution in this embodiment can meet more relevant features compared with the logical distribution and the traditional complementary double logarithmic extreme value distribution.
[0052] Table 1:
[0053]
[0054] Through the present application, the first distribution function used to fit the objects distributed in an asymmetric form is adjusted based on the first scale parameter and the first neutral parameter to obtain the target distribution function. By calculating the first KL divergence between the second distribution function used to represent the distribution of N objects and the third distribution function used to represent the probability distribution of the preset abnormal behavior of N objects, the second KL divergence between the second distribution function and the target distribution function is calculated, and finally based on the comparison result between the first KL divergence and the second KL divergence, the target regression model is constructed. By introducing the first scale parameter and the first neutral parameter, the target distribution function can be adjusted in time, thereby solving the problem that an accurate regression model cannot be constructed in the related technology, and achieving a more accurate effect of the constructed regression model.
[0055] In an exemplary embodiment, determining a first scale parameter and a first neutral parameter based on N first target features of N objects includes: calculating a first proportion of a first object, wherein the first object is any object among the N objects whose characteristic value is less than or equal to 0; determining a relationship between the first proportion and a fourth distribution function, wherein the fourth distribution function is , the above A neutral parameter for representing the first object, ; Determine the first neutral parameter according to the relationship between the first proportion and the fourth distribution function; and determine the first scale parameter using the first neutral parameter.
[0056] Optionally, in this embodiment, the manner of determining the first neutral parameter by using the relationship between the first proportion and the fourth distribution function may be: calculating by using Newton's median method.
[0057] Alternatively, in a specific example, due to It is a monotonic function. The steps to calculate the first neutral parameter using Newton's median method can be: define the equation , calculate the derivative f′(θ) of f(θ), and use the chain rule and product rule to get , and then determine the initial estimate formula , repeatedly apply the iterative formula until The value of converges to 5 decimal places of precision, and the first neutral parameter is calculated.
[0058] According to this embodiment, the number of objects with a characteristic value less than or equal to 0 is used as the and the fourth distribution function The relationship between is calculated according to Newton's median method to obtain the first neutral parameter, and the calculated first neutral parameter is accurate to 5 decimal places, which is more precise and effectively guarantees the accuracy of the first neutral parameter, facilitating subsequent improvements to the complementary double logarithmic extreme value distribution.
[0059] In an exemplary embodiment, determining the first scale parameter using the first neutral parameter includes: calculating a second proportion of a second object, wherein the second object is an object whose characteristic value is equal to 0 among the N objects; determining a relationship between a fifth distribution function and the second proportion, wherein the fifth distribution function is , the above It is used to represent the first scale parameter mentioned above. is used to represent the second proportion; based on the relationship between the fifth distribution function and the second proportion, and the first neutral parameter, the first scale parameter is determined, wherein the first scale parameter is .
[0060] Through this embodiment, the first neutral parameter calculated above is brought into the fifth distribution function In the example, the first scale parameter is calculated based on the relationship between the fifth distribution function and the proportion of the number of objects whose eigenvalues are equal to 0. The first scale parameter can be accurately calculated, which is convenient for subsequent improvement of the complementary double logarithmic extreme value distribution.
[0061] In an exemplary embodiment, before calculating the first KL divergence between the second distribution function and the third distribution function, and the second KL divergence between the second distribution function and the target distribution function, the method further includes: constructing a first log-likelihood function; performing a maximum likelihood operation on the first log-likelihood function to calculate a weight vector of the target parameters of the object; and constructing the third distribution function based on the weight vector of the target parameters of the object.
[0062] Optionally, when this embodiment is applied in a scenario of financial data processing, the preset abnormal behavior in this embodiment is a malicious behavior of the object, which has been described above and will not be repeated here.
[0063] Optionally, when this embodiment is applied to a scenario of financial data processing, the target parameter may be a risk factor, a vector , which is used to indicate that there are k risk factors, and the vector of risk factor weights is , the risk factors are weighted to form the target risk characteristic z, that is, Specifically, in one example, the risk feature of the i-th object is expressed as ,in , .
[0064] Optionally, in one example, the first log-likelihood function in this embodiment is , at this time, the maximum likelihood operation is performed on the first log-likelihood function. The goal is to maximize the first log-likelihood function, that is, to make the derivative of the log-likelihood function equal to 0, and then use the Newton-Raphson method to obtain ,according to and formula Calculate z and then get the third distribution function .
[0065] In this embodiment, the maximum likelihood operation is performed through the log-likelihood function, and the weight vector of the target parameters of the object is calculated using the Newton-Raphson iteration method. The characteristics of the object can be obtained based on the weight vector and the target parameters of the object. The third distribution function can be calculated based on the characteristics of the object, which further ensures the accuracy of the parameters of the third distribution function and ensures the rationality of the constructed third distribution function.
[0066] In an exemplary embodiment, calculating a first KL divergence between the second distribution function and the third distribution function, and a second KL divergence between the second distribution function and the target distribution function, includes: determining a second target feature using a weight vector of target parameters of the N objects; determining the second distribution function using the second target feature; calculating a first KL divergence between the second distribution function and the third distribution function, and a second KL divergence between the second distribution function and the target distribution function.
[0067] Optionally, in this embodiment, the second distribution function is the sample distribution of the object, which can be expressed as When this embodiment is applied to the scenario of financial data processing, the following can also be drawn: Figure 4 The sample distribution diagram of the object shown is a bar graph, where the abscissa of the bar graph represents different values of the target risk feature, and the ordinate represents the proportion of samples whose target risk feature is equal to the abscissa value.
[0068] Through this embodiment, the sample distribution of the object can be obtained by formula calculation, or by graphing. The sample distribution of the object is determined to facilitate the subsequent calculation of the first KL divergence and the second KL divergence.
[0069] In an exemplary embodiment, calculating the first KL divergence between the second distribution function and the third distribution function, and the second KL divergence between the second distribution function and the target distribution function, includes: calculating the first KL divergence between the second distribution function and the third distribution function by a first formula, wherein the first formula is , the above It is used to represent the second distribution function. is used to represent the third distribution function; the second KL divergence between the second distribution function and the target distribution function is calculated by the second formula, wherein the second formula is , the above Used to represent the above target distribution function.
[0070] Optionally, in this embodiment, KL divergence is a formula commonly used in information theory to measure the difference between two distribution functions. Since KL divergence is not symmetric, that is, , this is because , which expresses that the sample is subject to , and then infer the overall distribution and differences; , which expresses that the sample obeys , and then infer the overall distribution and Therefore, in this embodiment, we choose to use , rather than Similarly, in this embodiment, we choose to use , rather than .
[0071] Optionally, since the third distribution function is based on the assumption that the object obeys a symmetric distribution, i.e., logical distribution, the target distribution function is an asymmetric form, i.e., extreme value distribution, and the second distribution function is the sample distribution of the object, the size relationship between the first KL divergence and the second KL divergence reflects the size relationship between the reasonableness of the symmetric distribution and the asymmetric distribution.
[0072] Optionally, in this embodiment, when this embodiment is applied to the scenario of financial data processing, since the logistic distribution is symmetrical, the logistic regression considers that the customer with extremely high target risk characteristics (corresponding to Figure 3 The number of customers with extremely low target risk characteristics (the right tail in the figure) and customers with extremely low target risk characteristics (the left tail) should be the same. However, this assumption is contrary to rare events in real life. For extremely malicious events, there are usually few objects with extremely low target risk characteristics, so the probability density function should not be symmetrical. It generally obeys the extreme value distribution. Therefore, if the real data obeys the extreme value distribution, the probability density function and cumulative distribution function of the object are: , , so the binary selection model under extreme value distribution is , .
[0073] Through this embodiment, according to the actual situation, analyze and select , calculate the first KL divergence between the second distribution function and the third distribution function, indicating that the object sample obeys , and then infer the overall distribution of the target and The difference between the two more accurately represents the difference between the two, providing a basis for the subsequent construction of the regression model. , calculate the second KL divergence between the second distribution function and the target distribution function, indicating that the object sample obeys , and then infer the overall distribution of objects and difference.
[0074] In an exemplary embodiment, based on the comparison result between the first KL divergence and the second KL divergence, a target regression model is constructed, including: comparing the first KL divergence and the second KL divergence; when the first KL divergence is less than or equal to the second KL divergence, constructing the target regression model based on the third distribution function; or, when the first KL divergence is greater than the second KL divergence, constructing the target regression model based on the target distribution function.
[0075] Optionally, in this embodiment, the case where the first KL divergence is less than or equal to the second KL divergence is , indicating that the distribution of the target features of the object is more in line with the third distribution function, that is, more in line with the logistic distribution. In this case, a target regression model is constructed based on the third distribution function, and a traditional logistic regression model is output.
[0076] Optionally, in this embodiment, the case where the first KL divergence is greater than the second KL divergence is , indicating that the distribution of the target features of the object is more in line with the target distribution function, that is, more in line with the improved complementary double logarithmic extreme value distribution. In this case, a target regression model is constructed based on the target distribution function, and the improved complementary double logarithmic extreme value distribution model is output.
[0077] Optionally, in this embodiment, Figure 5 It is a curve diagram of two KL divergences of the object. The first KL divergence of the object and the second KL divergence Can be Figure 5 The form shown is displayed, Figure 5 The improved complementary double logarithmic extreme value distribution corresponds to the target distribution function, the sample distribution corresponds to the second distribution function, and the logistic distribution corresponds to the third distribution function.
[0078] According to this embodiment, by comparing the first KL divergence and the second KL divergence , further determine which distribution function the sample distribution of the object is more in line with, and generate a target regression model based on this, so that the generated target regression model is more in line with the actual situation of the object.
[0079] In an exemplary embodiment, when the first KL divergence is greater than the second KL divergence, a target regression model is constructed based on the target distribution function, including: calculating a third KL divergence between a sixth distribution function and a seventh distribution function, wherein the sixth distribution function is used to represent the probability distribution of preset abnormal behaviors of the N objects, and the seventh distribution function is used to represent the distribution of the N objects; calculating a fourth KL divergence between the seventh distribution function and the eighth distribution function, wherein the eighth distribution function is used to fit objects distributed in an asymmetric form; and constructing the target regression model based on a comparison result between the third KL divergence and the fourth KL divergence.
[0080] Optionally, the sixth distribution function in this embodiment is expressed as ,in, They respectively represent the first neutral parameter and the first scale parameter used in this round of iteration.
[0081] Optionally, the eighth distribution function in this embodiment is ,in, It is the second neutral parameter and the second scale parameter obtained in this round of iteration after fitting the target features of the object again.
[0082] Through this embodiment, the parameters of the complementary double logarithmic extreme value distribution are adjusted by recalculating the first neutral parameter and the first scale parameter, and the constructed target regression model is determined through iteration by comparing the sample distribution of the object and the difference between the complementary double logarithmic extreme value distribution before and after the adjustment, so that the generated target regression model is more in line with the actual situation of the object.
[0083] In an exemplary embodiment, calculating the third KL divergence between the sixth distribution function and the seventh distribution function includes: constructing a second log-likelihood function of a third formula, wherein the third formula is , the above Used to represent the first neutral parameter mentioned above, is used to represent the first scale parameter; the second log-likelihood function is subjected to the maximum likelihood operation to obtain , among which, the above A weight vector for representing the target parameters of the above object; based on the above third formula and the above , construct the seventh distribution function.
[0084] Optionally, in one example, the second log-likelihood function in this embodiment is , at this time, the maximum likelihood operation is performed on the second log-likelihood function. The goal is to maximize the second log-likelihood function, that is, to make the derivative of the log-likelihood function equal to 0, and then use the Newton-Raphson iteration method to obtain ,according to and formula z is calculated, and then the sixth distribution function is obtained.
[0085] Through this embodiment, according to the last calculation The constructed third formula constructs the corresponding second log-likelihood function, and then performs a maximum likelihood operation on it to calculate a weight vector of a new target parameter, and then constructs the sixth distribution function, so that the parameters of the constructed sixth distribution function are more accurate.
[0086] In an exemplary embodiment, before calculating the fourth KL divergence between the seventh distribution function and the eighth distribution function, the method further includes: based on the Determine the third target feature; calculate the third proportion of the third object using the third target feature, where the fourth formula is: , the above Used to represent the characteristics of the i-th object; determine the relationship between the fourth distribution function and the above-mentioned third proportion; use the relationship between the above-mentioned fourth distribution function and the above-mentioned third proportion to determine the second neutral parameter; use the above-mentioned second neutral parameter to calculate the second scale parameter; construct the above-mentioned eighth distribution function based on the above-mentioned second neutral parameter and the above-mentioned second scale parameter.
[0087] Optionally, in this embodiment, the second neutral parameter may also be calculated by Newton's median method, and the calculation steps are similar to the steps of calculating the first neutral parameter by Newton's median method, which will not be repeated here.
[0088] According to this embodiment, the number of objects with a characteristic value less than or equal to 0 is used as the and the fourth distribution function The relationship between is calculated according to the Newton median method to obtain the second neutral parameter, and the calculated second neutral parameter is 5 decimal places accurate, which is more accurate. The second neutral parameter calculated above is brought into the fifth distribution function In the above, the second scale parameter is calculated according to the relationship between the fifth distribution function and the proportion of the number of objects with eigenvalue equal to 0, which effectively ensures the accuracy of the second neutral parameter and the second scale parameter, and facilitates the subsequent improvement of the complementary double logarithmic extreme value distribution.
[0089] In an exemplary embodiment, based on the comparison result between the third KL divergence and the fourth KL divergence, constructing a target regression model includes: comparing the third KL divergence and the fourth KL divergence; when the third KL divergence is less than or equal to the fourth KL divergence, based on the third KL divergence, and the above Constructing the target regression model; or, when the third KL divergence is greater than the fourth KL divergence, recalculating the third KL divergence and the fourth KL divergence, and reconstructing the target regression model, wherein the reconstructed target regression model corresponds to the sixth distribution function.
[0090] Optionally, the third KL divergence in this embodiment is expressed as: , the fourth KL divergence is expressed as: .
[0091] Optionally, the case where the third KL divergence in this embodiment is less than or equal to the fourth KL divergence is: , the case where the third KL divergence is greater than the fourth KL divergence is: . When the third KL divergence is greater than the fourth KL divergence, , The value will be replaced by , , repeat the above steps and adjust the complementary double logarithmic extreme value distribution function until the new neutral parameter and scale parameter meet: .
[0092] Through this embodiment, the sample distribution of the object and the neutral parameters and scale parameters calculated last time are continuously compared with the complementary double logarithmic extreme value distribution constructed by the new neutral parameters and new scale parameters calculated in this way, so that the target regression model finally constructed is more suitable for the target risk characteristics of the object, and achieves the technical effect of meeting the two major requirements of "the shape and curvature of the probability density of the target feature can be adjusted" and "the relative proportion of objects with preset abnormal behaviors of the target feature can change with the scene".
[0093] In an exemplary embodiment, when the third KL divergence is greater than the fourth KL divergence, the target regression model is reconstructed, and the third KL divergence and the fourth KL divergence are recalculated, including: iteratively calculating the third KL divergence and the fourth KL divergence, and reconstructing the target regression model; wherein iteratively calculating the third KL divergence and the fourth KL divergence includes: in the i-th iteration, based on the and the above Re-determine the third KL divergence and the fourth KL divergence, where the above in the i-th iteration Corresponding to the i-1th iteration , the above in the above i-th iteration Corresponding to the above i-1th round of iteration , the above is the neutral parameter obtained in the above i-1th round of iteration. is the scale parameter obtained in the above i-1th iteration.
[0094] In an exemplary embodiment, after constructing the target regression model based on the comparison result between the first KL divergence and the second KL divergence, it also includes: acquiring object information of the target object; based on the object information of the target object, determining a first probability using the above-mentioned target regression model, wherein the above-mentioned first probability is the probability that the above-mentioned preset abnormal behavior occurs in the above-mentioned target object; determining a management strategy based on the above-mentioned first probability, wherein the above-mentioned management strategy includes three types of management strategies: radical, conservative, and robust.
[0095] Optionally, in this embodiment, if the neutral parameter θ≤e in the target regression model finally constructed, it means that the target regression model finally constructed can always improve the attention of rare events. If the neutral parameter θ>e in the target regression model finally constructed, it means that the target regression model finally constructed can improve the attention of rare events for outliers. If θ is close to e, and the attention mechanism needs to be appropriately strengthened in combination with the actual situation, θ can be slightly reduced or even less than e. The specific neutral parameter adjustment parameters are shown in Table 2, the value table of the neutral parameter in the target regression model.
[0096] surface :
[0097]
[0098] Optionally, in this embodiment, if the constructed target regression model is constructed based on the logistic distribution, then for a target object whose target feature is 0, the probability of a preset abnormal behavior occurring is fixed at 0.5.
[0099] Optionally, in this embodiment, if the constructed target regression model is constructed based on the improved complementary double logarithmic extreme value distribution, then for the target object with a target feature of 0, the probability of the occurrence of the preset abnormal behavior is no longer fixed at 0.5, but The relationship between this value and 0.5 reflects the style of management strategy that the model believes business personnel should adopt.
[0100] Optionally, in this embodiment, if the target regression model , which means that the model believes that a more "aggressive" management strategy should be adopted for such customers, that is, the model believes that "the probability of most people engaging in preset abnormal behaviors is not low". Assuming that the target feature value when the probability is equal to 0.5 is ,Right now , , then the management strategy determined is an aggressive management strategy.
[0101] Optionally, when this embodiment is applied in a financial data processing scenario, when the determined management strategy is an aggressive management strategy, the customer group division of the object is as shown in Table 3. According to the target characteristics of the target object, the probability of the preset abnormal behavior can be judged, and then the customer group type of the target object can be determined.
[0102] Table 3:
[0103]
[0104] Optionally, when this embodiment is applied to a scenario of financial data processing, such as Figure 6 As shown in the relationship diagram between the customer type of the object of the embodiment of the present application and its occurrence of preset abnormal behavior, when the determined management strategy is an aggressive management strategy, the probability of the high-quality customer group occurring the preset abnormal behavior is very low. In contrast, the probability of the dangerous customer group occurring the preset abnormal behavior is higher. The middle customer group is a customer group that belongs to the additional screening, and its probability of occurring the preset abnormal behavior is no longer fixed at 0.5.
[0105] Optionally, when this embodiment is applied to the scenario of financial data processing, if the target regression model , which means that the model believes that a more "conservative" management strategy should be adopted for such customers, that is, the model believes that "most people have a low probability of default". Assuming that the target feature value when the probability is equal to 0.5 is ,Right now , , then the management strategy determined is a conservative management strategy.
[0106] Optionally, when this embodiment is applied in a financial data processing scenario, when the determined management strategy is a conservative management strategy, the customer group of the target object is divided as shown in Table 4. According to the target characteristics of the target object, the probability of the preset abnormal behavior can be judged, and then the customer type of the target object can be determined.
[0107] Table 4:
[0108]
[0109] Optionally, when this embodiment is applied to a scenario of financial data processing, such as Figure 7 As shown in the relationship diagram between the customer type of the object of the embodiment of the present application and its occurrence of preset abnormal behavior, when the determined management strategy is a conservative management strategy, the probability of the high-quality customer group occurring the preset abnormal behavior is very low. In contrast, the probability of the dangerous customer group occurring the preset abnormal behavior is higher. The middle customer group is the customer group that belongs to the key screening, and its probability of occurring the preset abnormal behavior is no longer fixed at 0.5.
[0110] Optionally, when this embodiment is applied to a scenario of financial data processing, if the target regression model is constructed based on the third distribution function, or the target regression model , which means that the model believes that a “prudent” management strategy should be adopted for such customers, that is, the model believes that “the probability of default for most people is moderate”.
[0111] Optionally, when this embodiment is applied in a financial data processing scenario, when the determined management strategy is a robust management strategy, the customer group of the target object is divided as shown in Table 5. According to the target characteristics of the target object, the probability of the preset abnormal behavior can be judged, and then the customer type of the target object can be determined.
[0112] Table 5:
[0113]
[0114] It should be noted that, through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0115] In this embodiment, a device for constructing a regression model 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.
[0116] Figure 8 is a schematic diagram of a method for constructing a regression model according to an embodiment of the present application, such as Figure 8As shown in the figure, after introducing the neutral parameter and the scale parameter, the improved complementary double logarithmic extreme value distribution is used as a fitting tool to introduce it into the rationality judgment tool of logistic regression based on KL divergence. If the traditional logistic regression is reasonable, the target regression model is constructed based on the traditional logistic regression; if the traditional logistic regression is unreasonable, the asymmetric regression model that improves the attention of rare events by introducing the improved complementary double logarithmic extreme value distribution is used, and the scale parameter and the neutral parameter are continuously optimized to further construct the target regression model. Based on the probability of the target object having the preset abnormal behavior output by the constructed target regression model, the appropriate management strategy is selected and the target object's customer group is divided.
[0117] Optionally, this embodiment can be applied to the field of data processing. Specifically, for example, in the scenario of medical data processing, since the effect of drug dosage on disease is not symmetrically distributed, after collecting data related to drug dosage and disease recovery degree, the regression model construction method provided in this application can be used to construct a model. The specific steps are as follows:
[0118] Determine a first scale parameter and a first neutral parameter based on N actual drug usages of N drugs, wherein each actual drug usage is a feature determined based on the weighted values of M target parameters, the target parameters include basic information of the drug, the first scale parameter is used to adjust the shape and curvature of the probability density of the influence of the actual drug usage on the disease recovery, and the first neutral parameter is used to adjust the proportion of abnormal influence of the actual drug usage on the disease recovery, and N and M are both positive integers;
[0119] The first distribution function is adjusted based on the first scale parameter and the first neutral parameter to obtain a target distribution function, wherein the first distribution function is used to fit the influence of the actual usage of the drug distributed in an asymmetric form on the recovery of the disease, and the first distribution function is a complementary double logarithmic extreme value distribution function;
[0120] Calculate a first KL divergence between the second distribution function and the third distribution function, and a second KL divergence between the second distribution function and the target distribution function, wherein the second distribution function is used to represent the distribution of the degree of influence of the actual usage of N drugs on disease recovery, the third distribution function is used to represent the probability distribution of the abnormal influence of the usage of N drugs on disease recovery, the first KL divergence is used to represent the degree of difference between the second distribution function and the third distribution function, and the second KL divergence is used to represent the degree of difference between the second distribution function and the target distribution function;
[0121] Based on the comparison result between the first KL divergence and the second KL divergence, a target regression model is constructed, wherein the target regression model is used to output the degree of influence of disease recovery under the target drug usage.
[0122] Fig. 9 is a structural block diagram of a regression model construction device according to an embodiment of the present application, such as Fig. 9 As shown, the device comprises:
[0123] A first determination module 92 is used to determine a first scale parameter and a first neutral parameter based on a first target feature of the target object, wherein the first target feature is a feature determined based on weighted values of N target parameters, the target parameters include object information of the object, the first scale parameter is used to adjust the shape and curvature of the probability density of the target feature of the object, the first neutral parameter is used to adjust the proportion of the target feature as an abnormal feature, and N is a positive integer greater than 0;
[0124] A first adjustment module 94 is used to adjust the first distribution function based on the first scale parameter and the first neutral parameter to obtain a target distribution function, wherein the first distribution function is used to fit an object distributed in an asymmetric form, and the first distribution function is a complementary double logarithmic extreme value distribution function;
[0125] A first calculation module 96 is used to calculate a first KL divergence between the second distribution function and the third distribution function, and a second KL divergence between the second distribution function and the target distribution function, wherein the second distribution function is used to represent the distribution of the N objects, the third distribution function is used to represent the probability distribution of the N objects having a preset abnormal behavior, the first KL divergence is used to represent the degree of difference between the second distribution function and the third distribution function, and the second KL divergence is used to represent the degree of difference between the second distribution function and the target distribution function;
[0126] The first construction module 98 is used to construct a target regression model based on the comparison result between the first KL divergence and the second KL divergence, wherein the target regression model is used to output the probability of the target object having the preset abnormal behavior.
[0127] In an exemplary embodiment, the apparatus is further used to calculate a first proportion of a first object, wherein the first object is any object among the N objects whose characteristic value is less than or equal to 0; determine a relationship between the first proportion and a fourth distribution function, wherein the fourth distribution function is , the above A neutral parameter for representing the first object, ; Determine the first neutral parameter according to the relationship between the first proportion and the fourth distribution function; and determine the first scale parameter using the first neutral parameter.
[0128] In an exemplary embodiment, the apparatus is further used to calculate a second proportion of a second object, wherein the second object is an object whose characteristic value is equal to 0 among the N objects; determine a relationship between a fifth distribution function and the second proportion, wherein the fifth distribution function is , the above It is used to represent the first scale parameter mentioned above. is used to represent the second proportion; based on the relationship between the fifth distribution function and the second proportion, and the first neutral parameter, the first scale parameter is determined, wherein the first scale parameter is .
[0129] In an exemplary embodiment, the above-mentioned device is also used to construct a first log-likelihood function; perform a maximum likelihood operation on the above-mentioned first log-likelihood function to calculate a weight vector of the target parameters of the above-mentioned object; and construct the above-mentioned third distribution function based on the weight vector of the target parameters of the above-mentioned object.
[0130] In an exemplary embodiment, the above-mentioned device is also used to determine the second target feature using the weight vector of the target parameters of the N above-mentioned target objects; determine the above-mentioned second distribution function using the above-mentioned second target feature; calculate the first KL divergence between the above-mentioned second distribution function and the above-mentioned third distribution function, and the second KL divergence between the above-mentioned second distribution function and the above-mentioned target distribution function.
[0131] In an exemplary embodiment, the apparatus is further configured to calculate a first KL divergence between the second distribution function and the third distribution function using a first formula, wherein the first formula is: , the above It is used to represent the second distribution function. is used to represent the third distribution function; the second KL divergence between the second distribution function and the target distribution function is calculated by the second formula, wherein the second formula is , the above Used to represent the above target distribution function.
[0132] In an exemplary embodiment, the above-mentioned device is also used to compare the above-mentioned first KL divergence and the above-mentioned second KL divergence; when the above-mentioned first KL divergence is less than or equal to the above-mentioned second KL divergence, the above-mentioned target regression model is constructed based on the above-mentioned third distribution function; or, when the above-mentioned first KL divergence is greater than the above-mentioned second KL divergence, the above-mentioned target regression model is constructed based on the above-mentioned target distribution function.
[0133] In an exemplary embodiment, the above-mentioned device is also used to calculate the third KL divergence between the sixth distribution function and the seventh distribution function, wherein the above-mentioned sixth distribution function is used to represent the probability distribution of the preset abnormal behavior of the N above-mentioned objects, and the above-mentioned seventh distribution function is used to represent the distribution of the N above-mentioned objects; calculate the fourth KL divergence between the above-mentioned seventh distribution function and the eighth distribution function, wherein the above-mentioned eighth distribution function is used to fit objects distributed in an asymmetric form; based on the comparison result between the above-mentioned third KL divergence and the above-mentioned fourth KL divergence, construct the above-mentioned target regression model.
[0134] In an exemplary embodiment, the apparatus is further used to construct a second log-likelihood function of a third formula, wherein the third formula is , the above Used to represent the first neutral parameter mentioned above, is used to represent the first scale parameter; the second log-likelihood function is subjected to the maximum likelihood operation to obtain , among which, the above A weight vector for representing the target parameters of the above object; based on the above third formula and the above , construct the seventh distribution function.
[0135] In an exemplary embodiment, the above device is also used based on the above Determine the third target feature; calculate the third proportion of the third object using the third target feature, where the fourth formula is: , the above Used to represent the characteristics of the i-th object; determine the relationship between the fourth distribution function and the above-mentioned third proportion; use the relationship between the above-mentioned fourth distribution function and the above-mentioned third proportion to determine the second neutral parameter; use the above-mentioned second neutral parameter to calculate the second scale parameter; construct the above-mentioned eighth distribution function based on the above-mentioned second neutral parameter and the above-mentioned second scale parameter.
[0136] In an exemplary embodiment, the apparatus is further configured to compare the third KL divergence with the fourth KL divergence; when the third KL divergence is less than or equal to the fourth KL divergence, based on the and the above Constructing the target regression model; or, when the third KL divergence is greater than the fourth KL divergence, recalculating the third KL divergence and the fourth KL divergence, and reconstructing the target regression model, wherein the reconstructed target regression model corresponds to the sixth distribution function.
[0137] In an exemplary embodiment, the device is further used to iteratively calculate the third KL divergence and the fourth KL divergence to reconstruct the target regression model; wherein the iterative calculation of the third KL divergence and the fourth KL divergence comprises: in the i-th iteration, based on the and the above Re-determine the third KL divergence and the fourth KL divergence, where the above in the i-th iteration Corresponding to the i-1th iteration , the above in the above i-th iteration Corresponding to the above i-1th round of iteration , the above is the neutral parameter obtained in the above i-1th round of iteration. is the scale parameter obtained in the above i-1th iteration.
[0138] In an exemplary embodiment, the above-mentioned device is also used to obtain object information of the target object; based on the object information of the above-mentioned target object, the above-mentioned target regression model is used to determine a first probability, wherein the above-mentioned first probability is the probability that the above-mentioned target object will undergo the above-mentioned preset abnormal behavior; based on the above-mentioned first probability, a management strategy is determined, wherein the above-mentioned management strategy includes three types of management strategies: radical, conservative, and robust.
[0139] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0140] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0141] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0142] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0143] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0144] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0145] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0146] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.
[0147] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0148] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0149] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for constructing a regression model, characterized in that: The method comprises: Determine a first scale parameter and a first neutral parameter based on N first target features of N objects, wherein each of the first target features is a feature determined based on a weighted value of M target parameters, the target parameter is object information of the object, the first scale parameter is used to adjust the shape and curvature of the probability density of the first target feature of the object, the first neutral parameter is used to adjust the proportion of the first target feature as an abnormal feature, N and M are both positive integers, and the object information includes basic information of the object, property information of the object, product usage behavior information of the object, information searched by the object on the platform, and information of goods purchased by the object; adjusting a first distribution function based on the first scale parameter and the first neutral parameter to obtain a target distribution function, wherein the first distribution function is used to fit objects distributed in an asymmetric form, and the first distribution function is a complementary double logarithmic extreme value distribution function; Calculating a first KL divergence between the second distribution function and the third distribution function, and a second KL divergence between the second distribution function and the target distribution function, wherein the second distribution function is used to represent the distribution of the N objects, the third distribution function is used to represent the probability distribution of preset abnormal behaviors of the N objects, the first KL divergence is used to represent the degree of difference between the second distribution function and the third distribution function, the second KL divergence is used to represent the degree of difference between the second distribution function and the target distribution function, and the preset abnormal behaviors include default behaviors, loan maturity behaviors, and collection behaviors of the objects; Based on the comparison result between the first KL divergence and the second KL divergence, a target regression model is constructed, wherein the target regression model is used to output the probability that the target object has the preset abnormal behavior; Wherein, determining the first scale parameter and the first neutral parameter based on the N first target features of the N objects includes: Calculating a first proportion of a first object, wherein the first object is any object among the N objects whose characteristic value is less than or equal to 0; Determine the relationship between the first proportion and a fourth distribution function, wherein the fourth distribution function is CDF RareEvent (0) = (1-e -θ ) v(θ) , the θ is used to represent the neutral parameter of the first object, the determining the first neutral parameter according to the relationship between the first proportion and the fourth distribution function; determining the first scale parameter using the first neutral parameter; Determining the first scale parameter using the first neutral parameter includes: Calculating a second proportion of a second object, wherein the second object is an object whose characteristic value is equal to 0 among the N objects; Determine the relationship between a fifth distribution function and the second proportion, wherein the fifth distribution function is The δ is used to represent the first scale parameter, and the pdf RareEvent (0) is used to represent the second proportion; the first scale parameter is determined based on the relationship between the fifth distribution function and the second proportion, and the first neutral parameter, wherein the first scale parameter is 2. The method according to claim 1, characterized in that Before calculating a first KL divergence between the second distribution function and the third distribution function, and a second KL divergence between the second distribution function and the target distribution function, the method further includes: Construct the first log-likelihood function; Performing a maximum likelihood operation on the first log-likelihood function to calculate a weight vector of target parameters of the object; The third distribution function is constructed based on a weight vector of target parameters of the object.
3. The method according to claim 1, characterized in that Calculating a first KL divergence between the second distribution function and the third distribution function, and a second KL divergence between the second distribution function and the target distribution function, comprising: Determining a second target feature using a weight vector of target parameters of the N objects; determining the second distribution function using the second target feature; A first KL divergence between the second distribution function and the third distribution function and a second KL divergence between the second distribution function and the target distribution function are calculated.
4. The method according to claim 3, characterized in that Calculating a first KL divergence between the second distribution function and the third distribution function, and a second KL divergence between the second distribution function and the target distribution function, comprising: The first KL divergence between the second distribution function and the third distribution function is calculated by a first formula, wherein the first formula is: The pdf sample For representing the second distribution function, the pdf logit Used to represent the third distribution function; The second KL divergence between the second distribution function and the target distribution function is calculated by a second formula, wherein the second formula is: The pdf RareEvent Used to represent the target distribution function.
5. The method according to claim 1, characterized in that Based on the comparison result between the first KL divergence and the second KL divergence, a target regression model is constructed, including: comparing the first KL divergence and the second KL divergence; When the first KL divergence is less than or equal to the second KL divergence, constructing the target regression model based on the third distribution function; or, When the first KL divergence is greater than the second KL divergence, the target regression model is constructed based on the target distribution function.
6. The method according to claim 5, characterized in that When the first KL divergence is greater than the second KL divergence, building a target regression model based on the target distribution function includes: Calculating a third KL divergence between a sixth distribution function and a seventh distribution function, wherein the sixth distribution function is used to represent the probability distribution of the N objects having a preset abnormal behavior, and the seventh distribution function is used to represent the distribution of the N objects; calculating a fourth KL divergence between the seventh distribution function and an eighth distribution function, wherein the eighth distribution function is used to fit an object distributed in an asymmetric form; Based on the comparison result between the third KL divergence and the fourth KL divergence, the target regression model is constructed.
7. The method according to claim 6, characterized in that Calculating the third KL divergence between the sixth distribution function and the seventh distribution function includes: Construct the second log-likelihood function of the third formula, where the third formula is P y=1 =CDF RareEvent (θ start , δ start ), the θ start is used to represent the first neutral parameter, the δ start used to represent the first scale parameter; Performing the maximum likelihood operation on the second log-likelihood function, we get ω start , where the ω start a weight vector for representing target parameters of the object; Based on the third formula and the ω start , construct the seventh distribution function.
8. The method according to claim 6, characterized in that Before calculating the fourth KL divergence between the seventh distribution function and the eighth distribution function, the method further includes: Based on the ω start determining a third target characteristic; The third proportion of the third object is calculated using the third target feature, wherein the fourth formula is: The z i Used to represent the characteristics of the i-th object; Determining a relationship between a fourth distribution function and the third proportion; Determine a second neutral parameter using the relationship between the fourth distribution function and the third proportion; Calculating a second scale parameter using the second neutral parameter; The eighth distribution function is constructed based on the second neutral parameter and the second scale parameter.
9. The method according to claim 6, characterized in that Based on the comparison result between the third KL divergence and the fourth KL divergence, constructing a target regression model includes: comparing the third KL divergence and the fourth KL divergence; When the third KL divergence is less than or equal to the fourth KL divergence, based on the θ start and the δ start Constructing the target regression model; Alternatively, when the third KL divergence is greater than the fourth KL divergence, the third KL divergence and the fourth KL divergence are recalculated, and the target regression model is reconstructed, wherein the reconstructed target regression model corresponds to the sixth distribution function.
10. The method according to claim 9, characterized in that When the third KL divergence is greater than the fourth KL divergence, reconstructing the target regression model and recalculating the third KL divergence and the fourth KL divergence include: Iteratively calculating the third KL divergence and the fourth KL divergence, and reconstructing the target regression model; The iterative calculation of the third KL divergence and the fourth KL divergence includes: in the i-th iteration, based on the θ start and the δ start Re-determine the third KL divergence and the fourth KL divergence, wherein the θ in the i-th iteration start Corresponding to θ in the i-1th iteration new , the δ in the i-th iteration start Corresponding to the δ in the i-1th iteration new , the θ new is the neutral parameter obtained in the i-1th iteration, the δ new is the scale parameter obtained in the i-1th iteration.
11. The method according to claim 5, characterized in that After constructing a target regression model based on a comparison result between the first KL divergence and the second KL divergence, the method further includes: Get the object information of the target object; Based on the object information of the target object, determining a first probability using the target regression model, wherein the first probability is a probability that the target object will have the preset abnormal behavior; A management strategy is determined based on the first probability, wherein the management strategy includes three types of management strategies: radical, conservative, and robust.
12. A device for constructing a regression model, characterized in that: include: A first determination module is used to determine a first scale parameter and a first neutral parameter based on N first target features of N objects, wherein each of the first target features is a feature determined based on a weighted value of M target parameters, the target parameter is object information of the object, the first scale parameter is used to adjust the shape and curvature of the probability density of the first target feature of the object, the first neutral parameter is used to adjust the proportion of the first target feature as an abnormal feature, N and M are both positive integers, and the object information includes basic information of the object, property information of the object, product usage behavior information of the object, information searched by the object on the platform, and commodity information purchased by the object; A first adjustment module is used to adjust a first distribution function based on the first scale parameter and the first neutral parameter to obtain a target distribution function, wherein the first distribution function is used to fit an object distributed in an asymmetric form, and the first distribution function is a complementary double logarithmic extreme value distribution function; a first calculation module, used to calculate a first KL divergence between a second distribution function and a third distribution function, and a second KL divergence between the second distribution function and the target distribution function, wherein the second distribution function is used to represent the distribution of the N objects, the third distribution function is used to represent the probability distribution of preset abnormal behaviors of the N objects, the first KL divergence is used to represent the degree of difference between the second distribution function and the third distribution function, the second KL divergence is used to represent the degree of difference between the second distribution function and the target distribution function, and the preset abnormal behaviors include behaviors of default, loan maturity, and collection by the objects; A first construction module, configured to construct a target regression model based on a comparison result between the first KL divergence and the second KL divergence, wherein the target regression model is configured to output a probability that the target object has the preset abnormal behavior; The first determination module is further configured to calculate a first proportion of a first object, wherein the first object is any object among the N objects whose characteristic value is less than or equal to 0; determine a relationship between the first proportion and a fourth distribution function, wherein the fourth distribution function is CDF RareEvent (0) = (1-e -θ ) v(θ) , the θ is used to represent the neutral parameter of the first object, the determining the first neutral parameter according to the relationship between the first proportion and the fourth distribution function; and determining the first scale parameter using the first neutral parameter; The first determination module is further used to calculate a second proportion of a second object, wherein the second object is an object with a characteristic value equal to 0 among the N objects; determine a relationship between a fifth distribution function and the second proportion, wherein the fifth distribution function is The δ is used to represent the first scale parameter, and the pdf RareEvent (0) is used to represent the second proportion; the first scale parameter is determined based on the relationship between the fifth distribution function and the second proportion, and the first neutral parameter, wherein the first scale parameter is 13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 11 when executed by a processor.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Rejection inference method based on Cox regression and logistic regression and electronic equipment
CN111798310A
Logistic regression model training method and device, computer equipment and storage medium
CN113255927A