Sample prediction model training method, device, electronic device and storage medium

By using preset classification thresholds and prediction probabilities to determine pseudo labels in sample prediction model training, and combining known labels and pseudo labels for model training, the problem of poor pseudo label quality is solved, and model performance and pseudo label accuracy are improved.

CN114154556BActive Publication Date: 2024-09-06HANGZHOU FRAUDMETRIX TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111297663.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-03
Publication Date
2024-09-06
Estimated Expiration
2041-11-03

AI Technical Summary

Technical Problem

The pseudo-label algorithm results in poor pseudo-label quality during sample prediction model training, which makes it impossible to accurately classify unknown labeled samples, affecting model performance.

Method used

By obtaining known label samples and unknown label samples, train the model and use preset classification thresholds and prediction probabilities to determine pseudo labels, and combine known labels and pseudo labels for model training to ensure the quality of pseudo labels, thereby improving model performance.

Benefits of technology

It improves the accuracy of pseudo-labels and model performance, ensuring the effectiveness of sample expansion training based on pseudo-labels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114154556B
    Figure CN114154556B
Patent Text Reader

Abstract

The present invention provides a training method, device, electronic device and storage medium for a sample prediction model, which belongs to the field of data processing, wherein a first sample with a known label can be used to train a first model, and then the first model can be used to predict a second sample with an unknown label to determine a first prediction probability corresponding to the second sample, and the second sample is classified according to a preset classification threshold and the first prediction probability to obtain a pseudo label, and then the sample prediction model is trained based on the first sample and the second sample with the pseudo label, wherein the preset classification threshold can be obtained by classifying the first sample using the second prediction probability as the classification threshold and determining the classification threshold that meets the first classification condition, and the second prediction probability is the prediction probability of the first model for the first sample. Since the first sample is a known label, the classification performance of the first model can be tested through the first sample, thereby ensuring the quality of the pseudo label obtained by the first model classifying the second sample.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and more specifically, to a training method, device, electronic device and storage medium for a sample prediction model. Background Art

[0002] The pseudo labeling algorithm is an algorithm that trains a model using samples with known labels, uses the trained model to predict samples with unknown labels, obtains the prediction probability of the model output, and then determines the pseudo labels that may correspond to the samples with unknown labels based on the prediction probability. The pseudo labeling algorithm can expand the sample capacity in model training and improve model performance.

[0003] At present, pseudo-labeling algorithms usually select predicted labels with higher prediction probabilities as pseudo-labels. However, directly selecting predicted labels with higher prediction probabilities may lead to false positives and false negatives, resulting in poor quality of pseudo-labels and inability to accurately classify samples with unknown labels, affecting model performance. Summary of the invention

[0004] The present invention provides a training method, device, electronic device and storage medium for a sample prediction model to solve the problem that when a pseudo-label algorithm is used for model training in a sample prediction method, the quality of the pseudo-label is poor, the classification of unknown label samples cannot be accurately obtained, and the model performance is affected.

[0005] A first aspect of the present invention provides a method for training a sample prediction model, which may include:

[0006] Obtain a first sample with a known label and a second sample with an unknown label;

[0007] Performing model training based on the first sample to obtain a first model;

[0008] Using the first model to predict the second sample, to obtain a first prediction probability corresponding to the second sample;

[0009] Using a first model to predict the first sample to determine a second prediction probability, and using different second prediction probabilities as classification thresholds to classify the first sample, and using the classification thresholds for classifying the first sample that meet the first classification condition as the preset classification threshold;

[0010] Classify the second sample according to the preset classification threshold and the first predicted probability, and determine a pseudo label corresponding to the second sample;

[0011] The first sample with a known label and the second sample with a pseudo label are used to perform model training to obtain a sample prediction model.

[0012] Optionally, the step of using the first model to predict the first sample to determine a second prediction probability, and classifying the first sample using different second prediction probabilities as classification thresholds, and using the classification threshold for classifying the first sample that meets the first classification condition as the preset classification threshold is replaced by:

[0013] Classify the second sample by using different first predicted probabilities as classification thresholds or using preset probabilities as the classification thresholds, and use the classification thresholds for classifying the second sample in accordance with second classification conditions as preset classification thresholds;

[0014] After classifying the second sample according to the preset classification threshold and the first predicted probability and determining the pseudo label corresponding to the second sample, the method further includes:

[0015] Determine a first similarity standard deviation between the first sample corresponding to a target label and the second sample corresponding to the target label, wherein the target label is any label of the same type as the known label and the pseudo label;

[0016] Determining a second similarity standard deviation between the first samples corresponding to the target label;

[0017] When the first similarity standard deviation is less than or equal to the second similarity standard deviation, the pseudo label is retained.

[0018] Optionally, the using different second prediction probabilities as classification thresholds to classify the first samples, and using the classification thresholds for classifying the first samples that meet the first classification condition as preset classification thresholds, includes:

[0019] Taking each of the second predicted probabilities as a classification threshold in turn, determining the first sample whose second predicted probability is greater than or equal to the classification threshold as a first predicted class sample, and determining the first sample whose second predicted probability is less than the classification threshold as a second predicted class sample;

[0020] Determine the inter-class variance between the first prediction class samples and the second prediction class samples corresponding to each of the classification thresholds;

[0021] The classification threshold corresponding to the maximum value of the inter-class variance is used as the preset classification threshold.

[0022] Optionally, the first samples include samples of a first known class and samples of a second known class, and determining the inter-class variance between the first predicted class samples and the second predicted class samples corresponding to each of the classification thresholds includes:

[0023] Determine a first proportion of the first predicted class samples in the first known class samples and a first average probability corresponding to the first predicted class samples;

[0024] Determine a second proportion of the second predicted class samples in the second known class samples and a second average probability corresponding to the second predicted class samples;

[0025] An inter-class variance between samples of the first prediction class and samples of the second prediction class is determined according to the first proportion, the second proportion, the first average probability, and the second average probability.

[0026] Optionally, determining a first similarity standard deviation between the first sample corresponding to the target label and the second sample corresponding to the target label includes:

[0027] Determine, according to the pseudo label and the known label, a first similarity between each of the first samples corresponding to the target label and each of the second samples corresponding to the target label;

[0028] Determine the standard deviation between the first similarities corresponding to the same second samples to obtain the first similarity standard deviation.

[0029] Optionally, determining, according to the pseudo label and the known label, a first similarity between each of the first samples corresponding to the target label and each of the second samples corresponding to the target label includes:

[0030] The standard Euclidean distance between each of the first samples corresponding to the target label and each of the second samples corresponding to the target label is calculated according to the pseudo label and the known label.

[0031] Optionally, determining a second similarity standard deviation between the first samples corresponding to the target tag includes:

[0032] Determine a second similarity between two of the first samples corresponding to the target label;

[0033] Determine a standard deviation between the second similarities to obtain the second similarity standard deviation.

[0034] Optionally, before classifying the first samples using different second predicted probabilities as classification thresholds, the method further includes:

[0035] The second prediction probability is deduplicated.

[0036] A second aspect of the present invention provides a training device for a sample prediction model, which may include:

[0037] A sample acquisition module, used to acquire a first sample with a known label and a second sample with an unknown label;

[0038] A model training module, used to perform model training based on the first sample to obtain a first model;

[0039] A probability prediction module, configured to predict the second sample using the first model to obtain a first prediction probability corresponding to the second sample;

[0040] a threshold determination module, configured to predict the first sample using the first model to determine a second prediction probability, and classify the first sample using different second prediction probabilities as classification thresholds, and use the classification threshold for classifying the first sample in accordance with a first classification condition as a preset classification threshold;

[0041] a sample labeling module, configured to classify the second sample according to the preset classification threshold and the first prediction probability, and determine a pseudo label corresponding to the second sample;

[0042] The model training module is further used to perform model training using the first sample with a known label and the second sample with a pseudo label to obtain a sample prediction model.

[0043] Optionally, the threshold determination module is further configured to classify the second sample by using different first predicted probabilities as classification thresholds or using a preset probability as the classification threshold, and using the classification threshold for classifying the second sample in accordance with a second classification condition as a preset classification threshold;

[0044] Optionally, the device further comprises:

[0045] A first similarity standard deviation module, used to determine a first similarity standard deviation between the first sample corresponding to a target label and the second sample corresponding to the target label, wherein the target label is any label of the same type between the known label and the pseudo label;

[0046] A second similarity standard deviation module, used to determine a second similarity standard deviation between the first samples corresponding to the target label;

[0047] The pseudo-label screening module is configured to retain the pseudo-label when the first similarity standard deviation is less than or equal to the second similarity standard deviation.

[0048] Optionally, the threshold determination module includes:

[0049] A prediction class sample classification submodule, used to sequentially use each of the second prediction probabilities as a classification threshold, determine a first sample whose second prediction probability is greater than or equal to the classification threshold as a first prediction class sample, and determine a first sample whose second prediction probability is less than the classification threshold as a second prediction class sample;

[0050] An inter-class variance determination submodule, used to determine the inter-class variance between the first prediction class samples and the second prediction class samples corresponding to each of the classification thresholds;

[0051] The threshold determination submodule is used to use the classification threshold corresponding to the maximum value of the inter-class variance as a preset classification threshold.

[0052] Optionally, the first sample includes a first known class sample and a second known class sample, and the inter-class variance determination submodule includes:

[0053] A first average probability unit, used to determine a first proportion of the first predicted class samples in the first known class samples, and a first average probability corresponding to the first predicted class samples;

[0054] A second average probability unit, used to determine a second proportion of the second predicted class samples in the second known class samples, and a second average probability corresponding to the second predicted class samples;

[0055] An inter-class variance determining unit is used to determine the inter-class variance between the first prediction class samples and the second prediction class samples according to the first proportion, the second proportion, the first average probability, and the second average probability.

[0056] Optionally, the first similarity standard deviation module includes:

[0057] A first similarity submodule, configured to determine, based on the pseudo label and the known label, a first similarity between each of the first samples corresponding to the target label and each of the second samples corresponding to the target label;

[0058] The first similarity standard deviation submodule is used to determine the standard deviation between the first similarities corresponding to the same second samples to obtain the first similarity standard deviation.

[0059] The first similarity submodule is specifically configured to calculate, based on the pseudo-label and the known label, a standard Euclidean distance between each of the first samples corresponding to the target label and each of the second samples corresponding to the target label.

[0060] Optionally, the second similarity standard deviation module includes:

[0061] A second similarity submodule, used to determine a second similarity between the first samples corresponding to the target label;

[0062] The second similarity standard deviation submodule is used to determine the standard deviation between the second similarities to obtain the second similarity standard deviation.

[0063] Optionally, the threshold determination module is further used to remove duplications from the second prediction probability.

[0064] The third aspect of the present invention provides an electronic device, which includes: an interface, a bus, a memory and a processor, wherein the interface, the memory and the processor are connected via the bus, the memory is used to store an executable program, and the processor is configured to run the executable program to implement the steps of the sample prediction model training method as described in the first aspect.

[0065] A fourth aspect of the present invention provides a computer storage medium, on which an executable program is stored, and the executable program is executed by a processor to implement the steps of the sample prediction model training method as described in the first aspect.

[0066] Compared with the related art, the present invention has the following advantages:

[0067] In an embodiment of the present invention, a training method for a sample prediction model is provided, wherein a first sample with a known label can be used to train a first model, and then the first model can be used to predict a second sample with an unknown label to determine a first prediction probability corresponding to the second sample, and the second sample can be classified according to a preset classification threshold and the first prediction probability to obtain a pseudo label, and then the sample prediction model can be obtained by training the first sample with a known label and the second sample with a pseudo label, wherein the preset classification threshold can be obtained by classifying the first sample using different second prediction probabilities as classification thresholds, and determining a classification threshold at which the classification meets the first classification condition, and the second prediction probability is the prediction probability of the first model for the first sample. Since the first sample is a known label, the classification performance of the first model can be tested by the first sample, so that the classification of the first sample meets the requirements of the first classification condition, thereby ensuring the quality of the pseudo label obtained by the first model classifying the second sample, and further ensuring the model performance of the sample expansion training model based on the second sample with the pseudo label.

[0068] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0070] Figure 1 It is a flowchart of the steps of a training method of a sample prediction model provided by an embodiment of the present invention;

[0071] Figure 2 is a flowchart of the steps of another sample prediction model training method provided by an embodiment of the present invention;

[0072] Figure 3 is a flowchart of the steps of another sample prediction model training method provided by an embodiment of the present invention;

[0073] Figure 4 It is a schematic diagram of a data processing process for sample prediction model training provided by an embodiment of the present invention;

[0074] Figure 5 It is a structural block diagram of a training device for a sample prediction model provided by an embodiment of the present invention;

[0075] Figure 6 It is a structural block diagram of another sample prediction model training device provided by an embodiment of the present invention;

[0076] Figure 7 It is a structural block diagram of another sample prediction model training device provided by an embodiment of the present invention;

[0077] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0078] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0079] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0080] Figure 1: is a flowchart of a method for training a sample prediction model provided by an embodiment of the present invention, and the method may include:

[0081] Step 101: Obtain a first sample with a known label and a second sample with an unknown label.

[0082] In the embodiment of the present invention, the first sample refers to sample data with known labels, and the second sample refers to sample data with unknown labels, wherein the label refers to the classification label of the sample, the known label refers to the known classification of the first sample in the sample data, and the unknown label refers to the unknown classification of the second sample in the sample data. Optionally, the sample data may be different according to different application scenarios. For example, in the risk control scenario, the sample data may be customer application information for risk control-related businesses, in the commodity analysis scenario, the sample data may be customer purchase data for related commodities, in the image and text recognition scenario, the sample data may be image data including text and background, etc., and in the email recognition scenario, the sample data may include data such as ordinary emails and spam.

[0083] In an embodiment of the present invention, the first sample may include sample data with at least two labels, and the label of each piece of sample data is known, such as the first sample may include black and white samples; the second sample may include sample data with unknown labels, that is, the category to which the sample data in the second sample belongs is unknown. Optionally, the labeled and classified sample data can be directly obtained as the first sample, and the unlabeled and classified sample data can be obtained as the second sample. Alternatively, part of the obtained sample data can be labeled and classified as the first sample, and part of it can be not labeled and classified as the second sample. The embodiment of the present invention does not impose specific restrictions on this.

[0084] Step 102: Perform model training based on the first sample to obtain a first model.

[0085] In an embodiment of the present invention, model training can be performed based on the first sample. The relationship between sample data and labels in the first sample can be learned through model training, so as to obtain a first model that can predict the labels corresponding to the sample data and classify the sample data. Optionally, the first sample can be divided into a training set and a verification set, and a supervised machine learning model can be selected according to application requirements to train on the training set, and then the model effect can be verified according to the verification set until the model results meet expectations and the first model is obtained. The machine learning training model can be a classification algorithm such as logistic regression, support vector machine, decision tree, etc., and the embodiment of the present invention does not impose specific restrictions on this.

[0086] Step 103: Use the first model to predict the second sample to obtain a first prediction probability corresponding to the second sample.

[0087] In an embodiment of the present invention, the second sample is sample data of unknown labels. The first model can be used to predict the probability of different sample data in the second sample belonging to different categories, corresponding labels, etc. The first model can output the first predicted probability that different sample data in the second sample correspond to different labels and categories. According to the first predicted probability, the category and label to which the second sample belongs can be determined.

[0088] Step 104: Use the first model to predict the first sample to determine a second prediction probability, and use different second prediction probabilities as classification thresholds to classify the first samples, and use the classification thresholds for classifying the first sample that meet the first classification condition as the preset classification threshold.

[0089] In the embodiment of the present invention, after obtaining the first model, the first model can also be used to predict the first sample, so as to obtain the prediction result of the first model for the first sample as the second prediction probability, wherein the prediction probability corresponding to each sample data represents the probability of the label and classification corresponding to the sample data. Optionally, in step 102, the first sample can be split into a training set, a validation set, and a test set, wherein the training set and the validation set are used for model training to obtain the first model, and the test set is used for prediction by the first model in step 104 to obtain the second prediction probability.

[0090] In an embodiment of the present invention, the classification threshold is a threshold used to distinguish the classification of sample data. Optionally, depending on the model training method, the sample data may be determined to be a black sample when the predicted probability corresponding to the sample data is greater than or equal to the classification threshold, and the sample data may be determined to be a white sample when the predicted probability is less than the classification threshold. Alternatively, the sample data may be determined to be a black sample when the predicted probability corresponding to the sample data is less than the classification threshold, and the sample data may be determined to be a white sample when the predicted probability is greater than or equal to the classification threshold, etc.

[0091] In an embodiment of the present invention, each second predicted probability can be used as a classification threshold in turn to classify the second sample into a black sample and a white sample. Since the first sample is sample data with a known label, the first sample is classified separately by using each second predicted probability as a classification threshold, and the classification effect of different classification thresholds on the first sample can be determined. Among them, the first classification condition can be that the classification effect of the first sample according to different classification thresholds reaches the expected level, and the classification effect of different classification thresholds on the first sample can be determined according to the classification of the first sample with a known label.

[0092] Step 105: classify the second sample according to the preset classification threshold and the first prediction probability, and determine a pseudo label corresponding to the second sample.

[0093] In an embodiment of the present invention, after determining the preset classification threshold, the second sample can be label classified according to the preset classification threshold in the first prediction probability obtained by the first model predicting the second sample, so as to obtain a more accurate and effective pseudo-label for the sample data in the second sample.

[0094] Step 106: Use the first sample with a known label and the second sample with a pseudo label to perform model training to obtain a sample prediction model.

[0095] In the embodiment of the present invention, after determining the pseudo label corresponding to the second sample, the first sample and the second sample can be used for model training, making full use of the second sample with the pseudo label, effectively expanding the sample capacity, and improving the accuracy of the sample prediction model for the classification prediction of the sample data. Optionally, the first sample with a known label can be merged with the second sample with the pseudo label, and the training set and the validation set can be re-split to perform model training to obtain the sample prediction model.

[0096] In an embodiment of the present invention, a training method for a sample prediction model is provided, wherein a first sample with a known label can be used to train a first model, and then the first model can be used to predict a second sample with an unknown label to determine a first prediction probability corresponding to the second sample, and the second sample can be classified according to a preset classification threshold and the first prediction probability to obtain a pseudo label, and then the sample prediction model can be obtained by training the first sample with a known label and the second sample with a pseudo label, wherein the preset classification threshold can be obtained by classifying the first sample using different second prediction probabilities as classification thresholds, and determining a classification threshold at which the classification meets the first classification condition, and the second prediction probability is the prediction probability of the first model for the first sample. Since the first sample is a known label, the classification performance of the first model can be tested by the first sample, so that the classification of the first sample meets the requirements of the first classification condition, thereby ensuring the quality of the pseudo label obtained by the first model classifying the second sample, and further ensuring the model performance of the sample expansion training model based on the second sample with the pseudo label.

[0097] Figure 2 FIG. 1 is a flowchart of another method for training a sample prediction model provided by an embodiment of the present invention. Figure 2 As shown, the method may include:

[0098] Step 201: Obtain a first sample with a known label and a second sample with an unknown label.

[0099] In the embodiment of the present invention, step 201 may correspond to the relevant description of the aforementioned step 101, and will not be described again here to avoid repetition.

[0100] Step 202: Perform model training based on the first sample to obtain a first model.

[0101] In the embodiment of the present invention, step 202 may correspond to the relevant description of the aforementioned step 102, and will not be described again here to avoid repetition.

[0102] Step 203: Use the first model to predict the second sample to obtain a first prediction probability corresponding to the second sample.

[0103] In the embodiment of the present invention, step 203 may correspond to the relevant description of the aforementioned step 103, and will not be described again here to avoid repetition.

[0104] Step 204: classify the second sample by using the first predicted probability as a classification threshold or using a preset probability as the classification threshold, and use the classification threshold for the second sample that meets the second classification condition as the preset classification threshold.

[0105] In an embodiment of the present invention, the first prediction probability corresponding to the second sample can also be directly used as the classification threshold to classify the second sample. Please refer to the relevant description of the aforementioned step 104, which will not be repeated here. Alternatively, the preset probability can be used as the classification threshold, wherein the preset probability can be any probability set by itself, and the second classification condition can be an evaluation condition for the classification accuracy, regression accuracy, etc. of the second sample, or it can be that the sample prediction model is trained after the second sample is classified. At this time, the second classification condition can be an evaluation condition for the performance of the training sample prediction model, and the model performance can be the accuracy and recall rate of the sample prediction model. When the classification threshold for the classification of the second sample meets the second classification condition, the classification threshold can be used as the preset classification threshold.

[0106] Step 205: classify the second sample according to the preset classification threshold and the first prediction probability, and determine a pseudo label corresponding to the second sample.

[0107] In the embodiment of the present invention, step 205 may correspond to the relevant description of the aforementioned step 105, and will not be described again here to avoid repetition.

[0108] Step 206: Determine a first similarity standard deviation between the first sample corresponding to a target label and the second sample corresponding to the target label, where the target label is any label of the same type as the known label and the pseudo label.

[0109] In the embodiment of the present invention, the standard deviation is used to characterize the degree of discreteness of data distribution, and the similarity is used to characterize the degree of similarity of data. On this basis, the similarity standard deviation can characterize the degree of discreteness of the similarity between sample data. At this time, after the second sample is classified using the target classification threshold to determine the pseudo-label corresponding to the second sample, the first similarity standard deviation between the second sample and the first sample in the same label can be determined, wherein the same label refers to the black sample of the second sample and the black sample of the first sample, or the white sample of the second sample and the white sample of the first sample. Depending on the application scenario, such as in the risk control scenario, the main purpose is to identify abnormal black samples. Therefore, the black sample of the second sample and the black sample of the first sample can be processed to meet the application requirements.

[0110] Step 207: Determine a second similarity standard deviation between the first samples corresponding to the target label.

[0111] In an embodiment of the present invention, a second similarity standard deviation between sample data in the first sample in the classification of the target label can also be determined. The calculation of the second similarity standard deviation can correspond to the relevant description of the calculation of the first similarity standard deviation in the aforementioned step 206. To avoid repetition, it will not be repeated here.

[0112] In the embodiment of the present invention, the calculation order of the first similarity label and the second similarity label is not limited, and those skilled in the art can determine the calculation method according to actual requirements, processing conditions, etc.

[0113] Step 208: When the first similarity standard deviation is less than or equal to the second similarity standard deviation, retain the pseudo label.

[0114] In the embodiment of the present invention, the first similarity standard deviation can characterize the degree of dispersion of the similarity between the second sample and the first sample, and the second similarity standard deviation can characterize the degree of dispersion of the similarity between the first samples. On this basis, the first similarity standard deviation and the second similarity standard deviation can be compared to further determine the relationship between the similarity and dispersion of the second sample and the first sample classified with the same label after the pseudo-label is classified. For example, when the first similarity standard deviation is less than or equal to the second similarity standard deviation, it can be determined that the degree of dispersion of the similarity between the second sample classified with the same label and the first sample is less than or equal to the degree of dispersion of the similarity between the first sample and the first sample with the same label. Therefore, the pseudo-label can be retained. On the contrary, if the degree of dispersion of the similarity is large, there may be samples with too small similarity in the second sample classified with the same label, and the pseudo-label classification is inaccurate. At this time, the aforementioned step of determining the pseudo-label can be performed again, or other steps of adjusting the samples and parameters can be performed.

[0115] Step 209: Use the first sample with a known label and the second sample with a pseudo label to perform model training to obtain a sample prediction model.

[0116] In the embodiment of the present invention, step 209 may correspond to the relevant description of the aforementioned step 106, which will not be described again to avoid repetition.

[0117] In an embodiment of the present invention, another method for training a sample prediction model is provided, wherein a first sample with a known label can be used to train a first model, and then the first model can be used to predict a second sample with an unknown label to determine a first prediction probability corresponding to the second sample, and the second sample can be classified according to a preset classification threshold and the first prediction probability to obtain a pseudo label, and then the sample prediction model can be obtained by training the first sample with a known label and the second sample with a pseudo label, wherein the preset classification threshold can be obtained by classifying the second sample using different first prediction probabilities as the classification threshold or using a preset probability as the classification threshold, and determining the classification threshold that meets the second classification condition, and after obtaining the pseudo label, the first sample corresponding to the target label can be determined. The first similarity standard deviation between the first and second samples, and the second similarity standard deviation between the target label and the first sample, and the pseudo label is screened according to whether the first similarity standard deviation is less than or equal to the second similarity standard deviation, the target label is any similar label between the known label and the pseudo label, at this time, the classification result of the second sample by the pseudo label makes the discrete degree of similarity between the first sample and the second sample less than or equal to the discrete degree of similarity between the two samples in the first sample, so that the classification result of the second sample by the pseudo label is similar to the classification result of the first sample by the known label, thereby ensuring the quality of the pseudo label, and then ensuring the model performance of the sample expansion training model based on the second sample with the pseudo label.

[0118] Figure 3 Another sample prediction model training method provided by the embodiment of the present invention is as follows: Figure 3 As shown, the method may include:

[0119] Step 301: Obtain a first sample with a known label and a second sample with an unknown label.

[0120] In the embodiment of the present invention, step 301 may correspond to the relevant description of the aforementioned step 101, and will not be described again here to avoid repetition.

[0121] In the embodiment of the present invention, key information extraction, data cleaning, processing, etc. can be performed on the first sample and the second sample. For example, the input model features can be constructed and screened according to business scenarios and model requirements.

[0122] Step 302: Perform model training based on the first sample to obtain a first model.

[0123] In the embodiment of the present invention, step 302 may correspond to the relevant description of the aforementioned step 102, and will not be described again here to avoid repetition.

[0124] Step 303: Use the first model to predict the second sample to obtain a first prediction probability corresponding to the second sample.

[0125] In the embodiment of the present invention, step 303 may correspond to the relevant description of the aforementioned step 103, and will not be described again here to avoid repetition.

[0126] Step 304: Use the first model to predict the first sample to determine a second prediction probability, and use different second prediction probabilities as classification thresholds to classify the first sample, and use the classification threshold that meets the first classification condition for the classification of the first sample as the preset classification threshold.

[0127] In the embodiment of the present invention, step 304 may correspond to the relevant description of the aforementioned step 104, and will not be described again here to avoid repetition.

[0128] Optionally, step 304 includes:

[0129] Step S11, taking each of the second prediction probabilities as a classification threshold in turn, determining the first sample whose second prediction probability is greater than or equal to the classification threshold as a first prediction class sample, and determining the first sample whose second prediction probability is less than the classification threshold as a second prediction class sample.

[0130] In an embodiment of the present invention, each second prediction probability can be used as a classification threshold in turn, and the first sample can be classified according to the classification threshold and the second prediction probability corresponding to each sample data in the first sample. Optionally, the first sample whose second prediction probability is greater than or equal to the classification threshold can be determined as a first prediction class sample, and the first sample whose second prediction probability is less than the classification threshold can be determined as a second prediction class sample.

[0131] For example, the first sample includes sample 11, sample 12, sample 13, sample 14, and sample 15. The first model predicts the first sample and obtains the second prediction probability a1 of sample 11, the second prediction probability b1 of sample 12, the second prediction probability c1 of sample 13, the second prediction probability d1 of sample 14, and the second prediction probability e1 of sample 15.

[0132] At this time, a1, b1, c1, d1, and e1 are used as classification thresholds in turn to classify the first sample. When a1, b1, c1, d1, and e1 decrease in turn, taking a1 as the classification threshold, sample 11 is a first prediction class sample, and sample 12, sample 13, sample 14, and sample 15 are second prediction class samples; taking b1 as the classification threshold, sample 11 and sample 12 are first prediction class samples, and sample 13, sample 14, and sample 15 are second prediction class samples, and so on.

[0133] Step S12: determining the inter-class variance between the first prediction class samples and the second prediction class samples corresponding to each of the classification thresholds.

[0134] In an embodiment of the present invention, the inter-class variance is a parameter that characterizes the accuracy of sample classification. The larger the inter-class variance, the smaller the probability that the sample is misclassified. Optionally, the inter-class variances of the first predicted class sample and the second predicted class sample obtained after classifying the first sample with different classification thresholds can be determined respectively, so as to determine the classification effect of different classification thresholds on the first sample, wherein whether the first sample is correctly assigned according to the classification threshold can be determined according to the known label of the first sample.

[0135] Optionally, before classifying the first samples using different second predicted probabilities as classification thresholds in step 304, the method further includes:

[0136] Step S13: remove duplicates from the second prediction probability.

[0137] In the embodiment of the present invention, each second prediction probability is used as a classification threshold in turn. Therefore, the second prediction probabilities can be deduplicated in step 304 to avoid repeated operations. Furthermore, the deduplicated second prediction probabilities can be sorted so that step 304 is executed in an orderly manner.

[0138] Optionally, the second sample includes a first known class sample and a second known class sample.

[0139] In an embodiment of the present invention, the first sample may include binary sample data. Since the first sample is sample data with a known label, the first sample may be divided into two categories of sample data: a first known class sample and a second known class sample, wherein the first and second are only used to distinguish the label classification of the sample data.

[0140] Optionally, the step S12 includes:

[0141] Step S121: determine a first proportion of the first predicted class samples in the first known class samples and a first average probability corresponding to the first predicted class samples.

[0142] Step S122: determine a second proportion of the second predicted class samples in the second known class samples and a second average probability corresponding to the second predicted class samples.

[0143] In an embodiment of the present invention, based on the first prediction class samples and the second prediction class samples determined in the first sample after prediction and classification by the first model, as well as the first known class samples and the second known class samples known in the first sample, a first proportion of the first prediction class samples relative to the first known class samples and a second proportion of the second prediction class samples relative to the second known class samples can be determined, and a first average probability of the first prediction class samples corresponding to the first prediction probability and a second average probability of the second prediction class samples corresponding to the first prediction probability can be determined respectively, so as to characterize the relationship between the predicted classification and the actual classification to determine the classification effect of the prediction threshold on the first sample.

[0144] For example, in the first sample, samples 11 and 12 are samples of the first known class, and samples 13, 14, and 15 are samples of the second known class. After the first model is used to predict the first sample, a1 is used as the classification threshold, then sample 11 is a sample of the first predicted class, and samples 12, 13, 14, and 15 are samples of the second predicted class. At this time, it can be determined that:

[0145] The first proportion f0=sample 11 / (sample 11+sample 12);

[0146] The second proportion f1=(sample 12+sample 13+sample 14+sample 15) / (sample 13+sample 14+sample 15);

[0147] The first average probability p0=a1;

[0148] The second average probability p1=(b1+c1+d1+e1) / 4.

[0149] Step S123: determining the inter-class variance between the first prediction class samples and the second prediction class samples according to the first proportion, the second proportion, the first average probability, and the second average probability.

[0150] In an embodiment of the present invention, after determining the first proportion, the second proportion, the first average probability and the second average probability corresponding to different classification thresholds, the inter-class variance using the classification threshold can be determined based on the first proportion, the second proportion, the first average probability and the second average probability, wherein the inter-class variance is a parameter used to characterize the difference between two categories of data. When one category of data is incorrectly assigned to another category of data, the inter-class variance will become smaller.

[0151] Among them, the following formula (1) is used to calculate the total average probability p:

[0152] ··············(1)

[0153] Among them, p is the total average probability, f0 is the first proportion sample, f1 is the second proportion, p0 is the first average probability, and p1 is the second average probability.

[0154] Then, the between-class variance V is calculated using the following formula (2):

[0155] ·············(2)

[0156] Step S13: taking the classification threshold corresponding to the maximum value of the inter-class variance as a preset classification threshold.

[0157] In the embodiment of the present invention, it can be seen from the above content that the smaller the inter-class variance is, the greater the probability of misclassification between different categories in the first sample. Therefore, when the inter-class variance is the largest, the classification threshold can achieve effective classification of the first sample. At this time, the classification threshold corresponding to the maximum value of the inter-class variance can be used as the preset classification threshold and applied to the subsequent classification of the second sample.

[0158] Step 305: classify the second sample according to the preset classification threshold and the first prediction probability, and determine a pseudo label corresponding to the second sample.

[0159] In the embodiment of the present invention, step 305 may correspond to the relevant description of the aforementioned step 105, and will not be described again here to avoid repetition.

[0160] Step 306: Determine a first similarity standard deviation between the first sample corresponding to a target label and the second sample corresponding to the target label, where the target label is any label of the same type as the known label and the pseudo label.

[0161] In the embodiment of the present invention, step 306 may correspond to the relevant description of the aforementioned step 106, and will not be described again here to avoid repetition.

[0162] Optionally, the step 306 includes:

[0163] Step S21: Determine, according to the pseudo-label and the known label, a first similarity between each of the first samples corresponding to the target label and each of the second samples corresponding to the target label.

[0164] In an embodiment of the present invention, a pseudo-label and a known label are used to distinguish a label marking method, including the same type and quantity of labels. The first sample is classified according to the known label, and the second sample is classified according to the pseudo-label. At this time, the first similarity between each second sample corresponding to the same label and each first sample can be determined. Optionally, the first similarity can be calculated in different ways, such as Euclidean distance, standard Euclidean distance, cosine similarity, Mahalanobis distance, etc. The embodiment of the present invention does not specifically limit the method for calculating the first similarity.

[0165] Optionally, the step S21 specifically includes calculating, according to the pseudo label and the known label, a standard Euclidean distance between each of the first samples corresponding to the target label and each of the second samples corresponding to the target label.

[0166] In the embodiment of the present invention, the similarity between the second sample and the first sample can be calculated by calculating the standard Euclidean distance between the second sample and the first sample. For example, the black samples in the second sample are extracted to obtain the pseudo label set S (s1, s2, s3 ... sn), and the black samples in the first sample are extracted to obtain the known label set L (l1, l2, l3 ... lk) which can be calculated by the following formula (3):

[0167] ·················(3)

[0168] Among them, xi is the feature sequence of the second sample si in the pseudo label set, yi is the feature sequence of li in the known label set, si is the standard deviation of the two sequence components, and dij is the standard Euclidean distance.

[0169] Step S22: determine the standard deviation between the first similarities corresponding to the same second samples, and obtain the first similarity standard deviation.

[0170] In an embodiment of the present invention, in the process of calculating the similarity, each second sample of the same type of label can obtain the first similarity with each first sample pair. At this time, the first similarity standard deviation can be obtained through the discrete degree of the first similarity of the same second sample corresponding to each first sample, so that each second sample can obtain the corresponding first similarity standard deviation.

[0171] For example, through formula (3), each second sample si in the pseudo label set S (s1, s2, s3...sn) can obtain a similarity set Di (di1, di2, di3...dik) with the known label set L (l1, l2, l3...lk). At this time, the standard deviation of Di can be calculated using the following formula (4):

[0172] ·················(4)

[0173] Among them, sdi is the first similarity standard deviation, d is the average value of the first similarity, and di is the first similarity.

[0174] Step 307: Determine a second similarity standard deviation between the first samples corresponding to the target label.

[0175] In the embodiment of the present invention, step 307 may correspond to the relevant description of the aforementioned step 207, and will not be described again to avoid repetition.

[0176] Optionally, the step 307 includes:

[0177] Step S31: Determine a second similarity between each of the first samples corresponding to the target label.

[0178] In the embodiment of the present invention, the calculation of the second similarity in step S31 may correspond to the relevant description of the aforementioned step S21, and will not be described again to avoid repetition.

[0179] Optionally, the step S31 specifically includes determining a second similarity standard Euclidean distance between two of the first samples corresponding to the target label.

[0180] Step S32: determine the standard deviation between the second similarities to obtain the second similarity standard deviation.

[0181] In the embodiment of the present invention, the calculation of the second similarity standard deviation in step S32 may correspond to the relevant description of the aforementioned step S22, and will not be described again here to avoid repetition.

[0182] In the embodiment of the present invention, the second similarity standard deviation may also be retained, and in subsequent model training and updating based on the first sample, the retained second similarity standard deviation may be directly obtained to screen the pseudo labels.

[0183] Step 308: When the first similarity standard deviation is less than or equal to the second similarity standard deviation, retain the pseudo label.

[0184] In the embodiment of the present invention, step 308 may correspond to the relevant description of the aforementioned step 208, and will not be described again here to avoid repetition.

[0185] Step 309: Use the first sample with a known label and the second sample with a pseudo label to perform model training to obtain a sample prediction model.

[0186] In the embodiment of the present invention, step 309 may correspond to the relevant description of the aforementioned step 106, and will not be described again here to avoid repetition.

[0187] A method for training a sample prediction model is provided in an embodiment of the present invention, wherein a first sample with a known label can be used to train a first model, and then the first model can be used to predict a second sample with an unknown label to determine a first prediction probability corresponding to the second sample, and the second sample can be classified according to a preset classification threshold and the first prediction probability to obtain a pseudo label, and then the sample prediction model can be obtained by training the first sample with a known label and the second sample with a pseudo label, wherein the preset classification threshold can be obtained by classifying the first sample using different second prediction probabilities as classification thresholds, and determining a classification threshold at which the classification meets the first classification condition, and the second prediction probability is the prediction probability of the first model for the first sample. Since the first sample is a known label, the classification performance of the first model can be tested through the first sample, so that the classification of the first sample meets the requirements of the first classification condition, thereby ensuring The first model classifies the second sample to obtain the quality of the pseudo-label; after obtaining the pseudo-label, the first similarity standard deviation between the first sample and the second sample corresponding to the target label and the second similarity standard deviation between the target label and the first sample can be determined, and the pseudo-label is screened according to whether the first similarity standard deviation is less than or equal to the second similarity standard deviation. The target label is any similar label between the known label and the pseudo-label. At this time, the classification result of the second sample by the pseudo-label makes the discrete degree of similarity between the first sample and the second sample less than or equal to the discrete degree of similarity between the two samples in the first sample, so that the classification result of the second sample by the pseudo-label is similar to the classification result of the first sample by the known label, which further ensures the quality of the pseudo-label, and then ensures the model performance of the sample expansion training model based on the second sample with the pseudo-label.

[0188] In the embodiment of the present invention, taking the risk control scenario as an example, a schematic diagram of the data processing process of sample prediction model training is provided. Figure 4 As shown, with the authorization of the client or organization, data tables such as the client's application information data 401, third-party data 402, and application result data 403 are obtained.

[0189] After feature processing and integration of the application information data 401 and the third-party data 402, a feature table 404 is obtained, and the application result data 403 is processed to obtain a label classification table 405, wherein the feature table 404 includes the application ID and its corresponding feature data, and the label classification table 405 includes the application ID and its corresponding label classification, and the label classification may include 1, 0, and unknown;

[0190] According to the label classification table 405, the data of different application IDs in the feature table 404 are labeled to obtain a first sample with known labels and a second sample with unknown labels, the first sample is split to obtain data tables such as training set data 406, validation set data 407 and test set data 408, and the training set data 406, validation set data 407 and test set data 408 are used to perform model training to obtain a first model;

[0191] Probability prediction is performed on the first sample and the second sample using the first model to obtain different prediction probabilities, and the inter-class variance 409 of the first sample between different prediction classes after classification with the first sample corresponding to different prediction probabilities as the classification threshold is calculated, and the preset classification threshold is determined according to the maximum value of the inter-class variance;

[0192] Determine the second sample belonging to the pseudo label according to the preset classification threshold and the prediction probability of the first model for the second sample, and determine the similarity 410 between the second sample of the pseudo label and the first sample of the known label, then determine the similarity between each pair of the first samples, compare the standard deviation of each similarity, and determine whether to retain the pseudo label;

[0193] Perform model training according to the feature table 404 and the second sample 411 of the pseudo label to obtain a sample prediction model;

[0194] A third sample with an unknown label is obtained 412 , and the third sample with an unknown label is predicted using a sample prediction model to obtain a prediction probability 413 .

[0195] The third sample 412 is classified according to the predicted probability 413 .

[0196] In the embodiment of the present invention, the accuracy of marking the pseudo-label for the second sample with an unknown label is guaranteed, so that after sample expansion based on the second sample, the model performance of the trained sample prediction model is guaranteed, and a more accurate prediction of the third sample with an unknown label can be achieved.

[0197] Figure 5 A training device 50 for a sample prediction model provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device may include:

[0198] The sample acquisition module 501 is used to acquire a first sample with a known label and a second sample with an unknown label;

[0199] A model training module 502 is used to perform model training based on the first sample to obtain a first model;

[0200] A probability prediction module 503, configured to use the first model to predict the second sample to obtain a first prediction probability corresponding to the second sample;

[0201] A threshold determination module 504 is used to predict the first sample using the first model to determine a second prediction probability, and classify the first sample using different second prediction probabilities as classification thresholds, and use the classification threshold for classifying the first sample that meets the first classification condition as a preset classification threshold;

[0202] A sample labeling module 505, configured to classify the second sample according to the preset classification threshold and the first prediction probability, and determine a pseudo label corresponding to the second sample;

[0203] The model training module 502 is further configured to perform model training using the first sample with a known label and the second sample with a pseudo label to obtain a sample prediction model.

[0204] In an embodiment of the present invention, a training device for a sample prediction model is provided, wherein a first sample with a known label can be used to train a first model, and then the first model can be used to predict a second sample with an unknown label to determine a first prediction probability corresponding to the second sample, and the second sample is classified according to a preset classification threshold and the first prediction probability to obtain a pseudo label, and then the sample prediction model is obtained by training the first sample with a known label and the second sample with a pseudo label, wherein the preset classification threshold can be obtained by classifying the first sample using different second prediction probabilities as classification thresholds, and determining the classification threshold at which the classification meets the first classification condition, and the second prediction probability is the prediction probability of the first model for the first sample. Since the first sample is a known label, the classification performance of the first model can be tested by the first sample, so that the classification of the first sample meets the requirements of the first classification condition, thereby ensuring the quality of the pseudo label obtained by the first model when classifying the second sample, and further ensuring the model performance of the sample expansion training model based on the second sample with the pseudo label.

[0205] Figure 6 is another sample prediction model training device 60 provided by an embodiment of the present invention, such as Figure 6 As shown, the device may include:

[0206] The sample acquisition module 601 is used to acquire a first sample with a known label and a second sample with an unknown label;

[0207] A model training module 602 is used to perform model training based on the first sample to obtain a first model;

[0208] A probability prediction module 603, configured to use the first model to predict the second sample to obtain a first prediction probability corresponding to the second sample;

[0209] A threshold determination module 604 is used to classify the second sample by using different first prediction probabilities as classification thresholds or using preset probabilities as the classification thresholds, and using the classification thresholds for classifying the second sample in accordance with second classification conditions as preset classification thresholds;

[0210] A sample labeling module 605 is used to classify the second sample according to the preset classification threshold and the first prediction probability, and determine a pseudo label corresponding to the second sample;

[0211] A first similarity standard deviation module 606, configured to determine a first similarity standard deviation between the first sample corresponding to a target label and the second sample corresponding to the target label, wherein the target label is any label of the same type between the known label and the pseudo label;

[0212] A second similarity standard deviation module 607, used to determine a second similarity standard deviation between the first samples corresponding to the target tag;

[0213] The pseudo-label screening module 608 is configured to retain the pseudo-label when the first similarity standard deviation is less than or equal to the second similarity standard deviation.

[0214] The model training module 602 is further configured to perform model training using the first sample with a known label and the second sample with a pseudo label to obtain a sample prediction model.

[0215] In an embodiment of the present invention, another training device for a sample prediction model is provided, wherein a first sample with a known label can be used to train a first model, and then the first model can be used to predict a second sample with an unknown label to determine a first prediction probability corresponding to the second sample, and the second sample is classified according to a preset classification threshold and the first prediction probability to obtain a pseudo label, and then the sample prediction model is obtained based on the first sample with a known label and the second sample with a pseudo label. The preset classification threshold can be obtained by classifying the second sample using different first prediction probabilities as the classification threshold or using a preset probability as the classification threshold, and determining the classification threshold that meets the second classification condition. After obtaining the pseudo label, the first sample corresponding to the target label can be determined. The first similarity standard deviation between the first and second samples, and the second similarity standard deviation between the target label and the first sample, and the pseudo label is screened according to whether the first similarity standard deviation is less than or equal to the second similarity standard deviation, the target label is any similar label between the known label and the pseudo label, at this time, the classification result of the second sample by the pseudo label makes the discrete degree of similarity between the first sample and the second sample less than or equal to the discrete degree of similarity between the two samples in the first sample, so that the classification result of the second sample by the pseudo label is similar to the classification result of the first sample by the known label, thereby ensuring the quality of the pseudo label, and then ensuring the model performance of the sample expansion training model based on the second sample with the pseudo label.

[0216] Figure 7 is another sample prediction model training device 70 provided by an embodiment of the present invention, such as Figure 7 As shown, the device may include:

[0217] The sample acquisition module 701 is used to acquire a first sample with a known label and a second sample with an unknown label;

[0218] A model training module 702 is used to perform model training based on the first sample to obtain a first model;

[0219] A probability prediction module 703, configured to use the first model to predict the second sample to obtain a first prediction probability corresponding to the second sample;

[0220] A threshold determination module 704 is used to predict the first sample using the first model to determine a second prediction probability, and classify the first sample using different second prediction probabilities as classification thresholds, and use the classification threshold for classifying the first sample that meets the first classification condition as a preset classification threshold;

[0221] A sample labeling module 705, configured to classify the second sample according to the preset classification threshold and the first prediction probability, and determine a pseudo label corresponding to the second sample;

[0222] A first similarity standard deviation module 706, configured to determine a first similarity standard deviation between the first sample corresponding to a target label and the second sample corresponding to the target label, wherein the target label is any label of the same type between the known label and the pseudo label;

[0223] A second similarity standard deviation module 707, used to determine a second similarity standard deviation between the first samples corresponding to the target tag;

[0224] The pseudo-label screening module 708 is configured to retain the pseudo-label when the first similarity standard deviation is less than or equal to the second similarity standard deviation.

[0225] The model training module 702 is further configured to perform model training using the first sample with a known label and the second sample with a pseudo label to obtain a sample prediction model.

[0226] Optionally, the threshold determination module 704 includes:

[0227] The prediction class sample classification submodule 7041 is used to sequentially use each of the second prediction probabilities as a classification threshold, determine the first sample whose second prediction probability is greater than or equal to the classification threshold as a first prediction class sample, and determine the first sample whose second prediction probability is less than the classification threshold as a second prediction class sample;

[0228] An inter-class variance determination submodule 7042, configured to determine an inter-class variance between samples of the first prediction class and samples of the second prediction class corresponding to each of the classification thresholds;

[0229] The threshold determination submodule 7043 is used to use the classification threshold corresponding to the maximum value of the inter-class variance as a preset classification threshold.

[0230] Optionally, the first sample includes a first known class sample and a second known class sample, and the inter-class variance determination submodule 7042 includes:

[0231] A first average probability unit, used to determine a first proportion of the first predicted class samples in the first known class samples, and a first average probability corresponding to the first predicted class samples;

[0232] A second average probability unit, used to determine a second proportion of the second predicted class samples in the second known class samples, and a second average probability corresponding to the second predicted class samples;

[0233] An inter-class variance determining unit is used to determine the inter-class variance between the first prediction class samples and the second prediction class samples according to the first proportion, the second proportion, the first average probability, and the second average probability.

[0234] Optionally, the first similarity standard deviation module 706 includes:

[0235] A first similarity submodule 7061 is used to determine a first similarity between each of the first samples corresponding to the target label and each of the second samples corresponding to the target label according to the pseudo label and the known label;

[0236] The first similarity standard deviation submodule 7062 is used to determine the standard deviation between the first similarities corresponding to the same second samples to obtain the first similarity standard deviation.

[0237] The first similarity submodule is specifically configured to calculate, based on the pseudo-label and the known label, a standard Euclidean distance between each of the first samples corresponding to the target label and each of the second samples corresponding to the target label.

[0238] Optionally, the second similarity standard deviation module 707 includes:

[0239] A second similarity submodule 7071, used to determine a second similarity between the first samples corresponding to the target label;

[0240] The second similarity standard deviation submodule 7072 is used to determine the standard deviation between the second similarities to obtain the second similarity standard deviation.

[0241] Optionally, the threshold determination module 704 is further configured to remove duplicates from the second prediction probability.

[0242] In an embodiment of the present invention, a training device for a sample prediction model is provided, wherein a first sample with a known label can be used to train a first model, and then the first model can be used to predict a second sample with an unknown label to determine a first prediction probability corresponding to the second sample, and the second sample is classified according to a preset classification threshold and the first prediction probability to obtain a pseudo label, and then the sample prediction model is obtained by training the first sample with a known label and the second sample with a pseudo label, wherein the preset classification threshold can be obtained by classifying the first sample using different second prediction probabilities as classification thresholds, and determining a classification threshold at which the classification meets the first classification condition, and the second prediction probability is the prediction probability of the first model for the first sample. Since the first sample is a known label, the classification performance of the first model can be tested through the first sample, so that the classification of the first sample meets the requirements of the first classification condition, thereby ensuring The first model classifies the second sample to obtain the quality of the pseudo-label; after obtaining the pseudo-label, the first similarity standard deviation between the first sample and the second sample corresponding to the target label and the second similarity standard deviation between the target label and the first sample can be determined, and the pseudo-label is screened according to whether the first similarity standard deviation is less than or equal to the second similarity standard deviation. The target label is any similar label between the known label and the pseudo-label. At this time, the classification result of the second sample by the pseudo-label makes the discrete degree of similarity between the first sample and the second sample less than or equal to the discrete degree of similarity between the two samples in the first sample, so that the classification result of the second sample by the pseudo-label is similar to the classification result of the first sample by the known label, which further ensures the quality of the pseudo-label, and then ensures the model performance of the sample expansion training model based on the second sample with the pseudo-label.

[0243] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0244] Figure 8 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 8 As shown, the electronic device 80 includes: an interface 801, a bus 802, a memory 803 and a processor 804, wherein the interface 801, the memory 803 and the processor 804 are connected via the bus 802, the memory 803 is used to store an executable program, and the processor 804 is configured to run the executable program to implement the following Figures 1 to 4 The steps of any of the above-described sample prediction model training methods.

[0245] The embodiment of the present invention further provides a computer storage medium, wherein the computer readable storage medium stores an executable program, and the executable program is executed by a processor to implement the following Figures 1 to 4The steps of any of the above-described sample prediction model training methods.

[0246] 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.

[0247] 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 can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present 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 (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.

[0248] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention is indicated by the claims.

[0249] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A training method for a sample prediction model, It is characterized in that The method comprises: Obtain a first sample with a known label and a second sample with an unknown label; Performing model training based on the first sample to obtain a first model; Using the first model to predict the second sample, to obtain a first prediction probability corresponding to the second sample; Using a first model to predict the first sample to determine a second prediction probability, and using different second prediction probabilities as classification thresholds to classify the first sample, and using the classification thresholds for classifying the first sample that meet the first classification condition as the preset classification threshold; Classify the second sample according to the preset classification threshold and the first predicted probability, and determine a pseudo label corresponding to the second sample; Using the first sample with a known label and the second sample with a pseudo label to perform model training to obtain a sample prediction model; The method of using different second prediction probabilities as classification thresholds to classify the first samples, and using the classification thresholds for classifying the first samples that meet the first classification condition as preset classification thresholds, includes: Taking each of the second predicted probabilities as a classification threshold in turn, determining the first sample whose second predicted probability is greater than or equal to the classification threshold as a first predicted class sample, and determining the first sample whose second predicted probability is less than the classification threshold as a second predicted class sample; Determine the inter-class variance between the first prediction class samples and the second prediction class samples corresponding to each of the classification thresholds; The classification threshold corresponding to the maximum value of the inter-class variance is used as the preset classification threshold.

2. The method according to claim 1, It is characterized in that The step of using the first model to predict the first sample to determine the second prediction probability, and using the second prediction probability as a classification threshold to classify the first sample, and using the classification threshold that meets the first classification condition for the classification of the first sample as the preset classification threshold is replaced by: Classify the second sample by using different first predicted probabilities as classification thresholds or using preset probabilities as the classification thresholds, and use the classification thresholds for classifying the second sample in accordance with second classification conditions as preset classification thresholds; After classifying the second sample according to the preset classification threshold and the first predicted probability and determining the pseudo label corresponding to the second sample, the method further includes: Determine a first similarity standard deviation between the first sample corresponding to a target label and the second sample corresponding to the target label, wherein the target label is any label of the same type as the known label and the pseudo label; Determining a second similarity standard deviation between the first samples corresponding to the target label; When the first similarity standard deviation is less than or equal to the second similarity standard deviation, the pseudo label is retained.

3. The method according to claim 1, It is characterized in that The first samples include first known class samples and second known class samples, and determining the inter-class variance between the first predicted class samples and the second predicted class samples corresponding to each of the classification thresholds includes: Determine a first proportion of the first predicted class samples in the first known class samples and a first average probability corresponding to the first predicted class samples; Determine a second proportion of the second predicted class samples in the second known class samples and a second average probability corresponding to the second predicted class samples; An inter-class variance between samples of the first prediction class and samples of the second prediction class is determined according to the first proportion, the second proportion, the first average probability, and the second average probability.

4. The method according to claim 2, It is characterized in that The determining a first similarity standard deviation between the first sample corresponding to the target label and the second sample corresponding to the target label includes: Determine, according to the pseudo label and the known label, a first similarity between each of the first samples corresponding to the target label and each of the second samples corresponding to the target label; Determine the standard deviation between the first similarities corresponding to the same second samples to obtain the first similarity standard deviation.

5. The method according to claim 4, It is characterized in that The determining, according to the pseudo label and the known label, a first similarity between each of the first samples corresponding to the target label and each of the second samples corresponding to the target label comprises: The standard Euclidean distance between each of the first samples corresponding to the target label and each of the second samples corresponding to the target label is calculated according to the pseudo label and the known label.

6. The method according to claim 2, It is characterized in that The determining a second similarity standard deviation between the first samples corresponding to the target label includes: Determine a second similarity between two of the first samples corresponding to the target label; Determine a standard deviation between the second similarities to obtain the second similarity standard deviation.

7. A training device for a sample prediction model, It is characterized in that The device comprises: A sample acquisition module, used to acquire a first sample with a known label and a second sample with an unknown label; A model training module, used to perform model training based on the first sample to obtain a first model; A probability prediction module, configured to predict the second sample using the first model to obtain a first prediction probability corresponding to the second sample; a threshold determination module, configured to predict the first sample using the first model to determine a second prediction probability, and classify the first sample using different second prediction probabilities as classification thresholds, and use the classification threshold for classifying the first sample in accordance with a first classification condition as a preset classification threshold; a sample labeling module, configured to classify the second sample according to the preset classification threshold and the first prediction probability, and determine a pseudo label corresponding to the second sample; The model training module is further used to perform model training using the first sample with a known label and the second sample with a pseudo label to obtain a sample prediction model; The threshold determination module comprises: A prediction class sample classification submodule, used to sequentially use each of the second prediction probabilities as a classification threshold, determine a first sample whose second prediction probability is greater than or equal to the classification threshold as a first prediction class sample, and determine a first sample whose second prediction probability is less than the classification threshold as a second prediction class sample; An inter-class variance determination submodule, used to determine the inter-class variance between the first prediction class samples and the second prediction class samples corresponding to each of the classification thresholds; The threshold determination submodule is used to use the classification threshold corresponding to the maximum value of the inter-class variance as a preset classification threshold.

8. An electronic device, the electronic device include: An interface, a bus, a memory and a processor, wherein the interface, the memory and the processor are connected via the bus, the memory is used to store an executable program, and the processor is configured to run the executable program to implement the steps of the training method of the sample prediction model as described in any one of claims 1 to 7.

9. A computer storage medium storing an executable program, wherein the executable program is executed by a processor to implement the steps of the sample prediction model training method as described in any one of claims 1 to 7.