Label classification model training method, label classification method, device and equipment
By constructing Gaussian graph and tag propagation algorithms, the labelless data is converted into labeled data and the classification model is retrained, which solves the problem of poor classification of user data tags in the existing technology, and achieves more efficient user characteristics and personalized service provision.
Patent Information
- Application Number
- CN202210053538.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-18
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-01-18
AI Technical Summary
The prior art has poor results in user data tag classification, mainly due to the limited sample size and tag type, resulting in the performance of the classification model being limited.
By obtaining the unlabeled data set and the labeled data set, building a Gaussian graph and determining the label propagation algorithm, converting the labelless data into labeled data, adding it to the labeled data set, retraining the initial label classification model, and obtaining the target label classification model.
It improves the label classification effect of user consumption data, enhances the performance and generalization capabilities of the classification model, and can more accurately characterize user characteristics and provide personalized services.
Smart Images

Figure CN114387477B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to classification model training technology, and in particular to a label classification model training method, label classification method, device and equipment. Background Art
[0002] The concept of user portrait was first proposed by Alan Cooper, the father of interactive design. He pointed out that user portrait is a labeled user model. Specifically, it is to label user information, collect and analyze consumer social attributes, consumption habits, interests and hobbies, and abstract a panoramic portrait of a user to help companies accurately locate, accurately market, predict and make decisions. With the increasing diversification of credit card user needs and the refinement of credit card marketing management, user portraits have gradually attracted widespread attention in the credit card industry. User portraits can not only enable issuing banks to accurately acquire customers, accurately market, accurately operate and accurately manage, but also greatly improve customer experience.
[0003] The core of building user portraits is to "label" customers, that is, to gain insights into customer behaviors and preferences based on big data analysis and data mining technology, and to describe different types of user characteristics, such as "white-collar elites", "foreign consumers", "luxury lovers", etc. In the context of digital transformation, the credit card industry attempts to build a customer labeling system to characterize user characteristics in multiple dimensions and provide better services to users.
[0004] The existing technical solution requires manual labeling of user data, and then uses the user data and the associated labels as samples to train a classification model, which is then used to classify the user data generated by subsequent credit card swiping. However, due to the limited number of samples and the types of sample labels, the classification model is not very effective in classifying user data. Therefore, it is still worth studying how to improve the label classification effect of user consumption data. Summary of the invention
[0005] The present application provides a label classification model training method, a label classification method, a device and equipment to improve the label classification effect of user consumption data.
[0006] On the one hand, the present application provides a label classification model training method, comprising:
[0007] Obtain an unlabeled data set and a labeled data set, and construct a Gaussian graph based on the unlabeled data set and the labeled data set;
[0008] Using the labeled data set to train an initial label classification model;
[0009] Determine a label propagation algorithm between the labeled data set and the unlabeled data set according to the Gaussian graph;
[0010] Based on the label propagation algorithm, converting the unlabeled data that can be converted in the unlabeled data set into labeled data;
[0011] Adding the converted labeled data to the labeled data set to obtain a new labeled data set;
[0012] The initial label classification model is retrained using the new label data set to obtain a target label classification model.
[0013] Optionally, the data in the unlabeled data set and the labeled data set are both two-dimensional data, the first dimension data in the two-dimensional data represents consumption data, the second dimension data represents a label of the consumption data, the second dimension data in the unlabeled data set is a null value, and constructing a Gaussian graph based on the unlabeled data set and the labeled data set includes:
[0014] Constructing vertices of the Gaussian graph based on the first dimension data in the unlabeled data set and the labeled data set;
[0015] The edges of the Gaussian graph are constructed according to the similarity between each first dimension data in the unlabeled data set and the labeled data set.
[0016] Optionally, determining a label propagation algorithm between the labeled data set and the unlabeled data set according to the Gaussian graph includes:
[0017] Based on the Gaussian graph, obtaining real-valued functions about vertices and edges in the Gaussian graph, wherein the real-valued functions include unlabeled real-valued functions of unlabeled data sets and labeled real-valued functions of labeled data sets;
[0018] Acquire a Laplace matrix based on the Gaussian graph, wherein the Laplace matrix includes a diagonal matrix and a weight matrix;
[0019] Constructing an energy function of the real-valued function according to the real-valued function and the Laplace matrix;
[0020] Minimize the energy function to obtain a relationship algorithm between the unlabeled real-valued function and the labeled real-valued function, where the relationship algorithm is the label propagation algorithm.
[0021] Optionally, the algorithm for minimizing the energy function to obtain the relationship between the unlabeled real-valued function and the labeled real-valued function is the label propagation algorithm, including:
[0022] Generate a transfer matrix of the Gaussian graph according to the diagonal matrix and the weight matrix;
[0023] Minimize the energy function to obtain an initial relational algorithm, wherein the initial relational algorithm includes the unlabeled real-valued function, the labeled real-valued function, the diagonal matrix, and the weight matrix;
[0024] The diagonal matrix and the weight matrix in the initial relational algorithm are replaced by the transfer matrix to obtain the relational algorithm, wherein the relational algorithm includes the transfer matrix, the unlabeled real-valued function and the labeled real-valued function.
[0025] Optionally, the output of the label propagation algorithm is the value of an unlabeled real-valued function, and converting the unlabeled data in the unlabeled data set into labeled data based on the label propagation algorithm includes:
[0026] The following steps are performed for each unlabeled data in the unlabeled dataset:
[0027] The following steps are performed for each unlabeled data in the unlabeled dataset:
[0028] Substituting the unlabeled data into the label propagation algorithm to obtain the value of the unlabeled real-valued function;
[0029] When the value of the unlabeled real-valued function is greater than a preset value, determining that the label in the labeled real-valued function used in the label propagation algorithm calculation is the label of the unlabeled data;
[0030] Labels are added to the unlabeled data.
[0031] Optionally, obtaining an unlabeled dataset includes:
[0032] Get an initial unlabeled dataset;
[0033] After inputting the initial unlabeled data set into the initial label classification model, obtaining a distance vector between the output of each unlabeled data in the initial unlabeled data set and the initial label classification model;
[0034] M unlabeled data with the smallest distance vector in the initial unlabeled data set are obtained to form the unlabeled data set, where M is an integer greater than zero.
[0035] On the other hand, the present application provides a tag classification method, comprising:
[0036] Obtain unlabeled data to be classified;
[0037] The unlabeled data to be labeled is input into the target label classification model as described in the first aspect to obtain the label of the unlabeled data to be labeled.
[0038] On the other hand, the present application provides a label classification model training device, comprising:
[0039] An acquisition module, used to acquire an unlabeled data set and a labeled data set, and construct a Gaussian graph based on the unlabeled data set and the labeled data set;
[0040] A training module, used to train an initial label classification model using the labeled data set;
[0041] An algorithm determination module, configured to determine a label propagation algorithm between the labeled data set and the unlabeled data set according to the Gaussian graph;
[0042] A data conversion module, configured to convert the unlabeled data that can be converted in the unlabeled data set into labeled data based on the label propagation algorithm;
[0043] A sample construction module, used to add the converted labeled data to the labeled data set to obtain a new labeled data set;
[0044] The training module is also used to retrain the initial label classification model using the new label data set to obtain a target label classification model.
[0045] On the other hand, the present application provides a label classification device, comprising:
[0046] An acquisition module, used to acquire unlabeled data to be classified;
[0047] A processing module is used to input the unlabeled data to be labeled and classified into the target label classification model as described in the first aspect to obtain the label of the unlabeled data to be labeled and classified.
[0048] On the other hand, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0049] The memory stores computer-executable instructions;
[0050] The processor executes the computer-executable instructions stored in the memory to implement the label classification model training method as described in the first aspect.
[0051] On the other hand, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0052] The memory stores computer-executable instructions;
[0053] The processor executes the computer-executable instructions stored in the memory to implement the tag classification method as described in the second aspect.
[0054] On the other hand, the present application provides a computer-readable storage medium, which stores computer execution instructions. When the instructions are executed, the computer executes the label classification model training method as described in the first aspect.
[0055] On the other hand, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the instructions are executed, the computer executes the label classification method as described in the second aspect.
[0056] On the other hand, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the label classification model training method as described in the first aspect.
[0057] On the other hand, the present application provides a computer program product, including a computer program, which implements the tag classification method as described in the second aspect when executed by a processor.
[0058] In summary, the training method of the label classification model provided in this embodiment is a credit card user profiling method based on active learning and semi-supervised learning. An initial label classification model can be obtained by first training with an SVM classifier and a small amount of labeled data. Then, the performance of the initial label classification model is optimized by using the label propagation algorithm and active learning method and unlabeled data, so as to more accurately portray the user characteristics and provide personalized services.
[0059] Furthermore, the number of SVM classifiers and the corresponding number and type of labels can be set according to actual needs, and the label types include consumption categories, consumption levels, consumption preferences (prefer travel, prefer food, or others), etc. Therefore, the label classification model obtained by the method provided in this embodiment can fully mine the deep characteristics of users, understand the user's consumption preferences, growth predictions, churn warnings, etc., so as to better improve the user experience and provide more accurate services.
[0060] The method of this embodiment uses a label propagation algorithm to convert unlabeled data into labeled data, then adds the converted labeled data to the original labeled data set, and retrains the initial label classification model using the new labeled data set to obtain a target label classification model. Compared with the initial label classification model, the target label classification model has a larger and more diverse number of training samples, so its performance is better than that of the initial label classification model. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0062] Figure 1 A schematic diagram of an application scenario of the label classification model training method provided in this application.
[0063] Figure 2 A flowchart of a label classification model training method provided for one embodiment of the present application.
[0064] Figure 3 A schematic diagram of a label classification model training method provided for another embodiment of the present application.
[0065] Figure 4 A flowchart of a tag classification method provided for one embodiment of the present application.
[0066] Figure 5 A schematic diagram of a label classification model training device provided for one embodiment of the present application.
[0067] Figure 6 A schematic diagram of a label classification device provided for one embodiment of the present application.
[0068] Figure 7 A schematic diagram of an electronic device provided for one embodiment of the present application.
[0069] Figure 8 A schematic diagram of an electronic device provided for another embodiment of the present application.
[0070] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0071] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0072] The following is an explanation of the terms involved in this application:
[0073] User portrait: The concept of user portrait was first proposed by Alan Cooper, the father of interactive design. He pointed out that user portrait is a labeled user model. Specifically, it is to label user information, classify users by collecting and analyzing data such as consumer social attributes, consumption habits, interests and hobbies, and abstract a panoramic portrait of a user to help companies accurately position, accurately market, predict and make decisions.
[0074] Active learning: Active learning is a model based on iterative thinking. Its basic principle is to try to select the most valuable samples from unlabeled samples to improve the performance of the classifier according to a specific selection strategy. It uses expert knowledge to add them to the initial training sample set after manual labeling and classification, and iterates the classifier until the cycle reaches the termination condition. Active learning requires the use of existing labeled samples to supervise the training of a classification model, and then uses unlabeled samples to query the supervisor, predict the label of the sample, and then add it to the training. If each query can select the sample with the most information to improve the performance of the model, a good performance model can be obtained with the least number of queries, thereby reducing the dependence on a large number of labeled samples.
[0075] Supervised learning, semi-supervised learning, and unsupervised learning: Supervised learning means that in the samples of model training (also known as classifiers), the samples have both feature and label information. The model only needs to train a mapping function to map the features of new samples into labels through the learning of these samples. Unsupervised learning means that the samples only have feature information but no label information. Clustering is usually performed to find similarities between samples and divide them into the same labels based on these similarities. Semi-supervised learning is between supervised learning and unsupervised learning. A small amount of data in the sample has both feature and label information, and most of the remaining data only has feature information. The similarities between these limited labeled data and unlabeled data are used to improve the performance of the model.
[0076] Label Propagation Algorithm (LPA): A graph-based semi-supervised learning method that constructs a graph model (such as a Gaussian graph) based on the feature similarity between unlabeled data and labeled data, and uses the edges of the graph to construct a weighted matrix to achieve label propagation between labeled and unlabeled data.
[0077] Support Vector Machine (SVM): A machine learning algorithm that finds a partitioning hyperplane in the sample space. This hyperplane has the characteristic of maximizing the interval. The samples are divided into two parts according to this hyperplane. It can effectively solve high-dimensional data problems and also show good classification effects with smaller training data sets.
[0078] The concept of user portrait was first proposed by Alan Cooper, the father of interactive design. He pointed out that user portrait is a labeled user model. Specifically, it is to label user information, collect and analyze consumer social attributes, consumption habits, interests and hobbies, and abstract a panoramic portrait of a user to help companies accurately locate, accurately market, predict and make decisions. With the increasing diversification of credit card user needs and the refinement of credit card marketing management, user portraits have gradually attracted widespread attention in the credit card industry. User portraits can not only enable issuing banks to accurately acquire customers, accurately market, accurately operate and accurately manage, but also greatly improve customer experience.
[0079] The core of building user portraits is to "label" customers, that is, to gain insights into customer behaviors and preferences based on big data analysis and data mining technology, and to describe different types of user characteristics, such as "white-collar elites", "foreign consumers", "luxury lovers", etc. In the context of digital transformation, the credit card industry attempts to build a customer labeling system to characterize user characteristics in multiple dimensions and provide better services to users.
[0080] Most of the existing technical solutions are based on supervised learning methods. The user profiling method based on supervised learning requires a prior understanding of the user's characteristics. The user can only be used as a training sample after manual label classification, so as to obtain a relatively good user profiling model. Manual label classification of users requires a lot of manpower and material resources. Only a small number of samples have their own labels through manual division, and most samples only have feature information. Therefore, the performance of the model obtained after supervised learning using a small number of samples has certain limitations. Because the number of samples and the type of sample labels are limited, this classification model is not very effective in labeling user data. Therefore, how to improve the label classification effect of user data is still worth studying.
[0081] Based on this, the present application provides a label classification model training method, a label classification method, a device and an apparatus. The label classification model training method uses a label propagation algorithm to add labels to unlabeled data, and then adds the unlabeled data with added labels to the training samples of the initial label classification model, and trains the initial label classification model based on the new training samples to improve the label classification ability of the initial label classification model for unlabeled data, and improve the label classification effect of the initial label classification model on user data (unlabeled data).
[0082] The label classification model training method provided in the present application is applied to electronic devices, such as backend servers and computers used by banks. Figure 1The application diagram of the label classification model training method provided in the present application, in which the background server obtains an unlabeled data set and a labeled data set, and then constructs a Gaussian graph based on the unlabeled data set and the labeled data set. The label propagation algorithm between the labeled data set and the unlabeled data set is then determined based on the Gaussian graph, and the unlabeled data that can be converted in the unlabeled data set is converted into labeled data based on the label propagation algorithm. The converted labeled data is added to the labeled data set to obtain a new labeled data set. The initial label classification model is retrained with the new labeled data set to obtain a target label classification model.
[0083] See also Figure 2 One embodiment of the present application provides a label classification model training method, including:
[0084] S210 , obtaining an unlabeled data set and a labeled data set, and constructing a Gaussian graph based on the unlabeled data set and the labeled data set.
[0085] Optionally, the data in the unlabeled data set and the labeled data set are both two-dimensional data, the first dimension of which represents consumption data, and the second dimension represents the label of the consumption data. L ={(x 1 ,y 1 ), (x 2 ,y 2 ), (x 3 ,y 3 ),......(x l ,y l )}, the unlabeled dataset D U ={(x l+1 ,y l+1 ), (x l+2 ,y l+2 ), (x l+3 ,y l+3 ),......(x l+u ,y l+u )}, where the second dimension data in the unlabeled dataset is a null value.
[0086] When constructing the Gaussian graph, the vertices of the Gaussian graph are constructed based on the first dimension data in the unlabeled dataset and the labeled dataset. Then, the edges of the Gaussian graph are constructed based on the similarity between the first dimension data in the unlabeled dataset and the labeled dataset. That is, based on D L ∪D U Construct a Gaussian graph G = (V, E). The vertex set of the Gaussian graph is V = (x 1 , x 2 , x 3......x l , x l+1 , x l+2 ,......,x l+u ), the edge (E) of the Gaussian graph represents a weighted matrix defined based on the Gaussian function, which is constructed based on the feature similarity between the data. For example, vertex x i and vertex x j The length of the edge between them depends on the vertex x i and vertex x j The weight w between ij The larger the weight, the smaller the similarity between the data on the two vertices, and the longer the edge. Where n represents x i There are n elements in x (e.g., consumption amount, consumption frequency, consumption target, etc. in consumption data), id is x i The dth element of d is the Gaussian bandwidth parameter of the dth element (the Gaussian bandwidth parameter is defined by the user).
[0087] S220, using the labeled data set to train an initial label classification model.
[0088] First, based on the active learning method, the labeled data set is used to train an initial label classification model. Active learning is a model based on iterative thinking. Its basic principle is to construct training samples (labeled data sets) from unlabeled samples by manually marking labels according to a specific selection strategy, and then iterate the training with the labeled data set until the termination condition is reached to obtain the initial label classification model. Active learning requires the use of an existing labeled data set to supervise the training of a classification model, and then use the classification model to predict the labels of the unlabeled data, and then add the predicted unlabeled data to the training. Active learning requires the introduction of additional expert knowledge to convert unlabeled samples into labeled samples through manual classification and annotation. This method not only wastes a lot of manpower costs, but also has the problem that there are too few training samples for the classification model, resulting in poor classification results of the classification model.
[0089] Labeling unlabeled data by means of a label propagation algorithm is a graph-based semi-supervised learning method that can automatically use labeled data to predict labels for unlabeled data without manual intervention to update the training samples of the initial label classification model. It can be seen that active learning and label propagation algorithms can complement each other in different ways, and can not only use unlabeled data to improve the generalization ability of the initial label classification model, but also improve the classification accuracy of the initial label classification model through iterative training.
[0090] The initial label classification model may include multiple support vector machines (SVM) classifiers. One SVM classifier corresponds to one label, that is, one classifier is used to determine the probability of whether unlabeled data belongs to a label. n SVM classifiers g can be trained according to actual needs. 1 , g 2 ,……,g n .
[0091] In some embodiments, the unlabeled data set can be obtained by screening based on the n SVM classifiers. During the screening, some unlabeled data are first obtained as the initial unlabeled data set. After the initial unlabeled data set is input into the initial label classification model, the distance vector (d ) between the output of each unlabeled data in the initial unlabeled data set and the initial label classification model (and the n SVM classifiers in the initial label classification model) is obtained. 1 , d 2 , ..., d n ). Then, the M unlabeled data with the smallest distance vector in the initial unlabeled data set are obtained to form the unlabeled data set (M is an integer greater than zero). The smaller the distance vector, the more difficult it is to confirm the accurate label of the unlabeled data. Therefore, in order to further improve the training effect, the unlabeled data with more difficult label confirmation can be preferentially screened out and converted into labeled data to be added to the training samples.
[0092] S230: Determine a label propagation algorithm between the labeled data set and the unlabeled data set according to the Gaussian graph.
[0093] Optionally, based on the Gaussian graph, a real-valued function (f: V→R) about the vertices and edges in the Gaussian graph can be obtained, where R is the predicted label and R is the D described above. L and D U The set of y in . This real-valued function can be used to assign labels to unlabeled data. However, this real-valued function cannot be solved directly, so it is necessary to define an energy function E(f) about this real-valued function based on the principle that samples with similar features in the Gaussian graph should have similar labels.
[0094]
[0095] in, f l =(f(x 1 ); f(x 2 );......;f(x i )) is the prediction result of the real-valued function f on the labeled data set, f u =(f(x l+1 ); f(xl+2 );......;f(x l+u )) is the prediction result of the real-valued function f on the unlabeled dataset. D = diag (d 1 , d 2 ,......,d l+u ) is a diagonal matrix with diagonal elements is the sum of the elements in the i-th row of matrix W. Matrix W is based on w ij Constructed weight matrix.
[0096] (DW) is the Laplace matrix in the Gaussian graph. From the expression of E(f), it can be seen that the energy function E(f) of the real-valued function can be constructed based on the real-valued function and the Laplace matrix. Therefore, after obtaining the real-valued function f and the Laplace matrix based on the Gaussian graph, the energy function of the real-valued function can be constructed. Since it is difficult to directly obtain f, and the output obtained when the energy function E(f) is minimized is the optimal result, the real-valued function f can be obtained by minimizing the energy function E(f), and then the relationship algorithm between the unlabeled real-valued function and the labeled real-valued function is obtained, which is the label propagation algorithm.
[0097] Furthermore, the transfer matrix P of the Gaussian graph can be generated according to the diagonal matrix D and the weight matrix W, and then the energy function E(f) can be minimized to obtain an initial relational algorithm, which includes the unlabeled real-valued function f l , the labeled real-valued function f u , the diagonal matrix D and the weight matrix W.
[0098] Specifically, the diagonal matrix D and the weight matrix W are both matrices with u rows and u columns, with the lth row and lth column as the boundary, and when the block matrix is used for representation, After introducing the energy function, the energy function can be rewritten as Minimize the energy function E(f), that is, Get f u =(D uu -W uu ) -1 W ul f l Let the transfer matrix So the function f u Rewrite as f u =(D uu -W uu ) -1 W ul f l =(IP uu ) - 1 Pul f l , the relationship algorithm between the unlabeled real-valued function and the labeled real-valued function obtained at this time includes the transfer matrix, the unlabeled real-valued function and the labeled real-valued function. At this time, the relationship algorithm is the label propagation algorithm, that is, the final expression of the label propagation algorithm is f u =(IP uu ) -1 P ul f l .
[0099] S240: Based on the label propagation algorithm, convert the unlabeled data that can be converted in the unlabeled data set into labeled data.
[0100] By reconciling the solution u , we can use the information of the labeled data set to predict the unlabeled data set through the label propagation algorithm. Specifically, the output of the label propagation algorithm is the value of the unlabeled real-valued function (f u ), based on the label propagation algorithm, when the unlabeled data in the unlabeled data set is converted into labeled data, steps A to C are performed on each unlabeled data in the unlabeled data set.
[0101] Step A: Substitute the unlabeled data into the label propagation algorithm to obtain the value of the unlabeled real-valued function.
[0102] Step B: When the value of the unlabeled real-valued function is greater than a preset value, the label in the labeled real-valued function used in the label propagation algorithm calculation is determined to be the label of the unlabeled data.
[0103] Step C: Add labels to the unlabeled data.
[0104] The unlabeled data is substituted into the label propagation algorithm with the first dimension data x i , the value of the unlabeled real-valued function is f(x i ). The preset value is, for example, 0.5, then f(x i )>0.5, then sign(f(x i ))=1, prove that f(x i ) is the label of the unlabeled data. i )<0.5 or f(x i )=0.5, the label of the unlabeled data cannot be determined.
[0105] S250: Add the converted labeled data to the labeled data set to obtain a new labeled data set.
[0106] If an unlabeled data cannot be labeled, it will not be converted into labeled data, nor will it be added to the labeled data set.
[0107] S260: Retrain the initial label classification model using the new label data set to obtain a target label classification model.
[0108] When the initial label classification model is re-trained with the new label data set, the number of iterative training can be selected according to actual needs. Preferably, the number of iterative training is until D U ={(x l+1 ,y l+1 ), (x l+2 ,y l+2 ), (x l+3 ,y l+3 ),......(x l+u ,y l+u ) to the maximum number of iterations, and finally obtain the target label classification model.
[0109] The output of each SVM classifier in the target label classification model is 0 or 1, 0 means that the input unlabeled data does not have the label corresponding to the SVM classifier, and 1 means that the input unlabeled data has the label corresponding to the SVM classifier. For example, if the label corresponding to the SVM classifier is food, and the input unlabeled data is the consumption data generated when buying clothes, the output result of the SVM classifier is 0. If the input unlabeled data is the consumption data generated when buying food, the output result of the SVM classifier is 1.
[0110] Figure 3 It is a further illustration of step S210 to step S250, and is also a flowchart of active learning after adding semi-supervised learning (label propagation algorithm).
[0111] like Figure 3As shown, first initialize the training sample set (obtain a labeled data set), and then use the training sample set for learning to obtain a classifier (i.e., the initial label classification model containing multiple SVM classifiers is obtained by iterative training using a labeled data set as described above). When the training result of the initial label classification model reaches the termination condition (i.e., when the number of iterative training times reaches a preset number), the final classifier is obtained. If the number of iterative training times of the initial label classification model has not reached the preset number, then unlabeled samples (unlabeled data sets) can be collected and labeled (i.e., labels of unlabeled data in unlabeled data sets are added). The unlabeled data with added labels is added to the training sample set, and re-learned with the new training sample set until the number of iterative training times reaches the preset number to obtain the final classifier (i.e., the target label classification model described above).
[0112] In summary, the training method of the label classification model provided in this embodiment is a credit card user profiling method based on active learning and semi-supervised learning. An initial label classification model can be obtained by first training with an SVM classifier and a small amount of labeled data. Then, the performance of the initial label classification model is optimized by using the label propagation algorithm and active learning method and unlabeled data, so as to more accurately portray the user characteristics and provide personalized services.
[0113] Furthermore, the number of SVM classifiers and the corresponding number and type of labels can be set according to actual needs, and the label types include consumption categories, consumption levels, consumption preferences (prefer travel, prefer food, or others), etc. Therefore, the label classification model obtained by the method provided in this embodiment can fully mine the deep characteristics of users, understand the user's consumption preferences, growth predictions, churn warnings, etc., so as to better improve the user experience and provide more accurate services.
[0114] The method of this embodiment uses a label propagation algorithm to convert unlabeled data into labeled data, then adds the converted labeled data to the original labeled data set, and retrains the initial label classification model using the new labeled data set to obtain a target label classification model. Compared with the initial label classification model, the target label classification model has a larger and more diverse number of training samples, so its performance is better than that of the initial label classification model.
[0115] See also Figure 4 One embodiment of the present application provides a tag classification method, including:
[0116] S410, obtaining unlabeled data to be labeled and classified.
[0117] The unlabeled data is the consumption data generated by users swiping their credit cards, such as the consumption data generated when users shop. These consumption data are unlabeled after they are generated. The traditional method is to manually add labels to these unlabeled data, which is time-consuming and labor-intensive. Therefore, after these unlabeled data that have not yet been labeled and classified are input into the target label classification model described above, the labels of the unlabeled data can be obtained faster and more accurately.
[0118] S420: input the unlabeled data to be labeled and classified into a target label classification model as described in any of the above embodiments to obtain a label for the unlabeled data to be labeled and classified.
[0119] The output of each SVM classifier in the target label classification model is 0 or 1, 0 means that the input unlabeled data does not have the label corresponding to the SVM classifier, and 1 means that the input unlabeled data has the label corresponding to the SVM classifier. For example, if the label corresponding to the SVM classifier is food, and the input unlabeled data is the consumption data generated when buying clothes, the output result of the SVM classifier is 0. If the input unlabeled data is the consumption data generated when buying food, the output result of the SVM classifier is 1.
[0120] The number of SVM classifiers and the corresponding number and type of labels can be set according to actual needs, and the label types include consumption categories, consumption levels, consumption preferences (prefer travel, prefer food, or others), etc. Therefore, the label classification results obtained by the method provided in this embodiment can fully explore the deep characteristics of users, understand the user's consumption preferences, growth predictions, churn warnings, etc., so as to better improve the user experience and provide more accurate services.
[0121] See also Figure 5 One embodiment of the present application provides a label classification model training device 10, comprising:
[0122] An acquisition module 11 is used to acquire an unlabeled data set and a labeled data set, and construct a Gaussian graph based on the unlabeled data set and the labeled data set;
[0123] The training module 12 is used to train an initial label classification model using a labeled data set.
[0124] An algorithm determination module 13, used to determine a label propagation algorithm between the labeled data set and the unlabeled data set according to the Gaussian graph;
[0125] A data conversion module 14 is used to convert the unlabeled data that can be converted in the unlabeled data set into labeled data based on the label propagation algorithm;
[0126] A sample construction module 15 is used to add the converted labeled data to the labeled data set to obtain a new labeled data set;
[0127] The training module 12 is also used to retrain the initial label classification model using the new label data set to obtain a target label classification model.
[0128] The data in the unlabeled data set and the labeled data set are both two-dimensional data, the first dimension data in the two-dimensional data represents consumption data, the second dimension data represents the label of the consumption data, and the second dimension data in the unlabeled data set is a null value. The acquisition module 11 is specifically used to: construct the vertices of the Gaussian graph based on the first dimension data in the unlabeled data set and the labeled data set; construct the edges of the Gaussian graph according to the similarity between each first dimension data in the unlabeled data set and the labeled data set.
[0129] The algorithm determination module 13 is specifically used to obtain real-valued functions about vertices and edges in the Gaussian graph based on the Gaussian graph, and the real-valued functions include unlabeled real-valued functions of unlabeled data sets and labeled real-valued functions of labeled data sets; obtain a Laplace matrix based on the Gaussian graph, and the Laplace matrix includes a diagonal matrix and a weight matrix; construct an energy function of the real-valued function according to the real-valued function and the Laplace matrix; minimize the energy function to obtain a relationship algorithm between the unlabeled real-valued function and the labeled real-valued function, and the relationship algorithm is the label propagation algorithm.
[0130] The algorithm determination module 12 is specifically used to generate the transfer matrix of the Gaussian graph based on the diagonal matrix and the weight matrix; minimize the energy function to obtain an initial relationship algorithm, which includes the unlabeled real-valued function, the labeled real-valued function, the diagonal matrix and the weight matrix; replace the diagonal matrix and the weight matrix in the initial relationship algorithm with the transfer matrix to obtain the relationship algorithm, which includes the transfer matrix, the unlabeled real-valued function and the labeled real-valued function.
[0131] The output of the label propagation algorithm is the value of the unlabeled real-valued function. The data conversion module 13 is specifically used to perform the following steps for each unlabeled data in the unlabeled data set: perform the following steps for each unlabeled data in the unlabeled data set: substitute the unlabeled data into the label propagation algorithm to obtain the value of the unlabeled real-valued function; when the value of the unlabeled real-valued function is greater than a preset value, determine that the label in the labeled real-valued function used in the label propagation algorithm calculation is the label of the unlabeled data; add a label to the unlabeled data.
[0132] The acquisition module 11 is specifically used to obtain an initial unlabeled data set; after inputting the initial unlabeled data set into the initial label classification model, obtain the distance vector between the output of each unlabeled data in the initial unlabeled data set and the initial label classification model; obtain the M unlabeled data with the smallest distance vector in the initial unlabeled data set to constitute the unlabeled data set, where M is an integer greater than zero.
[0133] See also Figure 6 One embodiment of the present application provides a label classification device 20, comprising:
[0134] An acquisition module 21 is used to acquire unlabeled data to be classified by labels;
[0135] The processing module 22 is used to input the unlabeled data to be labeled and classified into the target label classification model as described in any of the above embodiments to obtain the label of the unlabeled data to be labeled and classified.
[0136] See also Figure 7 One embodiment of the present application provides an electronic device 30, comprising: a processor 31, and a memory 32 communicatively connected to the processor; the memory 32 stores computer execution instructions; the processor 31 executes the computer execution instructions stored in the memory 32 to implement the label classification model training method described in any of the above embodiments.
[0137] See also Figure 8 One embodiment of the present application provides an electronic device 40, including: a processor 41, and a memory 42 communicatively connected to the processor; the memory 42 stores computer-executable instructions; the processor 41 executes the computer-executable instructions stored in the memory 42 to implement the label classification method described in any of the above embodiments.
[0138] The present application also provides a computer-readable storage medium, which stores computer execution instructions. When the instructions are executed, the computer execution instructions are executed by a processor to implement the label classification model training method provided in any of the above embodiments.
[0139] The present application also provides another computer-readable storage medium, in which computer-executable instructions are stored. When the instructions are executed, the computer executes the label classification method provided in any of the above embodiments.
[0140] A computer program product includes a computer program, which, when executed by a processor, implements the label classification model training method described in any of the above embodiments.
[0141] A computer program product includes a computer program, which, when executed by a processor, implements the tag classification method described in any of the above embodiments.
[0142] It should be noted that the computer-readable storage medium may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM), etc. It may also be various electronic devices including one or any combination of the above memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0143] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0144] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course, 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, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0146] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0147] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0148] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0149] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A label classification model training method, characterized in that: include: Obtain an unlabeled data set and a labeled data set, and construct a Gaussian graph based on the unlabeled data set and the labeled data set; Using the labeled data set to train an initial label classification model; Determine a label propagation algorithm between the labeled data set and the unlabeled data set according to the Gaussian graph; Based on the label propagation algorithm, converting the unlabeled data that can be converted in the unlabeled data set into labeled data; Adding the converted labeled data to the labeled data set to obtain a new labeled data set; Retrain the initial label classification model using the new label data set to obtain a target label classification model; The obtaining of an unlabeled data set comprises: Obtain an initial unlabeled data set; after inputting the initial unlabeled data set into the initial label classification model, obtain a distance vector between the output of each unlabeled data in the initial unlabeled data set and the initial label classification model; obtain M unlabeled data with the smallest distance vector in the initial unlabeled data set to form the unlabeled data set, where M is an integer greater than zero; The data in the unlabeled data set and the labeled data set are both two-dimensional data, the first dimension data in the two-dimensional data represents consumption data, the second dimension data represents the label of the consumption data, the second dimension data in the unlabeled data set is a null value, and constructing a Gaussian graph based on the unlabeled data set and the labeled data set includes: Constructing vertices of the Gaussian graph based on the first dimension data in the unlabeled data set and the labeled data set; The edges of the Gaussian graph are constructed according to the similarity between each first dimension data in the unlabeled dataset and the labeled dataset, wherein the weights of the first dimension data in the unlabeled dataset and the first dimension data in the labeled dataset are negatively correlated with the similarity between the two peaks of the Gaussian graph.
2. The method according to claim 1, characterized in that Determining a label propagation algorithm between the labeled data set and the unlabeled data set according to the Gaussian graph includes: Based on the Gaussian graph, obtaining real-valued functions about vertices and edges in the Gaussian graph, wherein the real-valued functions include unlabeled real-valued functions of unlabeled data sets and labeled real-valued functions of labeled data sets; Acquire a Laplace matrix based on the Gaussian graph, wherein the Laplace matrix includes a diagonal matrix and a weight matrix; Constructing an energy function of the real-valued function according to the real-valued function and the Laplace matrix; Minimize the energy function to obtain a relationship algorithm between the unlabeled real-valued function and the labeled real-valued function, where the relationship algorithm is the label propagation algorithm.
3. The method according to claim 2, characterized in that The algorithm for minimizing the energy function to obtain the relationship between the unlabeled real-valued function and the labeled real-valued function includes: Generate a transfer matrix of the Gaussian graph according to the diagonal matrix and the weight matrix; Minimize the energy function to obtain an initial relational algorithm, wherein the initial relational algorithm includes the unlabeled real-valued function, the labeled real-valued function, the diagonal matrix, and the weight matrix; The diagonal matrix and the weight matrix in the initial relational algorithm are replaced by the transfer matrix to obtain the relational algorithm, wherein the relational algorithm includes the transfer matrix, the unlabeled real-valued function and the labeled real-valued function.
4. The method according to claim 2 or 3, characterized in that: The output of the label propagation algorithm is the value of the unlabeled real-valued function, and the converting the unlabeled data in the unlabeled data set into labeled data based on the label propagation algorithm includes: The following steps are performed for each unlabeled data in the unlabeled dataset: Substituting the unlabeled data into the label propagation algorithm to obtain the value of the unlabeled real-valued function; When the value of the unlabeled real-valued function is greater than a preset value, determining that the label in the labeled real-valued function used in the label propagation algorithm calculation is the label of the unlabeled data; Labels are added to the unlabeled data.
5. A label classification method, characterized in that: include: Obtain unlabeled data to be classified; The unlabeled data to be labeled is input into the target label classification model according to any one of claims 1 to 4 to obtain the label of the unlabeled data to be labeled.
6. A label classification model training device, characterized in that: include: An acquisition module, used to acquire an unlabeled data set and a labeled data set, and construct a Gaussian graph based on the unlabeled data set and the labeled data set; A training module, used to train an initial label classification model using the labeled data set; An algorithm determination module, configured to determine a label propagation algorithm between the labeled data set and the unlabeled data set according to the Gaussian graph; A data conversion module, configured to convert the unlabeled data that can be converted in the unlabeled data set into labeled data based on the label propagation algorithm; A sample construction module, used to add the converted labeled data to the labeled data set to obtain a new labeled data set; The training module is also used to retrain the initial label classification model using the new label data set to obtain a target label classification model; The acquisition module is specifically used to acquire an initial unlabeled data set; after inputting the initial unlabeled data set into the initial label classification model, acquire a distance vector between the output of each unlabeled data in the initial unlabeled data set and the initial label classification model; Obtaining M unlabeled data with the smallest distance vector in the initial unlabeled data set to form the unlabeled data set, where M is an integer greater than zero; The data in the unlabeled data set and the labeled data set are both two-dimensional data, the first dimension data in the two-dimensional data represent consumption data, the second dimension data represent labels of the consumption data, the second dimension data in the unlabeled data set is a null value, and the acquisition module is specifically used to construct the vertices of the Gaussian graph based on the first dimension data in the unlabeled data set and the labeled data set; The edges of the Gaussian graph are constructed according to the similarity between each first dimension data in the unlabeled dataset and the labeled dataset, wherein the weights of the first dimension data in the unlabeled dataset and the first dimension data in the labeled dataset are negatively correlated with the similarity between the two peaks of the Gaussian graph.
7. A label classification device, characterized in that: include: An acquisition module, used to acquire unlabeled data to be classified; A processing module is used to input the unlabeled data to be labeled and classified into the target label classification model according to any one of claims 1 to 4 to obtain the label of the unlabeled data to be labeled and classified.
8. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the label classification model training method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Classifier training method, classifier and sentiment classification system
CN105930411A
Switch cabinet fault classification method based on semi-supervised learning
CN111626374A
Data expansion method and apparatus based on label propagation
CN112001748A