Resource data allocation method and device
By calculating the feature weight in the credit risk assessment model and combining internal and external distances, the target feature set is screened out and a classifier is constructed, which solves the problem of inaccurate credit risk assessment in the existing technology and improves the accuracy and accuracy of credit risk prediction. Resource allocation efficiency.
Patent Information
- Application Number
- CN202410790897.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-09-17
AI Technical Summary
The credit risk assessment model in the existing technology cannot accurately represent risk characteristics during the feature selection process, resulting in inaccurate credit risk prediction.
By obtaining the sample set and label set of feature data with risk characteristics, use the preset feature selection algorithm to calculate the feature weight of each original feature, combine the internal and external distances, filter out the target feature set, and build a classifier based on the target feature set Make risk predictions.
It improves the accuracy of credit risk prediction and the efficiency of resource allocation, ensures that the selected features are more relevant to the risk category, and improves resource utilization.
Smart Images

Figure CN118657607A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine learning technology, and more particularly to a resource data allocation method and device. Background Art
[0002] With the rapid development of big data service platform technology, the types of financial resource data services and the service channels available are becoming more diverse and convenient. Credit risk assessment plays a vital role in the financial field and is of strategic importance to banks, financial institutions, credit card companies and other loan providers. Credit risk assessment aims to quantify the probability of a person or institution defaulting in the future, thereby helping decision makers make decisions such as loan approval, interest rate setting and credit limits to reduce the risk of default and maintain the healthy operation of financial institutions.
[0003] At present, when credit risk assessment is performed based on machine learning models, it is usually necessary to select a small number of useful features from a large number of features for model training. Feature selection is to automatically select a subset of the most important features for prediction. However, the features selected by the feature selection method in the prior art may not accurately represent the risk characteristics, making the trained model unable to accurately predict credit risk.
[0004] To address the above problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of this specification provide a resource data allocation method and device to solve the problem of inaccurate credit risk assessment in the prior art.
[0006] The embodiment of this specification provides a resource data allocation method, including:
[0007] Acquire a sample set having feature data for characterizing risk features of an object and a label set; wherein the label set includes a risk category corresponding to each sample in the sample set;
[0008] Calculating the feature weight of each of the multiple original features corresponding to the sample set by using a preset feature selection algorithm, and selecting a target feature set from the multiple original features according to the feature weight of each original feature;
[0009] Based on the target feature set, the sample set and the label set, a classifier is constructed to allocate resource data to the target object based on the risk prediction result of the classifier on the target object;
[0010] Among them, the feature weight of each original feature is determined based on the distance between different samples under each original feature; the distance between different samples under each original feature is calculated based on the internal distance and external distance of different samples under each original feature, the internal distance is used to characterize the distance between two samples under the current original feature, and the external distance is used to characterize the influence of other original features among the multiple original features except the current original feature on the distance between two samples under the current original feature.
[0011] In one embodiment, the feature weight of each original feature in all original features included in the sample set is calculated using a preset feature selection algorithm, including:
[0012] Repeat the following steps for a preset number of times to obtain the final feature weights of the original features:
[0013] Selecting a target sample from the sample set;
[0014] Determine a plurality of first samples that are closest to the target sample from samples in the sample set that are in the same risk category as the target sample; determine a plurality of second samples that are closest to the target sample from samples in the sample set that are in a different risk category from the target sample;
[0015] Calculating the distance between each first sample in the plurality of first samples and the target sample under the respective original features, and calculating the distance between each second sample in the plurality of second samples and the target sample under the respective original features;
[0016] The feature weights of the original features are updated according to the distances between the first samples and the target sample under the original features and the distances between the second samples and the target sample under the original features.
[0017] In one embodiment, updating the feature weights of the original features according to the distances between the first samples and the target samples under the original features and the distances between the second samples and the target samples under the original features includes:
[0018] Update the feature weights of the original features according to the following formula:
[0019]
[0020] Wherein, W[A] is the feature weight of the original feature A after update, W′[A] is the feature weight of the original feature A before update, m is the preset number, k represents the number of first samples and the number of second samples, R i represents the i-th target sample, where i∈(1,2,…m), P(class(Ri )) represents the risk category and the i-th target sample R i The probability that a sample with the same risk category as the target sample appears in the entire sample set, C is the risk category in the label set that is different from the risk category of the target sample, P(C) represents the probability that a sample with risk category C appears in the entire sample set, and H represents the probability that a sample with risk category C appears in the entire sample set. i The collection of multiple first samples with the same risk category, H j represents the jth first sample; M(C) represents the set of multiple second samples with risk category C, M j (C) is the second sample of the j-th risk category C, and D(A, I1, I2) represents the distance between sample I1 and sample I2 under the original feature A.
[0021] In one embodiment, the distances of different samples under the original features are calculated according to the following formula:
[0022]
[0023] Among them, D(a i ,x1,x2) are the samples x1 and x2 in the sample set in the i-th original feature a i The distance under, i∈(1,2,…n), n is the number of the multiple original features, V j (x1) indicates that sample x1 has the jth original feature a j The eigenvalue under i (x2) means sample x2 has the original feature a in the i-th i The eigenvalue under δ(V j (x1),V i (x2)) represents the original feature a i Lower eigenvalue V j (x1) and eigenvalue V i (x2) is the distance between them.
[0024] In one embodiment, the original feature a is calculated according to the following formula i Lower eigenvalue V j (x1) and eigenvalue V i The distance between (x2):
[0025]
[0026] Among them, δ(V j (x1),V i (x2)) represents the original feature a in the i-th i Lower eigenvalue V j (x1) and eigenvalue V i(x2), n is the number of the multiple original features, Represents the jth original feature a j Lower eigenvalue V j (x1) and eigenvalue V i (x2) is the distance between them.
[0027] In one embodiment, when j=i,
[0028]
[0029] in, is the eigenvalue V i (x1) and eigenvalue V i (x2) in the i-th original feature a i The inner distance under V i (x1) means sample x1 has the original feature a in the i-th i The eigenvalue under i (x2) means sample x2 has the original feature a in the i-th i The eigenvalues below.
[0030] In one embodiment, when i≠j,
[0031]
[0032] in, is the eigenvalue V j (x1) and eigenvalue V i (x2) in the i-th original feature a i The external distance under, U is the sample set, |U| is the number of samples in the sample set U, X represents the original feature a in the i-th sample set U i Below and eigenvalue V j (x1) is a set of samples with indistinguishable relationships, and Y represents the original feature a in the i-th sample set U. i Below and eigenvalue V i (x2) A set of samples with indistinguishable relations; Represents sample x with respect to the jth original feature a of set X j The rough set membership on Represents sample x with respect to the jth original feature a of set Y j The rough set membership on .
[0033] The embodiment of this specification also provides a resource data allocation device, including:
[0034] An acquisition module, used to acquire a sample set having feature data for characterizing risk features of an object and a label set; wherein the label set includes a risk category corresponding to each sample in the sample set;
[0035] A screening module, used to calculate the feature weight of each of the multiple original features corresponding to the sample set by using a preset feature selection algorithm, and screen out a target feature set from the multiple original features according to the feature weight of each original feature;
[0036] An allocation module, configured to construct a classifier based on the target feature set, the sample set and the label set, so as to allocate resource data to the target object based on the risk prediction result of the classifier on the target object;
[0037] Among them, the feature weight of each original feature is determined based on the distance between different samples under each original feature; the distance between different samples under each original feature is calculated based on the internal distance and external distance of different samples under each original feature, the internal distance is used to characterize the distance between two samples under the current original feature, and the external distance is used to characterize the influence of other original features among the multiple original features except the current original feature on the distance between two samples under the current original feature.
[0038] The embodiments of the present specification also provide a computer device, including a processor and a memory for storing processor executable instructions, wherein the processor implements the steps of the resource data allocation method described in any of the above embodiments when executing the instructions.
[0039] The embodiments of the present specification also provide a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps of the resource data allocation method described in any of the above embodiments are implemented.
[0040] The embodiments of the present specification also provide a computer program product, including a computer program / instruction, which implements the steps of the resource data allocation method described in any of the above embodiments when executed by a processor.
[0041] In an embodiment of the present specification, a resource data allocation method is provided, and a server can obtain a sample set and a label set having feature data for characterizing risk features of an object. The server can calculate the feature weight of each original feature in the corresponding multiple original features in the sample set using a preset feature selection algorithm. When calculating the feature weight using the preset feature selection algorithm, the feature weight of each original feature is determined based on the distance of different samples under each original feature. The distance of different samples under each original feature is calculated based on the internal distance and external distance of different samples under each original feature. The internal distance is used to characterize the distance between two samples under the current original feature. The external distance is used to characterize the influence of other original features other than the current original feature in the multiple original features on the distance between two samples under the current original feature. When calculating the distance of different samples under the current original feature, not only the distance between the two samples under the current original feature is considered, but also the influence of other original features on the distance between the two samples under the current original feature is considered, so that the distance between different samples under the current original feature can be calculated more accurately, so that the feature weight of the current original feature can be calculated more accurately, so that the selected feature is more associated with the risk category. Afterwards, the server can filter out the target feature set from the multiple original features according to the feature weights of each original feature. The server can construct a classifier based on the target feature set, the sample set and the label set, which can improve the accuracy of classification, and further improve the accuracy of resource allocation based on the risk prediction results identified by the classifier, thereby improving the efficiency and accuracy of resource allocation and improving resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings described herein are used to provide a further understanding of this specification, constitute a part of this specification, and do not constitute a limitation of this specification. In the drawings:
[0043] Figure 1 A flow chart showing a method for allocating resource data in an embodiment of this specification is shown;
[0044] Figure 2 A schematic diagram of a resource data allocation device in an embodiment of this specification is shown;
[0045] Figure 3 A schematic diagram of a computer device in an embodiment of the present specification is shown. DETAILED DESCRIPTION
[0046] The principles and spirit of this specification will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement this specification, and are not intended to limit the scope of this specification in any way. On the contrary, these embodiments are provided to make this specification more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.
[0047] Those skilled in the art will appreciate that the embodiments of this specification may be implemented as a system, device, method, or computer program product. Therefore, this specification may be implemented in the following forms: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0048] The information collected in the embodiments of this specification is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0049] The embodiment of the present specification provides a resource data allocation method. In a scenario example, a server may obtain a sample set and a label set having feature data for characterizing risk features of an object. The label set includes the risk category corresponding to each sample in the sample set. The server may calculate the feature weight of each original feature in the corresponding multiple original features in the sample set using a preset feature selection algorithm. When calculating the feature weight using the preset feature selection algorithm, the feature weight of each original feature is determined based on the distance of different samples under each original feature. The distance of different samples under each original feature is calculated based on the internal distance and external distance of different samples under each original feature. The internal distance is used to characterize the distance between two samples under the current original feature. The external distance is used to characterize the influence of other original features other than the current original feature in the multiple original features on the distance between two samples under the current original feature. In this embodiment, when calculating the distance of different samples under the current original feature, not only the distance between the two samples under the current original feature is considered, but also the influence of other original features on the distance between the two samples under the current original feature is considered, so that the distance between different samples under the current original feature can be more accurately calculated, thereby more accurately calculating the feature weight of the current original feature.
[0050] Afterwards, the server can filter out a target feature set from the multiple original features according to the feature weights of the original features. The server can construct a classifier based on the target feature set, the sample set and the label set, which can improve the accuracy of classification. The server can receive a risk prediction request sent by the client. The server can respond to the risk prediction request and input the feature data corresponding to the target object into the classifier, and can obtain the risk prediction result corresponding to the target. The server can allocate resource data to the target object according to the risk prediction result of the target object.
[0051] The server can be a single server, a server cluster, or a cloud server, etc. The specific composition is not limited in this application. The client can be a desktop computer, a notebook, a mobile terminal, a PDA, etc., as long as it can display content to users or business personnel and receive operation instructions. The presentation of the client is not limited in this application.
[0052] Figure 1 A flow chart of a resource data allocation method in an embodiment of the present specification is shown. Although the present specification provides method operation steps or device structures as shown in the following embodiments or drawings, more or fewer operation steps or module units may be included in the method or device based on routine or no creative labor. In the steps or structures where there is no necessary causal relationship logically, the execution order of these steps or the module structure of the device is not limited to the execution order or module structure described in the embodiments of the present specification and shown in the drawings. When the method or module structure is applied to an actual device or terminal product, it can be connected according to the method or module structure shown in the embodiments or drawings for sequential execution or parallel execution (for example, a parallel processor or a multi-threaded processing environment, or even a distributed processing environment).
[0053] Specifically, Figure 1 As shown, a resource data allocation method provided by an embodiment of the present specification may include the following steps.
[0054] Step S101, obtaining a sample set having feature data for characterizing risk features of an object and a label set; wherein the label set includes a risk category corresponding to each sample in the sample set.
[0055] The method in this embodiment can be applied to a server. The server can obtain a sample set and a label set. The sample set contains feature data for characterizing the risk characteristics of the object. The sample set may include multiple samples. The feature data may be feature data extracted from the business data of the user stored in the business system of the financial institution. The feature data may correspond to multiple original features. Feature extraction may be performed through feature engineering. The feature data extraction method and feature type may be set according to the actual application scenario, which is not limited here. Of course, it may also include feature data extracted from user information obtained by the server from a platform associated with the financial institution.
[0056] The label set includes the risk category corresponding to each sample in the sample set. The risk category can be risky, no risk, etc., or high risk, medium risk, low risk, etc. It can be configured according to the actual application scenario.
[0057] Step S102, using a preset feature selection algorithm to calculate the feature weight of each of the multiple original features corresponding to the sample set, and screening out a target feature set from the multiple original features according to the feature weight of each of the original features.
[0058] The server can use a preset feature selection algorithm to calculate the feature weight of each of the multiple original features corresponding to the sample set. The feature weight is used to characterize the degree of association between the feature and the label. The larger the feature weight, the higher the degree of association between the feature and the label, that is, the greater the impact of the feature value on the risk category value.
[0059] When calculating feature weights using a preset feature selection algorithm, the feature weights of the original features can be determined based on the distances of different samples under the original features. The distances of different samples under the original features are calculated based on the internal distances and external distances of different samples under the original features. The internal distance is used to characterize the distance between two samples under the current original feature when only the current original feature is considered. The external distance is used to characterize the influence of other original features among the multiple original features except the current original feature on the distance between two samples under the current original feature.
[0060] After calculating the feature weights of the original features, the target feature set can be screened out from the multiple original features according to the feature weights of the original features. In one embodiment, a preset threshold can be set, and the original features whose feature weights are greater than the preset threshold are determined as the target feature set. In another embodiment, the multiple original features can be sorted from large to small according to the feature weights, and the original features with a preset number of features in the front can be used as the target feature set.
[0061] Step S103: constructing a classifier based on the target feature set, the sample set and the label set, so as to allocate resource data to the target object based on the risk prediction result of the classifier on the target object.
[0062] In this embodiment, the server can select a classification algorithm as needed when constructing a classifier, such as Bayesian, support vector machine, neural network, etc. A training sample set related to the target feature set can be screened out from the sample set according to the target feature set. Based on the selected classification algorithm, a classifier is constructed according to the training sample set and the label set.
[0063] In the above embodiment, when calculating the distance between different samples under the current original feature, not only the distance between two samples under the current original feature is considered, but also the influence of other original features on the distance between two samples under the current original feature is considered, so that the distance between different samples under the current original feature can be calculated more accurately, and thus the feature weight of the current original feature can be calculated more accurately, so that the selected feature is more correlated with the risk category. Afterwards, the server can filter out a target feature set from the multiple original features according to the feature weights of the original features. The server can construct a classifier based on the target feature set, the sample set and the label set, which can improve the accuracy of classification, and further improve the accuracy of resource allocation based on the risk prediction results identified by the classifier, which can improve the efficiency and accuracy of resource allocation and improve resource utilization.
[0064] In some embodiments of the present specification, using a preset feature selection algorithm to calculate the feature weight of each original feature of all the original features included in the sample set may include: repeating the following steps a preset number of times to obtain the final feature weight of each original feature: selecting a target sample from the sample set; determining a plurality of first samples that are closest to the target sample from samples in the sample set that have the same risk category as the target sample; determining a plurality of second samples that are closest to the target sample from samples in the sample set that have a different risk category from the target sample; calculating the distance between each first sample in the plurality of first samples and the target sample under each original feature, and calculating the distance between each second sample in the plurality of second samples and the target sample under each original feature; updating the feature weight of each original feature according to the distance between each first sample and the target sample under each original feature and the distance between each second sample and the target sample under each original feature.
[0065] In this embodiment, a target sample can be randomly selected from a sample set, and multiple similar neighboring samples of the target sample, i.e., multiple first samples, can be selected from the sample set. Multiple heterogeneous neighboring samples of the target sample, i.e., multiple second samples, can also be selected from the sample set. The distance between each first sample in the multiple first samples and the target sample under the original features and the distance between each first sample in the multiple second samples and the target sample under the original features can be calculated. If the sum of the distances between the target sample and the multiple first samples on a certain feature is less than the sum of the distances between the target sample and the multiple second samples on a certain feature, it means that the feature has a good ability to distinguish the same and heterogeneous classes, and its weight will increase; on the contrary, it means that the feature is not conducive to classification, and its weight will be reduced. The feature weights of the original features can be updated according to the distances between each first sample and the target sample under the original features and the distances between each second sample and the target sample under the original features. By repeating the above steps multiple times, multiple target samples can be selected from the sample set, and the above calculation steps can be performed. After multiple updates, the final feature weights can be obtained. In the above manner, the feature weights of the features can be accurately calculated.
[0066] In some embodiments of the present specification, updating the feature weights of the original features according to the distances between the first samples and the target sample under the original features and the distances between the second samples and the target sample under the original features may include: updating the feature weights of the original features according to the following formula:
[0067]
[0068] Wherein, W[A] is the feature weight of the original feature A after update, W′[A] is the feature weight of the original feature A before update, m is the preset number, k represents the number of first samples and the number of second samples, R i represents the i-th target sample, where i∈(1,2,…m), P(class(R i )) represents the risk category and the i-th target sample R i The probability that a sample with the same risk category as the target sample appears in the entire sample set, C is the risk category in the label set that is different from the risk category of the target sample, P(C) represents the probability that a sample with risk category C appears in the entire sample set, and H represents the probability that a sample with risk category C appears in the entire sample set. i The collection of multiple first samples with the same risk category, H j represents the jth first sample; M(C) represents the set of multiple second samples with risk category C, M j (C) is the second sample of the j-th risk category C, and D(A, I1, I2) represents the distance between sample I1 and sample I2 under the original feature A.
[0069] In some embodiments of the present specification, the distances of different samples under the original features are calculated according to the following formula:
[0070]
[0071] Among them, D(a i ,x1,x2) are the samples x1 and x2 in the sample set in the i-th original feature a i The distance under, i∈(1,2,…n), n is the number of the multiple original features, V j (x1) indicates that sample x1 has the jth original feature a j The eigenvalue under i (x2) represents the eigenvalue of sample x2 under the i-th original feature ai, δ(V j (x1),V i (x2)) represents the original feature a i Lower eigenvalue V j (x1) and eigenvalue V i In the above way, when calculating the distance between different samples under a certain feature, not only the feature itself but also the influence of other features is considered.
[0072] In some embodiments of this specification, the original feature a is calculated according to the following formula i Lower eigenvalue V j (x1) and eigenvalue V i The distance between (x2):
[0073]
[0074] Among them, δ(V j (x1),V i (x2)) represents the original feature a in the i-th i Lower eigenvalue V j (x1) and eigenvalue V i (x2), n is the number of the multiple original features, Represents the jth original feature a j Lower eigenvalue V j (x1) and eigenvalue V i (x2) is the distance between them.
[0075] In some embodiments of this specification, when j=i,
[0076]
[0077] in, is the eigenvalue Vi (x1) and eigenvalue V i (x2) in the i-th original feature a i The inner distance under V i (x1) means sample x1 has the original feature a in the i-th i The eigenvalue under i (x2) means sample x2 has the original feature a in the i-th i By using the above method, the internal distance between different samples under the original features can be calculated when calculating the distance.
[0078] In some embodiments of this specification, when i≠j,
[0079]
[0080] in, is the eigenvalue V j (x1) and eigenvalue V i (x2) in the i-th original feature a i The external distance under, U is the sample set, |U| is the number of samples in the sample set U, X represents the original feature a in the i-th sample set U i Below and eigenvalue V j (x1) is a set of samples with indistinguishable relationships, and Y represents the original feature a in the i-th sample set U. i Below and eigenvalue V i (x2) A set of samples with indistinguishable relations; Represents sample x with respect to the jth original feature a of set X j The rough set membership on Represents sample x with respect to the jth original feature a of set Y j In this way, the influence of other original features on the distance between different samples under the current original features can be considered when calculating the distance, which is called external distance.
[0081] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. For details, please refer to the description of the above-mentioned related processing related embodiments, and no further description is given here.
[0082] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0083] The above method is described below in conjunction with a specific embodiment. However, it should be noted that the specific embodiment is only for better illustrating the present specification and does not constitute an improper limitation on the present specification.
[0084] Categorical data is also called symbolic data, which is different from numerical data in that it has natural geometric properties. When facing categorical data, the traditional Hamming distance or 0-1 distance only focuses on whether the characters are exactly the same, but ignores the similarity between characters. For example, when evaluating the professional characteristics of customers, the distance between "teachers" and "lawyers" is the same as that between "teachers" and "workers" under the 0-1 distance, but according to general concepts, the similarity between "teachers" and "lawyers" should be higher than the similarity between "teachers" and "workers" in terms of occupation. Therefore, in order to improve the accuracy of distance calculation, the influence of other features on the distance between samples under the current features can be considered.
[0085] In this specific embodiment, a resource data allocation method is provided. This solution includes the following steps.
[0086] Data collection and preprocessing: Collect personal and corporate credit-related data, such as borrowing history, financial status, behavioral data, etc.; clean, remove duplicates, process missing values, and standardize and normalize the data to ensure data quality and availability.
[0087] The core principle of the ReliefF algorithm is as follows.
[0088] The feature weight update formula of the RelifF algorithm is:
[0089]
[0090] Where m and k are both input parameters, m is the number of samples to be extracted, and k is the number of nearest neighbors to be found; R iRepresents the current sample object, where i∈m; P(C) represents the probability of data with class label C appearing in the entire data set; D(A,I1,I2) represents the distance between data objects U1 and U2 under feature A. H represents the set of k objects of the same type closest to the current sample data; M(C) represents the set of k objects closest to the sample data in data with class label C that is different from the current sample object category.
[0091] The pseudo code of the ReliefF algorithm is shown in the following algorithm.
[0092] Input: Dataset U = {(X1,Y1),(X2,Y2),...,(X n ,Y n )}, sampling times m, feature set A, number of feature neighbors k.
[0093] Output: feature weight set W
[0094] 1. Initialize feature weights W[a]=0,a∈A
[0095] 2.for i=1to m
[0096] 3. Randomly select a sample data X from U i
[0097] 4.for j=1to n
[0098] 5. Calculate the distance D(X) between the sample data and other data in the data set i ,X j )
[0099] 6. Select k similar neighbors of the sample data Hit
[0100] 7. Select k heterogeneous neighbors of sample data in different categories Miss
[0101] 8.for a in A
[0102] 9. Update the feature weights of features
[0103] 10.
[0104] 11.return W
[0105] Suppose the classification data set S = (U, C, D, V, f), where C represents the conditional feature, D represents the decision feature, and the feature set A = C∪D, V a Represents the range of feature a∈A, and V=U a∈ AV a, f:U×A→V represents an information function, and for any a∈A and x∈U, f(x,a)∈V a .
[0106] Let C = {a1, a2, a3, ..., a m}, the distance between two objects x1,x2∈U is defined as:
[0107]
[0108] Where V i (x) represents object x in feature a i δ(p,q) represents the eigenvalue of feature a i The distance between the eigenvalues p and q under:
[0109]
[0110] Indicates that the eigenvalues p and q are in feature a j The distance below, when a i =a j hour, Indicates that the eigenvalues p and q are in feature a i The inner distance below:
[0111]
[0112] when a i ≠a j When aj (p,q) represents the external distance between eigenvalues p and q under the feature ax:
[0113]
[0114] X represents the feature a i The set of objects that have an indistinguishable relationship with the eigenvalue p under feature a. i The set of objects that are indistinguishable from the eigenvalue q.
[0115] Represents an object x∈U with respect to the set Rough set membership on feature subset B:
[0116]
[0117] in The larger the value of, the higher the probability that object x belongs to set X. [x] B It represents the set of objects that are indistinguishable from object x under the feature subset B.
[0118] According to the idea of ReliefF algorithm, by extracting sample data and using the distance measurement method based on rough sets, the distance between the sample and other data is calculated, and the similar and heterogeneous neighbors of the sample are obtained. Then the weight of each feature is calculated, and the candidate feature subset is obtained by setting the threshold; then the candidate feature subset is integrated into the credit risk assessment model, the model parameters are tuned, and the candidate feature subset is evaluated through the performance of the model, and then the optimal feature subset is selected.
[0119] Based on the same inventive concept, a resource data allocation device is also provided in the embodiments of this specification, as described in the following embodiments. Since the principle of solving the problem by the resource data allocation device is similar to that of the resource data allocation method, the implementation of the resource data allocation device can refer to the implementation of the resource data allocation method, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived. Figure 2 is a structural block diagram of a resource data allocation device according to an embodiment of this specification, such as Figure 2 As shown, it includes: an acquisition module 201, a screening module 202 and an allocation module 203, and the structure is described below.
[0120] The acquisition module 201 is used to acquire a sample set having feature data for characterizing risk features of an object and a label set; wherein the label set includes a risk category corresponding to each sample in the sample set.
[0121] The screening module 202 is used to calculate the feature weight of each of the multiple original features corresponding to the sample set by using a preset feature selection algorithm, and screen out a target feature set from the multiple original features according to the feature weight of each original feature.
[0122] The allocation module 203 is used to construct a classifier based on the target feature set, the sample set and the label set, so as to allocate resource data to the target object based on the risk prediction result of the classifier on the target object.
[0123] Among them, the feature weight of each original feature is determined based on the distance between different samples under each original feature; the distance between different samples under each original feature is calculated based on the internal distance and external distance of different samples under each original feature, the internal distance is used to characterize the distance between two samples under the current original feature, and the external distance is used to characterize the influence of other original features among the multiple original features except the current original feature on the distance between two samples under the current original feature.
[0124] In some embodiments of the present specification, the screening module is specifically used to: repeat the following steps a preset number of times to obtain the final feature weights of the original features: select a target sample from the sample set; determine a plurality of first samples that are closest to the target sample from samples in the sample set that have the same risk category as the target sample; determine a plurality of second samples that are closest to the target sample from samples in the sample set that have a different risk category from the target sample; calculate the distance between each first sample in the plurality of first samples and the target sample under each original feature, and calculate the distance between each second sample in the plurality of second samples and the target sample under each original feature; update the feature weights of the original features according to the distance between each first sample and the target sample under each original feature and the distance between each second sample and the target sample under each original feature.
[0125] In some embodiments of the present specification, updating the feature weights of the original features according to the distances between the first samples and the target sample under the original features and the distances between the second samples and the target sample under the original features includes:
[0126] Update the feature weights of the original features according to the following formula:
[0127]
[0128] Wherein, W[A] is the feature weight of the original feature A after update, W′[A] is the feature weight of the original feature A before update, m is the preset number, k represents the number of first samples and the number of second samples, R i represents the i-th target sample, where i∈(1,2,…m), P(class(R i )) represents the risk category and the i-th target sample R i The probability that a sample with the same risk category as the target sample appears in the entire sample set, C is the risk category in the label set that is different from the risk category of the target sample, P(C) represents the probability that a sample with risk category C appears in the entire sample set, and H represents the probability that a sample with risk category C appears in the entire sample set. i The collection of multiple first samples with the same risk category, H j represents the jth first sample; M(C) represents the set of multiple second samples with risk category C, M j (C) is the second sample of the j-th risk category C, and D(A, I1, I2) represents the distance between sample I1 and sample I2 under the original feature A.
[0129] In some embodiments of the present specification, the distances of different samples under the original features are calculated according to the following formula:
[0130]
[0131] Among them, D(a i ,x1,x2) are the samples x1 and x2 in the sample set in the i-th original feature a i The distance under, i∈(1,2,…n), n is the number of the multiple original features, V j (x1) indicates that sample x1 has the jth original feature a j The eigenvalue under i (x2) means sample x2 has the original feature a in the i-th i The eigenvalue under δ(V j (x1), V i(x2)) represents the original feature a i Lower eigenvalue V j (x1) and eigenvalue V i (x2) is the distance between them.
[0132] In some embodiments of this specification, the original feature a is calculated according to the following formula i Lower eigenvalue V j (x1) and eigenvalue V i The distance between (x2):
[0133]
[0134] Among them, δ(V j (x1),V i (x2)) represents the original feature a in the i-th i Lower eigenvalue V j (x1) and eigenvalue V i (x2), n is the number of the multiple original features, Represents the jth original feature a j Lower eigenvalue V j (x1) and eigenvalue V i (x2) is the distance between them.
[0135] In some embodiments of this specification, when j=i,
[0136]
[0137] in, is the eigenvalue V i (x1) and eigenvalue V i (x2) in the i-th original feature a i The inner distance under V i (x1) means sample x1 has the original feature a in the i-th iThe eigenvalue under i (x2) means sample x2 has the original feature a in the i-th i The eigenvalues below.
[0138] In some embodiments of this specification, when i≠j,
[0139]
[0140] in, is the eigenvalue V j (x1) and eigenvalue V i (x2) in the i-th original feature a i The external distance under, U is the sample set, |U| is the number of samples in the sample set U, X represents the original feature a in the i-th sample set U i Below and eigenvalue V j (x1) is a set of samples with indistinguishable relationships, and Y represents the original feature a in the i-th sample set U. i Below and eigenvalue V i (x2) A set of samples with indistinguishable relations; Represents sample x with respect to the jth original feature a of set X j The rough set membership on Represents sample x with respect to the jth original feature a of set Y j The rough set membership on .
[0141] From the above description, it can be seen that the embodiments of this specification achieve the following technical effects: when calculating the distance between different samples under the current original feature, not only the distance between the two samples under the current original feature is considered, but also the influence of other original features on the distance between the two samples under the current original feature is considered, so that the distance between different samples under the current original feature can be calculated more accurately, so that the feature weight of the current original feature can be calculated more accurately, so that the selected feature is more correlated with the risk category. Afterwards, the server can filter out a target feature set from the multiple original features according to the feature weights of the original features. The server can construct a classifier based on the target feature set, the sample set and the label set, which can improve the accuracy of classification, and then improve the accuracy of resource allocation based on the risk prediction results identified by the classifier, which can improve the efficiency and accuracy of resource allocation and improve resource utilization.
[0142] This specification also provides a computer device, which can be found in Figure 3The computer device structure diagram of the resource data allocation method provided by the embodiment of this specification is shown, and the computer device may specifically include an input device 31, a processor 32, and a memory 33. Among them, the memory 33 is used to store processor executable instructions. When the processor 32 executes the instructions, the steps of the resource data allocation method described in any of the above embodiments are implemented.
[0143] In this embodiment, the input device may specifically be one of the main devices for information exchange between the user and the computer system. The input device may include a keyboard, a mouse, a camera, a scanner, a light pen, a handwriting input board, a voice input device, etc.; the input device is used to input the original data and the program for processing these numbers into the computer. The input device can also obtain and receive data transmitted from other modules, units, and devices. The processor can be implemented in any appropriate manner. For example, the processor can take the form of a computer-readable medium, a logic gate, a switch, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable logic controller, and an embedded microcontroller, etc., such as a microprocessor or a processor and a computer-readable program code (such as software or firmware) that can be executed by the (micro) processor. The memory may specifically be a memory device used to store information in modern information technology. The memory may include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function without a physical form is also called a memory, such as a RAM, a FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, a TF card, etc.
[0144] In this embodiment, the functions and effects specifically realized by the computer device can be explained in comparison with other embodiments and will not be described in detail here.
[0145] A computer storage medium based on the resource data allocation method is also provided in the implementation mode of this specification. The computer storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the steps of the resource data allocation method described in any of the above embodiments are implemented.
[0146] In this embodiment, the storage medium includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD) or a memory card. The memory may be used to store computer program instructions. The network communication unit may be an interface for network connection communication set in accordance with the standard specified by the communication protocol.
[0147] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer storage medium can be explained in comparison with other embodiments and will not be repeated here.
[0148] The embodiments of the present specification also provide a computer program product, including a computer program / instruction, which implements the steps of the resource data allocation method described in any of the above embodiments when executed by a processor.
[0149] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of this specification can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, 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 here, 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. In this way, the embodiments of this specification are not limited to any specific combination of hardware and software.
[0150] It should be understood that the above description is for illustration and not for limitation. Many embodiments and many applications beyond the examples provided will be apparent to those skilled in the art upon reading the above description. Therefore, the scope of this specification should not be determined with reference to the above description, but should be determined with reference to the preceding claims and the full scope of equivalents to which these claims belong.
[0151] The above description is only the preferred embodiment of this specification and is not intended to limit this specification. For those skilled in the art, the embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the protection scope of this specification.
Claims
1. A resource data allocation method, It is characterized in that include: Acquire a sample set having feature data for characterizing risk features of an object and a label set; wherein the label set includes a risk category corresponding to each sample in the sample set; Calculating the feature weight of each of the multiple original features corresponding to the sample set by using a preset feature selection algorithm, and selecting a target feature set from the multiple original features according to the feature weight of each original feature; Based on the target feature set, the sample set and the label set, a classifier is constructed to allocate resource data to the target object based on the risk prediction result of the classifier on the target object; Among them, the feature weight of each original feature is determined based on the distance between different samples under each original feature; the distance between different samples under each original feature is calculated based on the internal distance and external distance of different samples under each original feature, the internal distance is used to characterize the distance between two samples under the current original feature, and the external distance is used to characterize the influence of other original features among the multiple original features except the current original feature on the distance between two samples under the current original feature.
2. The resource data allocation method according to claim 1, It is characterized in that The feature weight of each original feature in all original features contained in the sample set is calculated using a preset feature selection algorithm, including: Repeat the following steps for a preset number of times to obtain the final feature weights of the original features: Selecting a target sample from the sample set; Determine a plurality of first samples that are closest to the target sample from samples in the sample set that are in the same risk category as the target sample; determine a plurality of second samples that are closest to the target sample from samples in the sample set that are in a different risk category from the target sample; Calculating the distance between each first sample in the plurality of first samples and the target sample under the respective original features, and calculating the distance between each second sample in the plurality of second samples and the target sample under the respective original features; The feature weights of the original features are updated according to the distances between the first samples and the target sample under the original features and the distances between the second samples and the target sample under the original features.
3. The resource data allocation method according to claim 2, It is characterized in that Updating the feature weights of the original features according to the distances between the first samples and the target sample under the original features and the distances between the second samples and the target sample under the original features, including: Update the feature weights of the original features according to the following formula: Wherein, W[A] is the feature weight of the original feature A after update, W′[A] is the feature weight of the original feature A before update, m is the preset number, k represents the number of first samples and the number of second samples, R i represents the i-th target sample, where i∈(1,2,…m), P(class(R i )) represents the risk category and the i-th target sample R i The probability that a sample with the same risk category as the target sample appears in the entire sample set, C is the risk category in the label set that is different from the risk category of the target sample, P(C) represents the probability that a sample with risk category C appears in the entire sample set, and H represents the probability that a sample with risk category C appears in the entire sample set. i The collection of multiple first samples with the same risk category, H j represents the jth first sample; M(C) represents the set of multiple second samples with risk category C, M j (C) is the second sample with the jth risk category C, D(A,I 1 ,I 2 ) represents sample I 1 and Sample I 2 The distance under the original feature A.
4. The resource data allocation method according to claim 1, It is characterized in that The distances of different samples under the original features are calculated according to the following formula: Among them, D(a i ,x 1 ,x 2 ) is the sample x in the sample set 1 With sample x 2 In the i-th original feature a i The distance under, i∈(1,2,…n), n is the number of the multiple original features, V j (x 1 ) represents the sample x 1 On the jth original feature a j The eigenvalue under i (x 2 ) represents the sample x 2 In the i-th original feature a i The eigenvalue under δ(V j (x 1 ),V i (x 2 )) indicates that in the original feature a i Lower eigenvalue V j (x 1 ) and the eigenvalue V i (x 2 ) between the two.
5. The resource data allocation method according to claim 4, It is characterized in that According to the following formula, the original feature a is calculated i Lower eigenvalue V j (x 1 ) and the eigenvalue V i (x 2 ): Among them, δ(V j (x 1 ),V i (x 2 )) indicates that in the i-th original feature a i Lower eigenvalue V j (x 1 ) and the eigenvalue V i (x 2 ), n is the number of the multiple original features, Represents the jth original feature a j Lower eigenvalue V j (x 1 ) and the eigenvalue V i (x 2 ) between the two.
6. The resource data allocation method according to claim 5, It is characterized in that When j=i, in, is the eigenvalue V i (x 1 ) and eigenvalue V i (x 2 ) In the i-th original feature a i The inner distance under V i (x 1 ) represents the sample x 1 In the i-th original feature a i The eigenvalue under i (x 2 ) represents the sample x 2 In the i-th original feature a i The eigenvalues below.
7. The resource data allocation method according to claim 5, It is characterized in that When i≠j, in, is the eigenvalue V j (x 1 ) and eigenvalue V i (x 2 ) In the i-th original feature a i The external distance under, U is the sample set, |U| is the number of samples in the sample set U, X represents the original feature a in the i-th sample set U i Below and eigenvalue V j (x 1 ) is a set of samples with indistinguishable relationships, Y represents the original feature a in the i-th sample set U i Below and eigenvalue V i (x 2 ) A set of samples with indistinguishable relations; Represents sample x with respect to the jth original feature a of set X j The rough set membership on Represents sample x with respect to the jth original feature a of set Y j The rough set membership on .
8. A resource data allocation device, It is characterized in that include: An acquisition module, used to acquire a sample set having feature data for characterizing risk features of an object and a label set; wherein the label set includes a risk category corresponding to each sample in the sample set; A screening module, used to calculate the feature weight of each of the multiple original features corresponding to the sample set by using a preset feature selection algorithm, and screen out a target feature set from the multiple original features according to the feature weight of each original feature; An allocation module, configured to construct a classifier based on the target feature set, the sample set and the label set, so as to allocate resource data to the target object based on the risk prediction result of the classifier on the target object; Among them, the feature weight of each original feature is determined based on the distance between different samples under each original feature; the distance between different samples under each original feature is calculated based on the internal distance and external distance of different samples under each original feature, the internal distance is used to characterize the distance between two samples under the current original feature, and the external distance is used to characterize the influence of other original features among the multiple original features except the current original feature on the distance between two samples under the current original feature.
9. A computer device, It is characterized in that The method comprises a processor and a memory for storing processor-executable instructions, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the instructions.
10. A computer-readable storage medium having computer instructions stored thereon, It is characterized in that When the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
