Abnormal sample detection method and device, electronic equipment, storage medium and product
Through the method of multi-round training and error rate filtering on the preset sample set, the problem of low accuracy of existing data cleaning is solved, and more accurate abnormal sample detection and data cleaning is achieved, which significantly improves data quality and model performance.
Patent Information
- Application Number
- CN202411752517.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-14
AI Technical Summary
Existing data cleaning methods have low accuracy in improving data quality and model performance, especially the inability to accurately locate all data that needs to be cleaned, resulting in inaccurate cleaning range.
The preset classification model is trained multiple rounds through the preset sample set, the error rate of each sample data and the original accuracy of the model are calculated, the sample data with an error rate higher than the preset threshold is filtered, a new sample set is formed, and the model is continued to be trained until the optimization accuracy is greater than or equal to the original accuracy, and these samples are determined to be samples to be cleaned.
The accuracy of data cleaning is significantly improved. Through circular filtration and model optimization, the abnormal samples to be cleaned are accurately positioned, the cleaning range is narrowed, and data quality and model performance are improved.
Smart Images

Figure CN119622535A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of model training technology, and in particular to an abnormal sample detection method, device, electronic device, storage medium and computer program product. Background Art
[0002] In supervised learning, classification task is the key link. The model is mainly trained through existing labeled data so that it can correctly classify new data into the correct category. Therefore, the upper limit of the classification task is limited by the quality of the labeled data. The existing way to improve data quality is mainly to compare the labeled data with the prediction results to clean the incorrectly labeled data. Although it reduces the amount of data that needs to be cleaned to a certain extent, it cannot accurately locate all the data that needs to be cleaned. There is still the problem of uneven distribution of incorrectly labeled data, which leads to inaccurate cleaning range and cannot significantly improve the data quality and the overall performance of the model. Therefore, there is a problem of low data cleaning accuracy in the current data cleaning method. Summary of the invention
[0003] The main purpose of this application is to provide an abnormal sample detection method, device, electronic device, storage medium and computer program product, aiming to solve the technical problem of how to improve the accuracy of data cleaning.
[0004] To achieve the above objectives, the present application proposes an abnormal sample detection method, which includes:
[0005] Performing multiple rounds of training on a preset classification model through a preset sample set to obtain an error rate of incorrect classification of each sample data in the preset sample set and an original accuracy rate of the preset classification model, wherein the original accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training based on the preset sample set;
[0006] Recording sample data with an error rate greater than a preset error rate threshold as abnormal samples, and obtaining a new preset sample set after filtering the abnormal samples from the preset sample set, performing multiple rounds of training on the preset classification model based on the new preset sample set, and obtaining an optimized accuracy rate of the preset classification model, wherein the optimized accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training based on the new preset sample set;
[0007] When the optimized accuracy is greater than or equal to the original accuracy, determining each abnormal sample as a sample to be cleaned;
[0008] In the case where the optimized accuracy rate is lower than the original accuracy rate, the preset error rate threshold is increased according to the preset change value to obtain a new preset error rate threshold, based on the new preset error rate threshold, the sample data with error rates greater than the preset error rate threshold are returned as abnormal samples, and each abnormal sample is filtered from the preset sample set to obtain a new preset sample set, and the preset classification model is trained for multiple rounds based on the new preset sample set to obtain the optimized accuracy rate of the preset classification model.
[0009] In one embodiment, the step of performing multiple rounds of training on a preset classification model using a preset sample set includes:
[0010] Dividing each sample data in the preset sample set into each sample subset of a preset allocated number;
[0011] For any one of the sample subsets, when the sample subset is used as a test set, the remaining sample subsets in the sample subsets are used as training sets, and the preset classification model is cross-trained based on the training set and the test set. After the training is completed, a new training set and a new test set are determined;
[0012] Based on the new training set and the new test set, returning to execute the step of cross-training the preset classification model based on the training set and the test set;
[0013] Record the number of cross-training training sessions, the number of incorrectly classified samples of each sample data, the number of correctly classified samples in each round of cross-training, and the total number of samples;
[0014] When the training times reaches the preset training times, the cross-training is stopped.
[0015] In one embodiment, the step of obtaining the error rate of misclassification of each sample data in the preset sample set and the original accuracy rate of the preset classification model includes:
[0016] Obtaining the number of times each sample data is misclassified and the number of training times, as well as the number of correctly classified samples and the total number of samples in each round of cross-training;
[0017] For any one of the sample data, the ratio of the number of classified errors corresponding to the sample data to the number of training times is recorded as the error rate of the sample data;
[0018] For any round of cross-training in the preset classification model, the ratio of the number of correctly classified samples in the cross-training to the total number of samples is recorded as the classification accuracy of the corresponding round of cross-training, and the average of the classification accuracy of each round of cross-training is taken as the original accuracy of the preset classification model.
[0019] In one embodiment, after the step of determining each abnormal sample as a sample to be cleaned, the step further includes:
[0020] For any sample data in the new preset sample set obtained after filtering the abnormal samples, calculate the optimization accuracy of the preset classification model after multiple rounds of training based on the remaining sample data in the new preset sample set when the sample data is filtered;
[0021] When the calculated optimized accuracy rates are all lower than the original accuracy rates, it is determined that the new preset sample set has no abnormality.
[0022] In one embodiment, after the step of increasing the preset error rate threshold according to the preset change value to obtain a new preset error rate threshold, the step further includes:
[0023] Recording the number of times the preset error rate threshold is increased;
[0024] When the number of increases is greater than a preset increase number threshold, increasing the preset change value by a preset increment, and using the increased preset change value to increase the preset error rate threshold;
[0025] When the preset change value reaches a preset change upper limit, the preset change value is stopped from being increased.
[0026] In one embodiment, the abnormal sample detection method further includes:
[0027] When the optimized accuracy rate is greater than or equal to the original accuracy rate, recording and determining the preset error rate threshold of each abnormal sample to obtain a basic error rate threshold;
[0028] The average value of each basic error rate threshold obtained by the record is calculated to generate an error rate prediction value, wherein the error rate prediction value is used as the initial preset error rate threshold for each sample data in other sample sets, and the other sample sets are used to train the preset classification model.
[0029] In addition, to achieve the above objectives, the present application also proposes an abnormal sample detection device, the abnormal sample detection device comprising:
[0030] A training module is used to perform multiple rounds of training on a preset classification model through a preset sample set to obtain an error rate of incorrect classification of each sample data in the preset sample set and an original accuracy rate of the preset classification model, wherein the original accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training;
[0031] A filtering module, used to record the sample data with an error rate greater than a preset error rate threshold as abnormal samples, and obtain a new preset sample set after filtering the abnormal samples from the preset sample set, and perform multiple rounds of training on the preset classification model based on the new preset sample set to obtain the optimized accuracy of the preset classification model;
[0032] A cleaning module, configured to determine that each abnormal sample is a sample to be cleaned when the optimized accuracy is greater than or equal to the original accuracy;
[0033] A loop module is used to increase the preset error rate threshold according to the preset change value to obtain a new preset error rate threshold when the optimized accuracy rate is less than the original accuracy rate, return the sample data with error rates greater than the preset error rate threshold as abnormal samples based on the new preset error rate threshold, filter the abnormal samples from the preset sample set to obtain a new preset sample set, and perform multiple rounds of training on the preset classification model based on the new preset sample set to obtain the optimized accuracy rate of the preset classification model.
[0034] In addition, to achieve the above objectives, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the abnormal sample detection method described above.
[0035] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium, and stores a computer program on the storage medium. When the computer program is executed by a processor, the steps of the abnormal sample detection method described above are implemented.
[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the abnormal sample detection method described above are implemented.
[0037] The present application provides an abnormal sample detection method, which includes: performing multiple rounds of training on a preset classification model through a preset sample set to obtain the error rate of each sample data in the preset sample set being classified incorrectly, and the original accuracy rate of the preset classification model, wherein the original accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training based on the preset sample set; recording sample data with an error rate greater than a preset error rate threshold as each abnormal sample, and filtering each abnormal sample from the preset sample set to obtain a new preset sample set, and performing multiple rounds of training on the preset classification model based on the new preset sample set to obtain the optimized accuracy rate of the preset classification model, wherein the optimized accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training based on the preset sample set. The accuracy is the classification accuracy of the preset classification model after multiple rounds of training based on the new preset sample set; when the optimized accuracy is greater than or equal to the original accuracy, each abnormal sample is determined to be a sample to be cleaned; when the optimized accuracy is less than the original accuracy, the preset error rate threshold is increased according to the preset change value to obtain a new preset error rate threshold, based on the new preset error rate threshold, sample data with an error rate greater than the preset error rate threshold is returned as each abnormal sample, and each abnormal sample is filtered from the preset sample set to obtain a new preset sample set, and multiple rounds of training are performed on the preset classification model based on the new preset sample set to obtain the optimized accuracy of the preset classification model.
[0038] The present application calculates the error rate of each sample data and the original accuracy of the preset classification model by training a preset classification model, thereby providing a benchmark for subsequent abnormal sample detection. According to a preset error rate threshold, sample data with an error rate higher than the threshold is identified as an abnormal sample and filtered. After filtering out each abnormal sample, the remaining sample data is cross-trained in a loop to calculate the model optimization accuracy, and the change in model performance after filtering each abnormal sample is observed. If the optimization accuracy is greater than or equal to the original accuracy, it means that the model performance has been improved, and each abnormal sample is determined to be a sample to be cleaned. If the optimization accuracy is less than the original accuracy, it means that there are valid samples in each filtered abnormal sample, and it is necessary to increase the preset error rate threshold, and re-identify and filter the abnormal samples until the optimization accuracy is greater than or equal to the original accuracy. Compared with related solutions, there is an uneven distribution of labeled error data, resulting in an inaccurate cleaning range. The present application cyclically filters abnormal samples and re-evaluates the model optimization effect, continuously narrows the range of abnormal samples to be cleaned, and can more accurately locate and determine the abnormal samples to be cleaned, thereby significantly improving the accuracy of data cleaning. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 A flowchart of the first embodiment of the abnormal sample detection method of the present application is provided;
[0042] Figure 2 A flowchart of the second embodiment of the abnormal sample detection method of the present application is provided;
[0043] Figure 3 This is the overall flow chart of the abnormal sample detection method of this application;
[0044] Figure 4 This is a schematic diagram of the module structure of the abnormal sample detection device according to an embodiment of the present application;
[0045] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the abnormal sample detection method in the embodiment of the present application.
[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0049] The main solution of the embodiment of the present application is: to perform multiple rounds of training on the preset classification model through the preset sample set, to obtain the error rate of each sample data in the preset sample set being misclassified, and the original accuracy rate of the preset classification model, wherein the original accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training based on the preset sample set; to record the sample data with an error rate greater than the preset error rate threshold as each abnormal sample, and to obtain a new preset sample set after filtering each abnormal sample from the preset sample set, to perform multiple rounds of training on the preset classification model based on the new preset sample set, to obtain the optimized accuracy rate of the preset classification model, wherein the optimized accuracy rate is the value of the optimization rate based on the new preset sample set. The classification accuracy of the preset classification model after multiple rounds of training on the preset sample set; when the optimized accuracy is greater than or equal to the original accuracy, each abnormal sample is determined to be a sample to be cleaned; when the optimized accuracy is less than the original accuracy, the preset error rate threshold is increased according to the preset change value to obtain a new preset error rate threshold, based on the new preset error rate threshold, sample data with an error rate greater than the preset error rate threshold is recorded as each abnormal sample, and each abnormal sample is filtered from the preset sample set to obtain a new preset sample set, and the preset classification model is trained for multiple rounds based on the new preset sample set to obtain the optimized accuracy of the preset classification model.
[0050] In this embodiment, for ease of description, the abnormal sample detection system is used as the execution subject for explanation below.
[0051] Since the performance of classification tasks in supervised learning is limited by the quality of labeled data, the current method to improve data quality is mainly to compare labeled data with prediction results to clean up incorrectly labeled data. However, although this method can reduce some of the data to be cleaned, it is difficult to accurately locate all samples that need to be cleaned, and there is a problem of uneven distribution of incorrectly labeled data, which leads to inaccurate cleaning range and cannot significantly improve data quality and overall model performance.
[0052] The present application provides a solution, which obtains the error rate by training the model, filters out abnormal samples with error rates higher than a preset error rate threshold, and then performs cyclic cross-training to evaluate the model optimization effect. If the optimized accuracy is not lower than the original accuracy, the abnormal samples are marked; otherwise, the preset error rate threshold is increased and re-filtered to evaluate the model optimization effect.
[0053] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an abnormal sample detection system, etc. The abnormal sample detection system is taken as an example to illustrate this embodiment and the following embodiments.
[0054] Based on this, the present application embodiment provides a method for detecting abnormal samples. Figure 1 , Figure 1 This is a flow chart of the first embodiment of the abnormal sample detection method of the present application.
[0055] In this embodiment, the abnormal sample detection method includes steps S01 to S04:
[0056] Step S01, performing multiple rounds of training on a preset classification model using a preset sample set, obtaining an error rate of incorrect classification of each sample data in the preset sample set, and an original accuracy rate of the preset classification model, wherein the original accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training based on the preset sample set;
[0057] It should be noted that the preset classification model is trained using a preset sample set, which contains various sample data. Sample data refers to labeled data used to train and test the model. The preset classification model refers to a model used to perform classification tasks, including deep learning models, logistic regression models, etc. The types of training include but are not limited to cross-training and single training. Cross-training is usually used to divide the data set into multiple subsets, and each subset is used as a training set or a test set in turn to evaluate the model, thereby reducing the risk of overfitting. After multiple rounds of cross-training are completed, the preset classification model will predict each sample data and calculate the difference between the predicted result and the true label, that is, the error rate. At the same time, the original accuracy of the preset classification model on the entire preset sample set is counted. The original accuracy refers to the accuracy of the preset classification model in classifying sample data after multiple rounds of training based on the preset sample set before the abnormal samples are cleaned.
[0058] It is understandable that by calculating the error rate of each sample data after multiple rounds of training of the preset classification model and the original accuracy of the preset classification model, we can have a more detailed understanding of the sample data quality, provide a benchmark model performance evaluation for subsequent data cleaning, and ensure that improvements in subsequent steps have a basis.
[0059] Step S02, recording sample data with an error rate greater than a preset error rate threshold as abnormal samples, and filtering the abnormal samples from the preset sample set to obtain a new preset sample set, performing multiple rounds of training on the preset classification model based on the new preset sample set, and obtaining an optimized accuracy rate of the preset classification model, wherein the optimized accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training based on the new preset sample set;
[0060] It should be noted that according to the preset error rate threshold (for example, 0.5), sample data with an error rate higher than the error rate threshold is screened out, marked as abnormal samples, and removed from the original preset sample set to obtain a new preset sample set. The preset classification model is re-trained for multiple rounds using the new preset sample set, and the classification accuracy of the preset classification model obtained by training the new preset sample set is calculated, that is, the optimization accuracy.
[0061] In addition, it should be noted that the determination of abnormal samples assisted by isolation forests is carried out. After each sample data in the preset sample set is divided into a training set and a test set, the isolation forest model is trained using the training set. Any isolated tree in the isolation forest divides the data space by randomly selecting features and feature values until each sample data is isolated. The path length of each sample data in each isolated tree is calculated to represent the outlier score of the sample data. Sample data with an outlier score higher than the preset anomaly threshold is judged as an abnormal sample. The abnormal samples obtained by comparing with the preset error rate threshold are taken as a union with the abnormal samples determined by the isolation forest and recorded as the abnormal samples to be filtered in the end.
[0062] It is understandable that by setting a clear error rate threshold, it is possible to more accurately locate abnormal samples that have a significant negative impact on model performance and remove them from the preset sample set, avoiding the problem of blind cleaning. At the same time, by filtering abnormal samples, it is possible to verify the impact of these abnormal samples on model performance, thereby providing a basis for subsequent data cleaning.
[0063] Step S03, when the optimized accuracy is greater than or equal to the original accuracy, each abnormal sample is determined to be a sample to be cleaned;
[0064] It should be noted that in step S02, if the optimized accuracy is greater than or equal to the original accuracy, it means that the performance of the model has not decreased after filtering abnormal samples, and has even improved. These samples previously marked as abnormal samples are determined as samples to be cleaned for subsequent manual cleaning.
[0065] It is understandable that by comparing the accuracy before and after filtering abnormal samples, the data cleaning effect can be intuitively evaluated. If the optimized accuracy of the model is not lower than the original accuracy after filtering abnormal samples, it means that the filtering process of abnormal samples is effective, and these abnormal samples do have a negative impact on the model performance and need to be marked for subsequent manual cleaning.
[0066] Step S04, when the optimized accuracy rate is less than the original accuracy rate, the preset error rate threshold is increased according to the preset change value to obtain a new preset error rate threshold, based on the new preset error rate threshold, sample data with error rates greater than the preset error rate threshold are returned as abnormal samples, and each abnormal sample is filtered from the preset sample set to obtain a new preset sample set, and the preset classification model is trained for multiple rounds based on the new preset sample set to obtain the optimized accuracy rate of the preset classification model.
[0067] It should be noted that in step S02, if the optimized accuracy is less than the original accuracy, it means that the current error rate threshold may be too strict, resulting in some useful data being misjudged as abnormal samples and filtered out. At this time, the error rate threshold is increased according to the preset change value. The preset change value refers to a fixed value (such as 0.05) used to dynamically adjust the error rate threshold. After obtaining the new preset error rate threshold, step S02 is re-executed based on the new preset error rate threshold.
[0068] It is understandable that by iteratively adjusting the error rate threshold and re-executing the data filtering and model training process, it is possible to gradually approach the optimal data cleaning strategy, determine the range of abnormal samples that need to be cleaned, and improve the accuracy and efficiency of data cleaning.
[0069] In a feasible implementation, in step S01, the step of performing multiple rounds of training on a preset classification model using a preset sample set includes steps A01 to A05:
[0070] Step A01, dividing each sample data in a preset sample set into each sample subset with a preset allocated number;
[0071] It should be noted that before data segmentation, each sample data in the original preset sample set needs to be preprocessed, such as data cleaning, missing value filling, etc., and each sample data is divided into a preset allocation quantity in proportion, such as 5 or 10 portions. The specific preset allocation quantity can be adjusted according to actual conditions. For example, if the data set is large and the model training has high data volume requirements, a higher training set ratio can be selected. After randomly dividing each sample data in proportion, each sample subset is obtained, which contains each sample data.
[0072] Step A02: for any one of the sample subsets, when the sample subset is used as a test set, the remaining sample subsets in the sample subsets are used as training sets, and multiple rounds of cross-training are performed on the preset classification model based on the training set and the test set;
[0073] It should be noted that after dividing each sample data into a preset number of sample subsets, one of the sample subsets is selected as the test set in each cross-training, and the remaining sample subsets are selected as training sets. The test set refers to the sample subset used to evaluate the performance of the model, and the training set refers to the sample subset used to train the model. In each cross-training, the training set is used to train the model, and the test set is used to evaluate the performance of the model. Cross-training refers to the process of training and testing the preset classification model in turn on different data subsets. For example, the data is cut into 5 parts, one part is taken as the test set each time, and 4 parts are taken as the training set, and cross-training is performed 5 times. This training method can generate prediction values for all data.
[0074] Step A03, based on the new training set and the new test set, returning to execute the step of cross-training the preset classification model based on the training set and the test set;
[0075] It should be noted that the preset classification model is trained using the new training set, and the performance of the model is evaluated using the new test set.
[0076] Step A04, recording the number of cross-training trainings, the number of incorrectly classified samples of each sample data, the number of correctly classified samples in each round of cross-training, and the total number of samples;
[0077] It should be noted that key information in the cross-training process is recorded for subsequent analysis and location of abnormal samples, including the number of cross-training training sessions, the number of incorrect classifications of each sample data, the number of correctly classified samples in each round of cross-training, and the total number of samples. The number of cross-training training sessions is used to record the number of times the model is trained during the entire cross-training process. The number of incorrect classifications of each sample data is used to record the number of times each sample data is incorrectly classified in multiple classification tasks. The number of correctly classified samples in each round of cross-training records the number of sample data correctly classified by the preset classification model in each round of training. The total number of samples refers to the total number of sample data in the entire preset sample set.
[0078] Step A05, when the number of training times reaches the preset number of training times, stop the cross-training.
[0079] It should be noted that the preset number of training times refers to the set threshold of the number of rounds at which model training stops (for example, 100 times). When the number of cross-training training times reaches this threshold, the training process is stopped to prevent overfitting and unnecessary computational overhead.
[0080] In this embodiment, through reasonable data segmentation, it is ensured that the preset classification model can be trained and tested on different sample sets to avoid overfitting and underfitting. Through cross-training, the generalization ability evaluation problem of the model on different sample sets is prevented, and it is ensured that the preset classification model can perform well on unseen data. By recording key information in the cross-training process, a basis is provided for subsequent data analysis and abnormal sample location. By setting a preset number of training times, the training process of the model is controlled to ensure that the model stops training after a sufficient number of training times to avoid overfitting and unnecessary computational overhead.
[0081] In a feasible implementation manner, in step S01, the step of obtaining the error rate of misclassification of each sample data in the preset sample set and the original accuracy rate of the preset classification model includes steps A11 to A13:
[0082] Step A11, obtaining the number of times each sample data is misclassified and the number of training times, as well as the number of correctly classified samples and the total number of samples in each round of cross-training;
[0083] It should be noted that the data recorded in step A03 include the number of times each sample data is misclassified and the number of training times, as well as the number of correctly classified samples and the total number of samples in each round of cross-training.
[0084] Step A12, for any sample data among the sample data, the ratio of the number of times the sample data is classified incorrectly to the number of times it is trained is recorded as the error rate of the sample data;
[0085] It should be noted that for each sample data in each sample data, its error rate is calculated. The error rate is defined as the ratio of the number of classified errors corresponding to the sample data to the number of training times, which is used to identify which samples perform poorly in the classification task of the model.
[0086] Step A13, for any round of cross-training in the preset classification model, the ratio of the number of correctly classified samples in the cross-training to the total number of samples is recorded as the classification accuracy of the corresponding round of cross-training, and the average of the classification accuracy of each round of cross-training is taken as the original accuracy of the preset classification model.
[0087] It should be noted that for each round of training of the preset classification model, its classification accuracy is calculated. The classification accuracy is defined as the ratio of the number of correctly classified samples in the corresponding round of cross-training to the total number of samples. The classification accuracy of all training rounds is summed up and the average is calculated to obtain the original accuracy of the preset classification model.
[0088] In this embodiment, by calculating the error rate, it is accurately identified which sample data performs poorly in the cross-training of the preset classification model, that is, sample data with a higher error rate, and is used for subsequent determination of whether it is an abnormal sample. By calculating the original accuracy of the preset classification model, the performance of the preset classification model is quantitatively evaluated. If the accuracy of the preset classification model is high, it means that the preset classification model has good adaptability to each sample data and can accurately predict the labels of most samples. Conversely, if the accuracy of the preset classification model is low, it means that the preset classification model has poor adaptability to each sample data and may have problems of overfitting or underfitting. This information is of great significance for subsequent optimization of model structure and parameters and improving the accuracy of data cleaning.
[0089] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 In step S03, after determining each abnormal sample as a sample to be cleaned, steps S11 to S12 are also included:
[0090] Step S11, for any sample data in the new preset sample set obtained after filtering each abnormal sample, calculate the optimization accuracy of the preset classification model after multiple rounds of training based on the remaining sample data in the new preset sample set in the case of filtering the sample data;
[0091] It should be noted that after filtering out the abnormal samples, for each remaining sample data in the new preset sample set, the optimized accuracy of multiple rounds of training of the preset classification model after removing this sample data is calculated. It reflects the improvement of the overall quality of the preset classification model after removing the sample data. The specific calculation process is similar to the method of calculating the original accuracy in step A13, that is, the ratio of the number of correctly predicted samples to the total number of samples.
[0092] Step S12: when the calculated optimization accuracy rates are all lower than the original accuracy rates, it is determined that the new preset sample set has no abnormality.
[0093] It should be noted that, based on step S11, all calculated optimized accuracy rates are checked. If all optimized accuracy rates are greater than or equal to the original accuracy rates, it is considered that after filtering out the abnormal samples, the sample data are normal, that is, there are no abnormal samples. That is, if removing any sample cannot further improve the accuracy rate, it means that the current data set is pure enough and no further cleaning is required.
[0094] In this embodiment, by calculating the optimized accuracy rate, we can intuitively understand the "purification" effect of the data set after removing any sample data, and provide data support for subsequent decisions (such as whether to continue cleaning). By comparing each optimized accuracy rate with the original accuracy rate, the system can automatically determine whether there are still abnormal samples in the current sample data, thereby determining whether further data cleaning is needed.
[0095] In a feasible implementation manner, in step S04, after the step of increasing the preset error rate threshold according to the preset change value to obtain a new preset error rate threshold, steps B01 to B03 are also included:
[0096] Step B01, recording the number of times the preset error rate threshold is increased;
[0097] It should be noted that when the preset error rate threshold is increased, this operation is recorded and a counter is maintained internally to track the number of increases. The number of increases refers to the total number of times the preset error rate threshold has been increased since the system started adjusting the preset error rate threshold.
[0098] Step B02, when the number of increases is greater than a preset increase number threshold, increasing the preset change value by a preset increment, and using the increased preset change value to increase the preset error rate threshold;
[0099] It should be noted that the preset increase times threshold is used to determine whether the preset change value needs to be adjusted. When the increase times exceeds the preset increase times threshold, the preset change value is increased according to the preset increment (for example, 0.01). The preset increment is a fixed value used to increase the preset change value. By adjusting this value, the speed at which the preset error rate threshold increases can be controlled.
[0100] Step B03, when the preset change value reaches the preset change upper limit, stop increasing the preset change value.
[0101] It should be noted that the preset change upper limit is used to limit the maximum growth rate of the preset change value. When the preset change value reaches or exceeds the preset change upper limit, the preset change value is stopped from being further increased to prevent the problem of inadequate data cleaning caused by the preset error rate threshold being too high.
[0102] In this embodiment, by recording the number of increases, the adjustment strategy of the preset error rate threshold is controlled more accurately, avoiding too frequent or too sparse adjustments, thereby improving the stability and accuracy of data cleaning. By dynamically adjusting the preset error rate threshold, the system can better adapt to abnormal distribution changes in the data set, thereby improving the accuracy and efficiency of data cleaning. By setting a preset change upper limit, the system can ensure the stability and controllability of the data cleaning process, and avoid the problem of insufficient data cleaning due to the preset error rate threshold changing too quickly due to the preset change value being too high.
[0103] In a feasible implementation, the abnormal sample detection method further includes steps B11 to B12:
[0104] Step B11, when the optimized accuracy is greater than or equal to the original accuracy, record and determine the preset error rate threshold of each abnormal sample to obtain a basic error rate threshold;
[0105] It should be noted that each time the optimized accuracy is determined to be greater than or equal to the original accuracy, the preset error rate threshold for determining each abnormal sample is determined. Since the preset error rate threshold may be changed and compared multiple times when determining the final abnormal sample, the preset error rate threshold for the final judgment is determined here and recorded as the basic error rate threshold for subsequent predictions.
[0106] Step B12, calculate the average value of each basic error rate threshold recorded, and generate an error rate prediction value, wherein the error rate prediction value is used as the initial preset error rate threshold for each sample data in other sample sets, and other sample sets are used to train the preset classification model.
[0107] It should be noted that the average value of all basic error rate thresholds collected in step B11 is calculated, and this average value is used to predict the initial preset error rate threshold of each sample data in the preset sample set. The "initial" here refers to the state before the start of a new round of training or data cleaning task.
[0108] In this embodiment, by collecting the final preset error rate threshold each time an abnormal sample is determined, and calculating the average of all collected preset error rate thresholds, the preset error rate threshold can be dynamically adjusted according to the actual situation of sample training and the predictive ability of the model to determine an error rate that is more suitable for abnormal samples, thereby more accurately identifying abnormal samples, reducing the possibility of false alarms and omissions, and improving the accuracy and reliability of the overall data.
[0109] For example, to help understand the technical concept or technical principle of this application, please refer to Figure 3 , Figure 3The overall flow chart of the abnormal sample detection method is provided. After the sample data is segmented, cyclic cross-training is performed, and the prediction results are recorded, including the number of cross-training training, the number of wrong predictions of each sample data, the number of correct predictions of samples in each round of cross-training, and the total number of samples. When the number of sample training reaches the preset number of training, the training is stopped, and the error rate of each sample data and the original accuracy of the preset classification model are calculated. After filtering the abnormal samples with an error rate greater than a preset error rate threshold, the remaining sample data are trained to determine whether the optimized accuracy of the training model is greater than or equal to the original accuracy after filtering the abnormal sample data. If the optimized accuracy is greater than or equal to the original accuracy, it indicates that the abnormal sample is the sample to be cleaned. If the optimized accuracy is less than the original accuracy, the preset error rate threshold is reduced, and the step of filtering the abnormal samples with an error rate greater than the preset error rate threshold is returned to continue evaluating the model performance after filtering the abnormal samples.
[0110] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the abnormal sample detection method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0111] This application also provides an abnormal sample detection device, please refer to Figure 4 , the abnormal sample detection device comprises:
[0112] The training module 10 is used to perform multiple rounds of training on the preset classification model through the preset sample set to obtain the error rate of each sample data in the preset sample set being misclassified, and the original accuracy rate of the preset classification model, wherein the original accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training based on the preset sample set;
[0113] A filtering module 20 is used to record sample data with an error rate greater than a preset error rate threshold as abnormal samples, and obtain a new preset sample set after filtering the abnormal samples from the preset sample set, and perform multiple rounds of training on the preset classification model based on the new preset sample set to obtain an optimized accuracy rate of the preset classification model, wherein the optimized accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training based on the new preset sample set;
[0114] A cleaning module 30, configured to determine each abnormal sample as a sample to be cleaned when the optimized accuracy is greater than or equal to the original accuracy;
[0115] The loop module 40 is used to increase the preset error rate threshold according to the preset change value to obtain a new preset error rate threshold when the optimized accuracy rate is lower than the original accuracy rate, return the sample data with an error rate greater than the preset error rate threshold as abnormal samples based on the new preset error rate threshold, filter the abnormal samples from the preset sample set to obtain a new preset sample set, perform multiple rounds of training on the preset classification model based on the new preset sample set, and obtain the optimized accuracy rate of the preset classification model.
[0116] Optionally, the training module 10 is further used for:
[0117] Divide each sample data in the preset sample set into each sample subset of a preset allocated number;
[0118] For any sample subset in each sample subset, when the sample subset is used as a test set, the remaining sample subsets in each sample subset are used as training sets, and a preset classification model is cross-trained based on the training set and the test set. After the training is completed, a new training set and a new test set are determined;
[0119] Based on the new training set and the new test set, returning to execute the step of cross-training the preset classification model based on the training set and the test set;
[0120] Record the number of cross-training training sessions, the number of incorrectly classified samples of each sample data, the number of correctly classified samples in each round of cross-training, and the total number of samples;
[0121] When the number of training sessions reaches the preset number, cross-training stops.
[0122] Optionally, the training module 10 is further used for:
[0123] Obtain the number of misclassified times and training times for each sample data, as well as the number of correctly classified samples and the total number of samples in each round of cross-training;
[0124] For any sample data in each sample data, the ratio of the number of classified errors corresponding to the sample data to the number of training times is recorded as the error rate of the sample data;
[0125] For any round of cross-training in the preset classification model, the ratio of the number of correctly classified samples in the cross-training to the total number of samples is recorded as the classification accuracy of the corresponding round of cross-training, and the average of the classification accuracy of each round of cross-training is taken as the original accuracy of the preset classification model.
[0126] Optionally, the cleaning module 30 is further used for:
[0127] For any sample data in the new preset sample set obtained after filtering each abnormal sample, calculate the optimization accuracy of the preset classification model after multiple rounds of training based on the remaining sample data in the new preset sample set under the condition of filtering the sample data;
[0128] When the calculated optimization accuracy rates are all lower than the original accuracy rates, it is determined that the new preset sample set has no abnormality.
[0129] Optionally, the circulation module 40 is further configured to:
[0130] Record the number of times the preset error rate threshold is increased;
[0131] When the number of increases is greater than a preset increase number threshold, the preset change value is increased by a preset increment, and the preset error rate threshold is increased using the increased preset change value;
[0132] When the preset change value reaches the preset change upper limit, the preset change value stops increasing.
[0133] The abnormal sample detection device includes an adjustment module 50, and the adjustment module 50 is further used for:
[0134] When the optimized accuracy is greater than or equal to the original accuracy, the preset error rate threshold of each abnormal sample is recorded and determined to obtain the basic error rate threshold;
[0135] The average value of each basic error rate threshold obtained by the record is calculated to generate an error rate prediction value, wherein the error rate prediction value is used as the initial preset error rate threshold for each sample data in other sample sets, and other sample sets are used to train the preset classification model.
[0136] The abnormal sample detection device provided by the present application adopts the abnormal sample detection method in the above embodiment, which can solve the technical problem of how to improve the accuracy of data cleaning. Compared with the prior art, the beneficial effects of the abnormal sample detection device provided by the present application are the same as the beneficial effects of the abnormal sample detection method provided by the above embodiment, and other technical features in the abnormal sample detection device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0137] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the abnormal sample detection method in the above-mentioned embodiment 1.
[0138] Reference below Figure 5, which shows a schematic diagram of the structure of an electronic device suitable for implementing an embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, notebook computers, PADs (Portable Application Description: tablet computers), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0139] like Figure 5 As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0140] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0141] The electronic device provided by the present application adopts the abnormal sample detection method in the above embodiment to solve the technical problem of how to improve the accuracy of data cleaning. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the abnormal sample detection method provided by the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0142] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0143] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0144] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the abnormal sample detection method in the above-mentioned embodiment.
[0145] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0146] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0147] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the abnormal sample detection device: performs multiple rounds of training on a preset classification model through a preset sample set to obtain the error rate of incorrect classification of each sample data in the preset sample set, and the original accuracy rate of the preset classification model, wherein the original accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training based on the preset sample set; records the sample data with an error rate greater than a preset error rate threshold as each abnormal sample, and obtains a new preset sample set after filtering each abnormal sample from the preset sample set, performs multiple rounds of training on the preset classification model based on the new preset sample set, and obtains the preset classification model. The optimized accuracy of the model is obtained, wherein the optimized accuracy is the classification accuracy of the preset classification model after multiple rounds of training based on the new preset sample set; when the optimized accuracy is greater than or equal to the original accuracy, each abnormal sample is determined to be a sample to be cleaned; when the optimized accuracy is less than the original accuracy, the preset error rate threshold is increased according to the preset change value to obtain a new preset error rate threshold, based on the new preset error rate threshold, sample data with an error rate greater than the preset error rate threshold is recorded as each abnormal sample, and each abnormal sample is filtered from the preset sample set to obtain a new preset sample set, and multiple rounds of training are performed on the preset classification model based on the new preset sample set to obtain the optimized accuracy of the preset classification model.
[0148] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0149] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0150] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0151] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned abnormal sample detection method, and can solve the technical problem of how to improve the accuracy of data cleaning. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the abnormal sample detection method provided in the above-mentioned embodiment, and will not be repeated here.
[0152] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned abnormal sample detection method when executed by a processor.
[0153] The computer program product provided by this application can solve the technical problem of how to improve the accuracy of data cleaning. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the abnormal sample detection method provided by the above embodiment, which will not be repeated here.
[0154] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for detecting abnormal samples, characterized in that: The abnormal sample detection method comprises: Performing multiple rounds of training on a preset classification model through a preset sample set to obtain an error rate of incorrect classification of each sample data in the preset sample set and an original accuracy rate of the preset classification model, wherein the original accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training based on the preset sample set; Recording sample data with an error rate greater than a preset error rate threshold as abnormal samples, and obtaining a new preset sample set after filtering the abnormal samples from the preset sample set, performing multiple rounds of training on the preset classification model based on the new preset sample set, and obtaining an optimized accuracy rate of the preset classification model, wherein the optimized accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training based on the new preset sample set; When the optimized accuracy is greater than or equal to the original accuracy, determining each abnormal sample as a sample to be cleaned; In the case where the optimized accuracy rate is lower than the original accuracy rate, the preset error rate threshold is increased according to the preset change value to obtain a new preset error rate threshold, based on the new preset error rate threshold, the sample data with error rates greater than the preset error rate threshold are returned as abnormal samples, and each abnormal sample is filtered from the preset sample set to obtain a new preset sample set, and the preset classification model is trained for multiple rounds based on the new preset sample set to obtain the optimized accuracy rate of the preset classification model.
2. The abnormal sample detection method according to claim 1, characterized in that: The step of performing multiple rounds of training on the preset classification model using the preset sample set includes: Dividing each sample data in the preset sample set into each sample subset of a preset allocated number; For any one of the sample subsets, when the sample subset is used as a test set, the remaining sample subsets in the sample subsets are used as training sets, and the preset classification model is cross-trained based on the training set and the test set. After the training is completed, a new training set and a new test set are determined; Based on the new training set and the new test set, returning to execute the step of cross-training the preset classification model based on the training set and the test set; Record the number of cross-training training sessions, the number of incorrectly classified samples of each sample data, the number of correctly classified samples in each round of cross-training, and the total number of samples; When the training times reaches the preset training times, the cross-training is stopped.
3. The abnormal sample detection method according to claim 2, characterized in that: The step of obtaining the error rate of misclassification of each sample data in the preset sample set and the original accuracy rate of the preset classification model includes: Obtaining the number of times each sample data is misclassified and the number of training times, as well as the number of correctly classified samples and the total number of samples in each round of cross-training; For any one of the sample data, the ratio of the number of classified errors corresponding to the sample data to the number of training times is recorded as the error rate of the sample data; For any round of cross-training in the preset classification model, the ratio of the number of correctly classified samples in the cross-training to the total number of samples is recorded as the classification accuracy of the corresponding round of cross-training, and the average of the classification accuracy of each round of cross-training is taken as the original accuracy of the preset classification model.
4. The abnormal sample detection method according to claim 1, characterized in that: After the step of determining each abnormal sample as a sample to be cleaned, the following step is further included: For any sample data in the new preset sample set obtained after filtering the abnormal samples, calculate the optimization accuracy of the preset classification model after multiple rounds of training based on the remaining sample data in the new preset sample set when the sample data is filtered; When the calculated optimized accuracy rates are all lower than the original accuracy rates, it is determined that the new preset sample set has no abnormality.
5. The abnormal sample detection method according to claim 1, characterized in that: After the step of increasing the preset error rate threshold according to the preset change value to obtain a new preset error rate threshold, the following step further includes: Recording the number of times the preset error rate threshold is increased; When the number of increases is greater than a preset increase number threshold, increasing the preset change value by a preset increment, and using the increased preset change value to increase the preset error rate threshold; When the preset change value reaches a preset change upper limit, the preset change value is stopped from being increased.
6. The abnormal sample detection method according to claim 1, characterized in that: The abnormal sample detection method further includes: When the optimized accuracy rate is greater than or equal to the original accuracy rate, recording and determining the preset error rate threshold of each abnormal sample to obtain a basic error rate threshold; The average value of each basic error rate threshold obtained by the record is calculated to generate an error rate prediction value, wherein the error rate prediction value is used as the initial preset error rate threshold for each sample data in other sample sets, and the other sample sets are used to train the preset classification model.
7. An abnormal sample detection device, characterized in that: The abnormal sample detection device comprises: A training module is used to perform multiple rounds of training on a preset classification model through a preset sample set to obtain an error rate of incorrect classification of each sample data in the preset sample set and an original accuracy rate of the preset classification model, wherein the original accuracy rate is the classification accuracy rate of the preset classification model after multiple rounds of training; A filtering module, used to record sample data with an error rate greater than a preset error rate threshold as abnormal samples, and obtain a new preset sample set after filtering the abnormal samples from the preset sample set, and perform multiple rounds of training on the preset classification model based on the new preset sample set to obtain an optimized accuracy rate of the preset classification model; A cleaning module, configured to determine that each abnormal sample is a sample to be cleaned when the optimized accuracy is greater than or equal to the original accuracy; A loop module is used to increase the preset error rate threshold according to the preset change value to obtain a new preset error rate threshold when the optimized accuracy rate is less than the original accuracy rate, return the sample data with error rates greater than the preset error rate threshold as abnormal samples based on the new preset error rate threshold, filter the abnormal samples from the preset sample set to obtain a new preset sample set, and perform multiple rounds of training on the preset classification model based on the new preset sample set to obtain the optimized accuracy rate of the preset classification model.
8. An electronic device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the abnormal sample detection method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the abnormal sample detection method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the abnormal sample detection method according to any one of claims 1 to 6 are implemented.