Unlabeled numerical type feature classification method, device, equipment and readable storage medium
By sorting and dividing the feature data of labelless numerical types to generate pre-trained labels, and gradually iterating the training of classification models, the problem of insufficient generalization performance of classification models in the existing technology is solved, and more efficient and accurate classification prediction is achieved.
Patent Information
- Application Number
- CN202011030290.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-25
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2040-09-25
AI Technical Summary
The existing feature classification method of labelless numerical type is not accurate and efficient enough, due to the poor interpretability of unsupervised learning and the high cost of manual annotation, resulting in insufficient generalization performance of the model.
By sorting and dividing the input features, a pre-trained classification label is generated, and the classification model is gradually iterated on the initial training sample set, and the model is built and trained using the pre-trained label and the initial test sample set until the classification prediction of all sample data is completed.
The efficiency of classification annotation is improved, the generalization performance of classification models is greatly improved, and the problems of underfitting and insufficient interpretability are solved, making the prediction accuracy of classification models higher.
Smart Images

Figure CN112163617B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine learning technology, and in particular to a method, device, equipment and readable storage medium for classifying unlabeled numerical type features. Background Art
[0002] With the continuous development of machine learning technology, at present, for unlabeled application scenarios, the method of classifying application scenarios is usually to build a mathematical model by unsupervised learning, or to add classification labels to some sample data by manual labeling. Unsupervised learning methods such as clustering are used, but the clustering method is greatly affected by the selection of initial values, and the interpretability of the model is poor. Although the manual labeling method can classify application scenarios more accurately, there are also defects such as the high cost of manual labeling, difficulty in popularization and promotion, and limited labels. The trained classification model often has various defects such as underfitting and insufficient generalization performance. All of the above situations reflect the technical problems that the existing unlabeled numerical type feature classification methods are not accurate and efficient enough. Summary of the invention
[0003] The main purpose of the present invention is to provide a label-free numerical type feature classification method, device, equipment and computer-readable storage medium, aiming to solve the problem that the existing label-free numerical type feature classification method is not accurate and efficient enough.
[0004] To achieve the above object, the present invention provides a method for classifying unlabeled numerical type features, the method comprising the following steps:
[0005] Obtain a sample data set whose input features are numerical and whose feature labels to be predicted are unknown, sort and divide the features of the sample data set to obtain sorting and division results of the features;
[0006] Obtaining pre-trained classification labels based on the sorting and division results of the features, screening out an initial training sample set from the sample data set, and determining an initial test sample set;
[0007] On the initial training sample set, a classification model is constructed and iteratively trained based on the pre-trained classification labels and the initial test sample set, so as to complete classification prediction of all sample data in the sample data set by using the classification model during the step-by-step iterative training process.
[0008] Optionally, the step of constructing and iteratively training a classification model based on the pre-trained classification labels and the initial test sample set on the initial training sample set, so as to complete classification prediction of all sample data in the sample data set by using the classification model in the stepwise iterative training process includes:
[0009] On the initial training sample set, a classification model is constructed based on the pre-trained classification labels, and sample data in the sample data set other than the initial training sample set is listed as an initial test sample set;
[0010] The classification model is iterated repeatedly. In each round of iteration, the classification model is used to perform classification prediction on several sample data in the initial test sample set, and the sample data is added to the initial training sample set as the target training sample set for the next round of classification model training until the classification of all sample data in the sample data set is completed.
[0011] Optionally, the step of iterating the classification model successively, using the classification model in each round of iteration to perform classification prediction on a number of sample data in the initial test sample set, and adding them to the initial training sample set as a target training sample set for the next round of classification model training, until the classification of all sample data in the sample data set is completed, comprises:
[0012] In the first round of iteration, the sample data to be predicted in the initial test sample set is determined, and the classification model is used to perform classification prediction on the sample data to be predicted and mark the prediction classification label, wherein the sample data to be predicted is the sample data close to the initial training sample set in the feature space;
[0013] Add the sample data to be predicted marked with the prediction classification label to the initial training sample set as the target training sample set required for the next round of iteration, and list the sample data in the sample data set except the target training sample set as the target test sample set required for the next round of iteration;
[0014] The sample data to be predicted in the next iteration is determined and marked based on the target training sample set, and when it is detected that the preset iteration convergence condition is currently met, the current iteration process is stopped to complete the classification of all sample data in the sample data set.
[0015] Optionally, the step of stopping the current iteration process to complete the classification of all sample data in the sample data set until it is detected that a preset iteration convergence condition is currently met includes:
[0016] When it is detected that the current iteration number reaches the preset maximum iteration number, or the number of samples in the target training sample set corresponding to the current iteration process is consistent with the number of samples in the sample data set, the iteration is stopped to complete the classification of all sample data in the sample data set.
[0017] Optionally, the step of obtaining a sample data set whose input features are numerical and whose feature labels to be predicted are unknown, and sorting and dividing the features of the sample data set to obtain the sorting and division results of the features includes:
[0018] Obtain a sample data set whose input features are numerical and whose feature labels to be predicted are unknown, and determine the number of sample classifications;
[0019] Each sample data in the sample data set is sorted from large to small according to the feature, and the sorted sample data set is divided equally according to the sample classification number to obtain the sample data set divided equally as the sorting and division result of the feature.
[0020] Optionally, the sample data set includes features of multiple dimensions, and each feature is of numerical type.
[0021] The steps of obtaining pre-trained classification labels based on the sorting and partitioning results of the features, selecting an initial training sample set from the sample data set, and determining an initial test sample set include:
[0022] The division level corresponding to the sample data set after equal division is used as the pre-training label, and sample data corresponding to different dimensional features and at the same highest division level are screened out from the sample data set after equal division to be aggregated into the initial training sample set.
[0023] Optionally, before the step of obtaining a sample data set whose input features are numerical and whose feature labels to be predicted are unknown, and sorting and dividing the features of the sample data set to obtain the sorting and division results of the features, the step further includes:
[0024] Obtaining an original data set whose input features are numerical and whose feature labels to be predicted are unknown, and processing missing values and outliers on the original data set to obtain a preprocessed data set;
[0025] The preprocessed data set is subjected to data transformation and normalization processing to obtain the sample data set.
[0026] The present invention also provides a label-free numerical type feature classification device, the label-free numerical type feature classification device comprising:
[0027] A sorting and partitioning module is used to obtain a sample data set whose input features are numerical and whose feature labels to be predicted are unknown, sort and partition the features of the sample data set, and obtain a sorting and partitioning result of the features;
[0028] A sample screening module, used to obtain pre-trained classification labels based on the sorting and division results of the features, screen out an initial training sample set from the sample data set, and determine an initial test sample set;
[0029] The classification prediction module is used to construct and iteratively train a classification model on the initial training sample set based on the pre-trained classification labels and the initial test sample set, so as to complete the classification prediction of all sample data in the sample data set using the classification model during the step-by-step iterative training process.
[0030] Optionally, the classification prediction module includes:
[0031] A model building unit, configured to build a classification model on the initial training sample set based on the pre-trained classification labels, and list the sample data in the sample data set except the initial training sample set as an initial test sample set;
[0032] A model iteration unit is used to iterate the classification model successively. In each round of iteration, the classification model is used to perform classification prediction on a number of sample data in the initial test sample set, and the sample data is added to the initial training sample set as a target training sample set for the next round of classification model training until the classification of all sample data in the sample data set is completed.
[0033] Optionally, the model iteration unit is further used for:
[0034] In the first round of iteration, the sample data to be predicted in the initial test sample set is determined, and the classification model is used to perform classification prediction on the sample data to be predicted and mark the prediction classification label, wherein the sample data to be predicted is the sample data close to the initial training sample set in the feature space;
[0035] Add the sample data to be predicted marked with the prediction classification label to the initial training sample set as the target training sample set required for the next round of iteration, and list the sample data in the sample data set except the target training sample set as the target test sample set required for the next round of iteration;
[0036] The sample data to be predicted in the next iteration is determined and marked based on the target training sample set, and when it is detected that the preset iteration convergence condition is currently met, the current iteration process is stopped to complete the classification of all sample data in the sample data set.
[0037] Optionally, the model iteration unit is further used for:
[0038] When it is detected that the current iteration number reaches the preset maximum iteration number, or the number of samples in the target training sample set corresponding to the current iteration process is consistent with the number of samples in the sample data set, the iteration is stopped to complete the classification of all sample data in the sample data set.
[0039] Optionally, the sorting and partitioning module includes:
[0040] A classification determination unit, used to obtain a sample data set whose input features are numerical and whose feature labels to be predicted are unknown, and determine the number of sample classifications;
[0041] The equal division unit is used to sort each sample data in the sample data set from large to small according to the feature, and divide the sorted sample data set into equal parts according to the sample classification number, so as to obtain the sample data set after equal division as the sorting and division result of the feature.
[0042] Optionally, the sample data set includes features of multiple dimensions, and each feature is of numerical type.
[0043] The sample screening module comprises:
[0044] The sample aggregation unit is used to use the division level corresponding to the sample data set after equal division as the pre-training label, and filter out sample data corresponding to different dimensional features and at the same highest division level from the sample data set after equal division, so as to aggregate them into the initial training sample set.
[0045] Optionally, the unlabeled numerical type feature classification device further includes:
[0046] A data processing module is used to obtain an original data set whose input features are numerical and whose feature labels to be predicted are unknown, and to process missing values and outliers on the original data set to obtain a preprocessed data set;
[0047] The data transformation module is used to perform data transformation and normalization processing on the preprocessing data set to obtain the sample data set.
[0048] The present invention also provides a label-free numerical type feature classification device, the label-free numerical type feature classification device comprising: a memory, a processor, and a label-free numerical type feature classification program stored in the memory and executable on the processor.
[0049] The unlabeled numerical type feature classification program implements the steps of the above-mentioned video playback control method when executed by the processor.
[0050] The present invention also provides a computer storage medium, on which a label-free numerical type feature classification program is stored. When the label-free numerical type feature classification program is executed by a processor, the steps of the above-mentioned label-free numerical type feature classification method are implemented.
[0051] The present invention generates pre-trained classification labels through a sorting and partitioning processing method, which provides a basis for subsequent classification models to perform classification prediction on sample data; the classification model predicts the classification labels of corresponding sample data, which solves the high cost pain point of manual labeling and improves the efficiency of classification labeling; the classification model is trained iteratively to greatly improve the generalization performance of the classification model, which makes up for the shortcomings of the current technology's poor interpretability and insufficient generalization ability of underfitting models, so that the classification labels predicted by the classification model after multiple rounds of training are more accurate, thereby solving the technical problem that the existing unlabeled numerical feature classification method is not accurate and efficient enough. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention;
[0053] Figure 2 It is a flowchart of the first embodiment of the method for classifying unlabeled numerical features of the present invention;
[0054] Figure 3 Schematic diagram of iterative training and prediction process in the second embodiment of the label-free numerical feature classification method of the present invention;
[0055] Figure 4 Schematic diagram of the refined iterative training and prediction process in the second embodiment of the label-free numerical feature classification method of the present invention.
[0056] Figure 5 Schematic diagram of the functional modules of the label-free numerical type feature classification device of the present invention.
[0057] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0058] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0059] The label-free numerical type feature classification method involved in the embodiment of the present invention is mainly applied to label-free numerical type feature classification method devices, such as smart TVs, smart refrigerators, etc.
[0060] Reference Figure 1 , Figure 1Schematic diagram of the hardware structure of the unlabeled numerical type feature classification method device involved in the embodiment of the present invention. In the embodiment of the present invention, the unlabeled numerical type feature classification method device may include a processor 1001 (such as a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005, and a camera 1006. Among them, the communication bus 1002 is used to realize the connection and communication between these components; the user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface); the memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory, and the memory 1005 may optionally be a storage device independent of the aforementioned processor 1001; the camera 1006 may be a lifting camera or a sliding camera, etc.
[0061] Those skilled in the art will understand that Figure 1 The hardware structure shown in the figure does not constitute a limitation on the device of the unlabeled numerical type feature classification method, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0062] Continue to refer to Figure 1 , Figure 1 The memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, and a label-free numerical type feature classification method program.
[0063] exist Figure 1 In the embodiment, the network communication module is mainly used to connect to the server and perform data communication with the server; and the processor 1001 can call the unlabeled numerical type feature classification method program stored in the memory 1005, and execute the unlabeled numerical type feature classification method provided by the embodiment of the present invention.
[0064] With the continuous development of machine learning technology, at present, for unlabeled application scenarios, the method of classifying application scenarios is usually to build a mathematical model by unsupervised learning, or to add classification labels to some sample data by manual labeling. Unsupervised learning methods such as clustering are used, but the clustering method is greatly affected by the selection of initial values, and the interpretability of the model is poor. Although the manual labeling method can classify application scenarios more accurately, there are also defects such as the high cost of manual labeling, difficulty in popularization and promotion, and limited labels. The trained classification model often has various defects such as underfitting and insufficient generalization performance. All of the above situations reflect the technical problems that the existing unlabeled numerical feature classification methods are not accurate and efficient enough.
[0065] To solve the above problems, the present invention provides a method for classifying unlabeled numerical type features, namely, generating pre-trained classification labels through sorting and partitioning processing, which provides a basis for subsequent classification models to perform classification prediction on sample data; predicting the classification labels corresponding to the sample data through the classification model solves the high cost pain point of manual labeling and improves the efficiency of classification labeling; and training the classification model iteratively greatly improves the generalization performance of the classification model, making up for the shortcomings of the current technology's poor interpretability and insufficient generalization ability of underfitting models, so that the classification labels predicted by the classification model after multiple rounds of training are more accurate, thereby solving the technical problem that the existing unlabeled numerical feature classification methods are not accurate and efficient enough.
[0066] Reference Figure 2 , Figure 2 Schematic diagram of the process of the first embodiment of the unlabeled numerical feature classification method of the present invention.
[0067] A first embodiment of the present invention provides a method for classifying unlabeled numerical type features, the method comprising the following steps:
[0068] Step S10, obtaining a sample data set whose input features are numerical and whose feature labels to be predicted are unknown, sorting and dividing the features of the sample data set to obtain sorting and division results of the features;
[0069] In this embodiment, the method is applied to a terminal device, which may be a server, a personal computer, a tablet device, etc. The sample data set is a set of sample data corresponding to one or more types of feature values, whose feature values are unlabeled numerical types. The sorting method is usually based on the size of the numerical value, and the order is sorted from large to small or from small to large. The division method includes equal division and unequal division. The sorting and division result is a sample data set after the original arrangement order is changed and grouped after sorting and division. Specifically, if the terminal currently receives a sample modeling instruction, a sample data set with a feature value of unlabeled numerical type is obtained according to the instruction. The instruction can be initiated by the user to the terminal in an artificial manner, or it can be initiated by the terminal according to a preset program, and this embodiment does not specifically limit this. After determining the sample data set, the terminal sorts and divides the sample data according to the size of the feature value of each sample data in the sample data set to obtain the above-mentioned sorting and division results.
[0070] Step S20, obtaining pre-trained classification labels based on the sorting and division results of the features, screening out an initial training sample set from the sample data set, and determining an initial test sample set;
[0071] In this embodiment, the pre-trained classification label is the division level corresponding to dividing the sample data in the sample data set into multiple groups of data in the division operation. The initial training sample set is a training sample set for the first round of iterations, which is composed of some sample data that meet the conditions selected from the sample data set.
[0072] Specifically, after completing the sorting and division operation of the sample data set, the terminal obtains the division level set during the division as a pre-trained classification label, such as three level labels of high, medium, and low. In the divided sample data set, the terminal screens out some sample data of the same level to form an initial training sample set, and uses the unscreened sample data as the corresponding initial test sample set, and trains the classification prediction model based on the initial training sample set. It should be noted that after determining the initial training sample set, the terminal can train the classification model according to the characteristics and labels of the training sample set, and gradually predict the target classification labels of the test samples, thereby completing the classification of the entire sample data set.
[0073] Step S30, on the initial training sample set, construct and gradually iterate the training classification model based on the pre-trained classification labels and the initial test sample set, so as to complete the classification prediction of all sample data in the sample data set by using the classification model in the step-by-step iterative training process.
[0074] In this embodiment, the classification model is constructed based on pre-trained classification labels and is used to predict the classification labels of unlabeled sample data in the sample data set.
[0075] The terminal builds a classification model based on the pre-trained classification labels on the initial training sample set, and uses the classification model to classify and predict part of the sample data in the initial test sample set, annotate them with predicted classification labels, and generate the training sample set and test sample set required for a new round of iterations. The classification model is retrained based on the new training sample set, and the classification labels of the test samples are predicted. After successive iterations, the classification labeling of all sample data in the sample data set can be completed.
[0076] As a specific embodiment, take user value classification as an example. If the classification labels correspond to high, medium, and low value users, the feature values correspond to the two categories of user registration time and user consumption amount. First, sort the user registration time and user consumption amount, and divide them into three levels of high, medium, and low, respectively, recorded as A1, B1, C1 and A2, B2, C2. In the sample data set, filter the samples marked as A1 and A2 and mark the user value category as label1; filter the samples of B1 and B2 and mark the user value category as label2; filter the samples of C1 and C2 and mark the user value category as label3. Use the above-screened samples as the training sample set, and the other samples as the test sample set. Build and train the classification model on the training set, and filter a part of the sample points in the test set and predict the user value category. Use the sample points with marked and predicted user value categories as the new training set, retrain the model and predict the sample points with new unknown user value labels. Iterate the above training and prediction process until the sample data sets are all marked with user value categories.
[0077] In this embodiment, the present invention obtains a sample data set whose input features are numerical and whose feature labels to be predicted are unknown, sorts and divides the features of the sample data set to obtain sorting and division results of the features; obtains pre-trained classification labels based on the sorting and division results of the features, screens out an initial training sample set from the sample data set, and determines an initial test sample set; on the initial training sample set, constructs and gradually iterates the training of a classification model based on the pre-trained classification labels and the initial test sample set, so as to complete the classification prediction of all sample data in the sample data set by using the classification model in the step-by-step iterative training process. Through the above-mentioned method, the present invention generates pre-trained classification labels through the processing method of sorting and dividing, which provides a basis for the subsequent classification model to perform classification prediction on the sample data; the classification model predicts the classification labels of the corresponding sample data, which solves the high cost pain point of manual labeling and improves the efficiency of classification labeling; by iteratively training the classification model, the generalization performance of the classification model is greatly improved, which makes up for the shortcomings of the current technology's poor interpretability and insufficient generalization ability of the underfitting model, so that the classification labels predicted by the classification model after multiple rounds of training are more accurate, thereby solving the technical problem that the existing feature classification method of unlabeled numerical type is not accurate and efficient enough.
[0078] Furthermore, based on the above Figure 2 The first embodiment shown in the figure proposes a second embodiment of the method for classifying unlabeled numerical features of the present invention. In this embodiment, step S30 includes:
[0079] On the initial training sample set, a classification model is constructed based on the pre-trained classification labels, and sample data in the sample data set other than the initial training sample set is listed as an initial test sample set;
[0080] The classification model is iterated repeatedly. In each round of iteration, the classification model is used to perform classification prediction on several sample data in the initial test sample set, and the sample data is added to the initial training sample set as the target training sample set for the next round of classification model training until the classification of all sample data in the sample data set is completed.
[0081] In this embodiment, if Figure 3 As shown in the figure, on the training sample set, a classification model is constructed and trained based on the generated labels for classification label prediction on the test set. The unscreened sample data is used as the test sample set. The screened training sample set only accounts for a very small proportion of the initial sample set, and the number of test sample sets is much larger than the training sample set. Therefore, it is necessary to iterate step by step, train the model step by step, and gradually screen the test set samples and predict the classification labels. From the perspective of division, first screen (n-1) sample points with characteristic values of Ai, Bi, Ci, Di, and Ei, recorded as (n-1)Xi; then screen (n-2) sample points with characteristic values of Ai, Bi, Ci, Di, and Ei, recorded as (n-2)Xi, and so on. It should be noted that if the number of sample points (nj)Xi screened in the jth round is greater than the number of sample points in the current training set, then based on the principle of randomness, samples equal to the current training set are extracted from (nj)Xi as the test set to ensure that the sample ratio of the test set to the training set in each iteration does not exceed 1:1.
[0082] Use the classification model to predict the sample classification labels of this round of test sample set, add the test sample data with the predicted classification labels to the current training set sample set as the next round of training sample set, and rebuild and train the classification model until every sample data in the sample data set has completed classification labeling.
[0083] Furthermore, the step of iterating the classification model successively, using the classification model in each round of iteration to perform classification prediction on a number of sample data in the initial test sample set, and adding them to the initial training sample set as a target training sample set for the next round of classification model training, until the classification of all sample data in the sample data set is completed, includes:
[0084] In the first round of iteration, the sample data to be predicted in the initial test sample set is determined, and the classification model is used to perform classification prediction on the sample data to be predicted and mark the prediction classification label, wherein the sample data to be predicted is the sample data close to the initial training sample set in the feature space;
[0085] Add the sample data to be predicted marked with the prediction classification label to the initial training sample set as the target training sample set required for the next round of iteration, and list the sample data in the sample data set except the target training sample set as the target test sample set required for the next round of iteration;
[0086] The sample data to be predicted in the next iteration is determined and marked based on the target training sample set, and when it is detected that the preset iteration convergence condition is currently met, the current iteration process is stopped to complete the classification of all sample data in the sample data set.
[0087] In this embodiment, the “close” in the above “close to the sample data of the initial training sample set in the feature space” can be understood as a shorter Euclidean distance in the feature space. Figure 4 As shown, Figure 4 The figure is a schematic diagram of the refined iterative training and prediction process. Taking the target classification label as 5 categories as an example, first select n samples with all feature dimensions Ai and mark the classification label as label1; select n samples with all feature dimensions Bi and mark the classification label as label2; select n samples with all feature dimensions Ci and mark the classification label as label3; select n samples with all feature dimensions Di and mark the classification label as label4; select n samples with all feature dimensions Ei and mark the classification label as label5. The test set is screened for the first time, and n-1 samples with feature dimensions Ai, Bi, Ci, Di, and Ei are screened as test set 1. When the number of samples in test set 1 is more than that in training set 1, samples of the same number as those in training set 1 are randomly selected from test set 1 as samples for this round of testing. After predicting the classification label, they are added to the training set to cyclically train the classification model and predict the classification label. Then, n-2 samples with feature dimensions Ai, Bi, Ci, Di, and Ei are screened as test set 2. Repeat the training and prediction process corresponding to training set 1 and test set 1. And so on, until the final data result set and classification application model are obtained.
[0088] Furthermore, the step of stopping the current iteration process to complete the classification of all sample data in the sample data set until it is detected that the preset iteration convergence condition is currently met includes:
[0089] When it is detected that the current iteration number reaches the preset maximum iteration number, or the number of samples in the target training sample set corresponding to the current iteration process is consistent with the number of samples in the sample data set, the iteration is stopped to complete the classification of all sample data in the sample data set.
[0090] In this embodiment, the method needs to set an iterative convergence condition. It is generally believed that convergence is achieved when the number of samples in the target training sample set in a certain round of iteration is consistent with the number of samples in the sample data set. However, considering the special case where the full labeling of the sample data is not completed after a large number of iterations, in order to avoid such a situation for a large amount of system resources consumption, a maximum number of iterations can be set to protect the iterative calculation process. The maximum number of iterations can be flexibly set according to actual needs, and this embodiment does not specifically limit this.
[0091] Furthermore, pre-trained labels are generated through sorting and partitioning methods, and then the classification model is trained iteratively and the classification labels of the corresponding test sample set are predicted, finally achieving classification labeling of all sample data in the sample data set, solving the defects of high manual labeling cost and poor interpretability of clustering model, and greatly improving the generalization performance of the classification model; by setting multiple iteration convergence conditions, the large consumption of system resources caused by infinite iterations under special circumstances is avoided.
[0092] Furthermore, based on the above Figure 2 The first embodiment shown in the figure proposes a third embodiment of the method for classifying unlabeled numerical features of the present invention. In this embodiment, step S10 includes:
[0093] Obtain a sample data set whose input features are numerical and whose feature labels to be predicted are unknown, and determine the number of sample classifications;
[0094] Each sample data in the sample data set is sorted from large to small according to the feature, and the sorted sample data set is divided equally according to the sample classification number to obtain the sample data set divided equally as the sorting and division result of the feature.
[0095] In this embodiment, if Figure 3 As shown, the classification label is 5 categories for example. The values of each input feature sample point are sorted from high to low, and divided into 5 levels according to the value size. The division for feature 1 is A1, B1, C1, D1, E1, and the priority of the division decreases successively, that is, A1 is better than B1, B1 is better than C1, and so on. Similarly, the division for feature n is An, Bn, Cn, Dn, En, and the priority of the corresponding division decreases successively.
[0096] Furthermore, the sample data set includes features of multiple dimensions, and each feature is of numerical type. Step S20 includes:
[0097] The division level corresponding to the sample data set after equal division is used as the pre-training label, and sample data corresponding to different dimensional features and at the same highest division level are screened out from the sample data set after equal division to be aggregated into the initial training sample set.
[0098] In this embodiment, if Figure 3 As shown, the initial training sample set is selected from the initial sample set (equivalent to the sample data set after the above division). Sample points with feature values of A1, A2, ..., An are selected, and the classification label is marked as label1; sample points with feature values of B1, B2, ..., Bn are selected, and the classification label is marked as label2; sample points with feature values of C1, C2, ..., Cn are selected, and the classification label is marked as label3; sample points with feature values of D1, D2, ..., Dn are selected, and the classification label is marked as label4; sample points with feature values of E1, E2, ..., En are selected, and the classification label is marked as label5. The division level of each input feature is used as the pre-training classification label, and the priority of the category label is consistent with the division priority of each input feature, that is, label1 is better than label2, label2 is better than label3, and so on.
[0099] Furthermore, before step S10, the method further includes:
[0100] Obtaining an original data set whose input features are numerical and whose feature labels to be predicted are unknown, and processing missing values and outliers on the original data set to obtain a preprocessed data set;
[0101] The preprocessed data set is subjected to data transformation and normalization processing to obtain the sample data set.
[0102] In this embodiment, for a given sample data set, preprocessing operations such as missing values and outliers are first performed. Then, data transformation is performed for each numerical feature. Data transformation follows three principles: First, before and after the transformation, the corresponding order of the characteristic values of the sample points remains unchanged, that is, the transformation is mapped into a "monotonically increasing" or "monotonically decreasing" functional relationship; second, after the transformation, the characteristic values of the sample points of each dimension are "the larger the better", that is, when the original value of a certain dimensional feature is "the smaller the better", it is necessary to adopt a "monotonically decreasing" transformation; third, the sample data with skewed distribution is transformed into a distribution close to normal distribution or uniform distribution. In order to reduce the impact of the differences between the features of each dimension on the classification model, the data is uniformly normalized after transformation, and finally the above-mentioned sample data set can be obtained.
[0103] Furthermore, by sorting the sample data in the sample data set by size and dividing them equally, it is convenient for the subsequent screening of the training sample set; by screening samples with the same feature division level from the sample data set as the initial training sample set, it provides conditions for the early classification model construction; by preprocessing the original data set to obtain the sample data set, the efficiency of subsequent sorting and division of the sample data in the sample data set is improved.
[0104] In addition, refer to Figure 5 The embodiment of the present invention further provides a label-free numerical type feature classification device, the label-free numerical type feature classification device comprising:
[0105] The sorting and partitioning module 10 is used to obtain a sample data set whose input features are numerical and whose feature labels to be predicted are unknown, sort and partition the features of the sample data set, and obtain a sorting and partitioning result of the features;
[0106] A sample screening module 20, for obtaining pre-trained classification labels based on the sorting and partitioning results of the features, screening out an initial training sample set from the sample data set, and determining an initial test sample set;
[0107] The classification prediction module 30 is used to construct and gradually iteratively train a classification model on the initial training sample set based on the pre-trained classification labels and the initial test sample set, so as to use the classification model to complete the classification prediction of all sample data in the sample data set during the step-by-step iterative training process.
[0108] Among them, the steps implemented by each functional module of the label-free numerical type feature classification device can refer to the various embodiments of the label-free numerical type feature classification method of the present invention, and will not be repeated here.
[0109] The present invention also provides a label-free numerical type feature classification device.
[0110] The unlabeled numerical type feature classification device includes a processor, a memory, and an unlabeled numerical type feature classification program stored in the memory and executable on the processor, wherein when the unlabeled numerical type feature classification program is executed by the processor, the steps of the unlabeled numerical type feature classification method as described above are implemented.
[0111] Among them, the method implemented when the unlabeled numerical type feature classification program is executed can refer to the various embodiments of the unlabeled numerical type feature classification method of the present invention, and will not be repeated here.
[0112] In addition, an embodiment of the present invention further provides a computer storage medium.
[0113] The computer storage medium stores a label-free numerical type feature classification program, and when the label-free numerical type feature classification program is executed by the processor, the operations in the label-free numerical type feature classification method provided in the above embodiment are implemented.
[0114] 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 system 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 system. 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 system including the element.
[0115] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0116] 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 invention, 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 enabling 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 invention.
[0117] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for classifying unlabeled numerical features, characterized in that: The unlabeled numerical feature classification method comprises the following steps: In response to a sample modeling instruction sent by a user terminal, a sample data set whose input features are numerical and whose feature labels to be predicted are unknown is obtained from the sample modeling instruction, and the number of sample classifications is determined; Sorting each sample data in the sample data set from large to small according to the feature, and dividing the sorted sample data set into equal parts according to the number of sample classifications, to obtain the sample data set divided into equal parts as the sorting and division result of the feature; The sample data set includes features of multiple dimensions, and each feature is of numerical type; The division level corresponding to the sample data set after the equal division is used as a pre-training classification label, and sample data corresponding to different dimensional features and having the same highest division level are selected from the sample data set after the equal division to be aggregated into an initial training sample set; On the initial training sample set, a classification model is constructed based on the pre-trained classification labels, and sample data in the sample data set other than the initial training sample set is listed as an initial test sample set; In the first round of iteration, the sample data to be predicted in the initial test sample set is determined, and the classification model is used to perform classification prediction on the sample data to be predicted and mark the prediction classification label, wherein the sample data to be predicted is the sample data close to the initial training sample set in the feature space; Add the sample data to be predicted marked with the prediction classification label to the initial training sample set as the target training sample set required for the next round of iteration, and list the sample data in the sample data set except the target training sample set as the target test sample set required for the next round of iteration; The sample data to be predicted in the next iteration is determined and marked based on the target training sample set, and when it is detected that the preset iteration convergence condition is currently met, the current iteration process is stopped to complete the classification of all sample data in the sample data set.
2. The unlabeled numerical feature classification method as claimed in claim 1, characterized in that: The step of stopping the current iteration process to complete the classification of all sample data in the sample data set until it is detected that the preset iteration convergence condition is currently met includes: When it is detected that the current iteration number reaches the preset maximum iteration number, or the number of samples in the target training sample set corresponding to the current iteration process is consistent with the number of samples in the sample data set, the iteration is stopped to complete the classification of all sample data in the sample data set.
3. The unlabeled numerical feature classification method according to claim 1, characterized in that: Before the step of obtaining a sample data set whose input features are numerical and whose feature labels to be predicted are unknown, and sorting and dividing the features of the sample data set to obtain the sorting and division results of the features, the step further includes: Obtaining an original data set whose input features are numerical and whose feature labels to be predicted are unknown, and processing missing values and outliers on the original data set to obtain a preprocessed data set; The preprocessed data set is subjected to data transformation and normalization processing to obtain the sample data set.
4. A label-free numerical type feature classification device, characterized in that: The unlabeled numerical type feature classification device comprises: A sorting and partitioning module, configured to respond to a sample modeling instruction sent by a user terminal, obtain a sample data set whose input features are numerical and whose feature labels to be predicted are unknown from the sample modeling instruction, and determine the number of sample classifications; Sorting each sample data in the sample data set from large to small according to the feature, and dividing the sorted sample data set into equal parts according to the number of sample classifications, to obtain the sample data set divided into equal parts as the sorting and division result of the feature; the sample data set includes features of multiple dimensions, and each feature is of numerical type; A sample screening module is used to use the division level corresponding to the sample data set after the equal division as a pre-training classification label, and screen out sample data corresponding to different dimensional features and having the same highest division level from the sample data set after the equal division, so as to aggregate them into an initial training sample set; A classification prediction module, used to build a classification model on the initial training sample set based on the pre-trained classification labels, and list the sample data in the sample data set except the initial training sample set as an initial test sample set; In the first round of iteration, the sample data to be predicted in the initial test sample set is determined, and the classification model is used to perform classification prediction on the sample data to be predicted and mark the prediction classification label, wherein the sample data to be predicted is the sample data close to the initial training sample set in the feature space; Add the sample data to be predicted marked with the prediction classification label to the initial training sample set as the target training sample set required for the next round of iteration, and list the sample data in the sample data set except the target training sample set as the target test sample set required for the next round of iteration; The sample data to be predicted in the next iteration is determined and marked based on the target training sample set, and when it is detected that the preset iteration convergence condition is currently met, the current iteration process is stopped to complete the classification of all sample data in the sample data set.
5. A label-free numerical feature classification device, characterized in that: The label-free numerical type feature classification device comprises: a memory, a processor, and an label-free numerical type feature classification program stored in the memory and executable on the processor. When the label-free numerical type feature classification program is executed by the processor, the steps of the label-free numerical type feature classification method as described in any one of claims 1 to 3 are implemented.
6. A computer storage medium, characterized in that: The computer storage medium stores a label-free numerical type feature classification program, which, when executed by a processor, implements the steps of the label-free numerical type feature classification method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Classifier generation method using combination of mini-classifiers with regularization and uses thereof
CA2924320A1
Text classification method, text classifier and storage medium for unbalanced data set
CN108628971A