CN115345299A - Model training method and device, computer equipment and storage medium - Google Patents

Model training method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115345299A
CN115345299A CN202211004997.9A CN202211004997A CN115345299A CN 115345299 A CN115345299 A CN 115345299A CN 202211004997 A CN202211004997 A CN 202211004997A CN 115345299 A CN115345299 A CN 115345299A
Authority
CN
China
Prior art keywords
model
training
training data
classification
classification models
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211004997.9A
Other languages
Chinese (zh)
Inventor
黄移军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202211004997.9A priority Critical patent/CN115345299A/en
Publication of CN115345299A publication Critical patent/CN115345299A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of artificial intelligence, and discloses a model training method, a model training device, computer equipment and a storage medium. The method comprises the steps of firstly adopting first training data in a training set to train N general models to obtain N first classification models; then, the N first classification models are tested by adopting the first training data in the test set to obtain model test results corresponding to the N first classification models, and the model test results are used for screening the first training data in the test set to obtain second training data with more remarkable characteristics; finally, model training is carried out on the N first classification models through second training data to obtain N second classification models, and the N second classification models are combined to obtain a comprehensive classification model with higher accuracy, so that the problem that the accuracy of the model obtained through model training is insufficient is solved.

Description

Model training method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a model training method, a model training device, computer equipment and a storage medium.
Background
The training mode of the neural network model usually utilizes supervised learning, unsupervised learning or semi-supervised learning to train the classification model, so that the accuracy and the stability of the model are improved, and the training data used by different learning modes have certain difference. The supervised guidance is better, the training data used by the supervised learning machine has both features (features) and labels (labels), the machine can find the relation between the features and the labels by training, and the labels corresponding to the features can be judged when the data only with the features and without the labels are faced, so that the training of the model is completed, and the accuracy and the recall rate of the model are stably improved.
In the prior art, a large amount of training data is needed for improving the parameters of the model in supervised learning, and generally, when the accuracy of the model is improved, the improvement of an algorithm or the fusion of the model is selected, but the training efficiency of the model is slightly low, and the problem that the accuracy of the obtained model is insufficient still exists.
Disclosure of Invention
The embodiment of the invention provides a model training method, a model training device, computer equipment and a storage medium, which solve the problem that the accuracy of a model obtained by training the existing model is insufficient.
The embodiment of the invention provides a model training method, which comprises the following steps:
acquiring first training data, and dividing the first training data into a training set and a test set;
training N general models by adopting first training data in the training set to obtain N first classification models; wherein N is a positive integer;
testing the N first classification models by adopting the first training data in the test set to obtain model test results corresponding to the N first classification models;
screening first training data in the test set according to model test results corresponding to the N first classification models to determine second training data;
performing model training on the N first classification models by using the second training data to obtain N second classification models;
and acquiring a comprehensive classification model according to the N second classification models.
An embodiment of the present invention further provides a model training apparatus, including:
the training data acquisition method comprises the steps of obtaining first training data by a first training data acquisition model, and dividing the first training data into a training set and a test set;
a first classification model obtaining model, which is used for training N general models by adopting first training data in the training set to obtain N first classification models; wherein N is a positive integer;
the model test result acquisition model is used for testing the N first classification models by adopting the first training data in the test set to acquire model test results corresponding to the N first classification models;
a second training data acquisition model, which screens the first training data in the test set according to the model test results corresponding to the N first classification models to determine second training data;
a second classification model obtaining model, which is used for carrying out model training on the N first classification models by adopting the second training data to obtain N second classification models;
and acquiring a comprehensive classification model according to the N second classification models.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the above implementation model training method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the computer program realizes the model training method.
According to the model training method, the model training device, the computer equipment and the storage medium, the N general models are trained by adopting the first training data in the training set to obtain N first classification models; then, testing the N first classification models by adopting the first training data in the test set to obtain model test results corresponding to the N first classification models, and screening the first training data in the test set to obtain second training data with more obvious characteristics; finally, model training is carried out on the N first classification models through second training data to obtain N second classification models, and the N second classification models are combined to obtain a comprehensive classification model with higher accuracy, so that the problem that the accuracy of the model obtained through model training is insufficient is solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a diagram illustrating an application environment of a model training method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a model training method according to an embodiment of the present invention;
FIG. 3 is another flow chart of a model training method according to an embodiment of the present invention;
FIG. 4 is another flow chart of a model training method according to an embodiment of the present invention;
FIG. 5 is another flow chart of a model training method according to an embodiment of the present invention;
FIG. 6 is another flow chart of a model training method in an embodiment of the present invention;
FIG. 7 is another flow chart of a model training method in an embodiment of the invention;
FIG. 8 is a schematic diagram of a model training apparatus according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The model training method provided by the embodiment of the invention can be applied to the application environment shown in fig. 1. As shown in fig. 1, a client (computer device) communicates with a server through a network. The client (computer device) includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, cameras, and portable wearable devices. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The model training method provided by the embodiment of the invention can be applied to the application environment shown in fig. 1. Specifically, the model training method is applied to a model training system, which includes a client and a server as shown in fig. 1, where the client and the server communicate with each other via a network, and are used to obtain a corresponding model training result for an audio file to be processed, so as to reduce the training cost of a singing voice recognition model.
In an embodiment, as shown in fig. 2, a model training method is provided, which is described by taking the server in fig. 1 as an example, and includes the following steps:
s201: acquiring first training data, and dividing the first training data into a training set and a test set;
s202: training the N general models by adopting first training data in a training set to obtain N first classification models; wherein N is a positive integer;
s203: testing the N first classification models by adopting first training data in the test set to obtain model test results corresponding to the N first classification models;
s204: screening first training data in the test set according to model test results corresponding to the N first classification models to determine second training data;
s205: performing model training on the N first classification models by adopting second training data to obtain N second classification models;
s206: and acquiring a comprehensive classification model according to the N second classification models.
As an example, in step S201, after receiving the first training data, the server divides the first training data into a training set and a test set, so as to train the general model by using the first training data in the training set, and then tests the general model by using the first training data in the test set, thereby performing analysis and improvement on the general model according to the test result. In this example, the first training data is feature data obtained by extracting features from original training data input by a user, and in the proportion of common training sets to test sets, the proportion of the data volume of the training sets is usually greater than that of the test sets.
Training data used for model Training is generally divided into a Training set, a verification set and a test set, wherein the Training set (Training Dataset) is used for Training a model, namely model parameters are optimized through the Training set; the verification set (Validation Dataset) is used for verifying the expression of the model on the data of the non-training set (the verification set and the test set are different data); after we confirm the final model parameters, the model is tested by the Test set (Test Dataset) to obtain the model Test results, for example: accuracy, precision, recall, and the like.
As an example, in step S202, after confirming the training set and the test set, the server selects first training data in the training set, first trains N preset general models, and obtains first classification models corresponding to the N trained general models, where model knowledge is initially trained, so as to be used for performing corresponding screening on the first training data in subsequent steps.
In this example, the general models are set according to the requirements of the services, the algorithms used by each general model are different, and different algorithms are used to solve the same requirements of the services, so that the respective advantages of multiple algorithms are used to obtain a more stable comprehensive classification model. The algorithms used by the generic model include, but are not limited to, random Forest algorithm (RF), gradient Boosting Decision Tree algorithm (GBDT), eXtreme Gradient Boosting Tree (XGBoot), and Deep Neural Network (DNN).
As an example, in step S203, after confirming the training set and the test set, the server selects the first training data in the test set, inputs N trained first classification models for testing, and obtains model test results, that is, N different model test results, of the first training data in the test set, which correspond to each first classification model, respectively. In this example, the model test result is output in a table form, and the model test result includes an accumulated accuracy rate corresponding to each item of data in the first training data, so as to be used for analyzing the first training data and the first classification model.
As an example, in step S204, after obtaining the model test results corresponding to the N first classification models, the server screens the first training data in the test set according to the model test results corresponding to the N first classification models to screen out second training data with more significant features for training the model, so as to improve the efficiency of model training. In this example, a preset accuracy is set as a screening standard according to the accumulated accuracy, the preset accuracy can be tested according to actual business requirements, and the preset accuracy is used for screening the item data in the model test result corresponding to each first classification model, so as to obtain second training data more suitable for training.
Because the same data are trained under different models, the obtained model test results are different, and the preset accuracy rate more suitable for the corresponding first classification model is set for different first classification models. For example, in the model test result corresponding to the first classification model with the random forest algorithm as the algorithm, after the discretization, the preset accuracy rate is 35.05%, the first training data accounts for 9.69% of the project data of the test set used in the training, the preset accuracy rate is set to be 20.48% according to the business requirement, and the project data with the model test result meeting the preset accuracy rate is reserved and used as the second training data.
As an example, in step S205, after the server screens out the second training data with more significant features, the server performs model training on the N first classification models respectively by using the second training data, and optimizes parameters of each first classification model, thereby obtaining more stable N second classification models.
As an example, in step S206, after the server obtains N second classification models through training, the server integrates the second classification models to obtain a comprehensive classification model with multiple second classification models, and when the data to be processed is input into the comprehensive classification model, the server performs classification processing through the multiple second classification models, and determines a final model recognition result according to the N data processing results, thereby improving the accuracy of the classification service of the data to be processed. In this example, according to the training effect of each second classification model, a corresponding weight is formulated for the data processing result output by each second classification model, so as to further improve the accuracy of the model identification result.
In this example, N first classification models are obtained by training N generic models with first training data in a training set; then, testing the N first classification models by adopting the first training data in the test set to obtain model test results corresponding to the N first classification models, and screening the first training data in the test set to obtain second training data with more obvious characteristics; finally, model training is carried out on the N first classification models through second training data to obtain N second classification models, and the N second classification models are combined to obtain a comprehensive classification model with higher accuracy, so that the problem that the accuracy of the model obtained through model training is insufficient is solved.
In an embodiment, as shown in fig. 3, step S201 is to acquire first training data, and divide the first training data into a training set and a test set, including:
s301: acquiring original training data;
s302: extracting the characteristics of the original training data to obtain the characteristics of the training data;
s303: and processing all training data characteristics by adopting a preset format to obtain first training data.
S304: determining a sample division ratio according to the number of items corresponding to the first training data and a preset number threshold;
s305: and dividing the first training data into a training set and a test set according to the sample division ratio.
As an example, in step S301, the server receives original training data input by a user, where the original training data is labeled data, and the original training data includes positive sample data and negative sample data. In this example, the original training data may also be obtained through the internet, and the positive sample data and the negative sample data of the original training data are labeled by the customer according to business requirements, for example, selecting a network purchase record as the original training data, recording data in a certain period, and defining positive and negative samples according to whether there is a purchase record, such as defining a browsing record that has been purchased as a positive sample and defining a browsing record that has not been purchased as a negative sample.
As an example, in step S302, after receiving the original training data, the server performs special extraction on the original training data to obtain multiple factors in the original training data, so as to obtain multiple corresponding training data features, which are used for the generic model to perform classification processing according to the training data features. In this example, multiple dimensions of the purchase record corresponding to the original training data, such as the number of browsing times of the goods, the shopping address area, the goods category, the rating scale, and the like, may be extracted.
As an example, in step S303, the server processes all the extracted training data features by using a preset format, combs the training data features into a corresponding format, and performs encoding processing to obtain first training data used for model training. In this example, training data features are set up in a corresponding broad-table format to comb data, and the combed training data features are encoded by an encoder to obtain corresponding data representations, that is, first training data, for subsequent model training.
As an example, in step S304, after the server obtains the first training data, according to the number of items corresponding to the first training data and a preset number threshold, a sample division ratio corresponding to the first training data is determined, so as to divide the first training data for training the general model, where the preset number threshold is set according to an actual business requirement. In this example, when the number of items corresponding to the first training data is less than the preset number threshold, the proportion of the training data occupied by the training set is usually about 80%, and the remaining part is used as the test set.
As an example, in step S305, after determining the sample division ratio again, the server divides the first training data into a training set and a test set according to the sample division ratio, so as to complete training of the model.
In the embodiment, after corresponding characteristic extraction and format combing are performed on the obtained original training data, corresponding first training data are obtained, the sample division proportion is determined after the number of items of the first training data is judged, and the first training data is divided into a training set and a test set according to the sample division proportion, so that the efficiency of the original training data on model training is improved, and the accuracy and the stability of the model are improved.
In an embodiment, as shown in fig. 4, in step S203, the step of testing the N first classification models by using the first training data in the test set to obtain model test results corresponding to the N first classification models includes:
401: testing the N first classification models by adopting first training data in the test set, and determining a sample test result corresponding to each first classification model;
402: and obtaining model test results corresponding to the N first classification models according to the number of items corresponding to the first training data in the test set and the sample test result corresponding to each first classification model.
As an example, in step S401, the server uses the first training data in the test set, inputs the same first training data into each first classification model for testing, determines sample test results output by all the first classification models, and determines a sample test result corresponding to the first training data corresponding to each classification model. In this example, the sample test results include the accuracy, precision, and recall of the first training data as a whole.
As an example, in step S402, after obtaining a plurality of sample test results, the server obtains model test results corresponding to N first classification models according to the number of items corresponding to the first training data in the test set and the sample test result corresponding to each first classification model. In this example, the first training data includes a certain amount of item data, and sample test results corresponding to corresponding first classification models are respectively matched according to the item amount, so that a model test result corresponding to each item data in the N pieces of first training data is determined according to the item amount, and is used for subsequent data statistics and analysis.
In this example, the N first classification models are tested by using the first training data in the test set, and a sample test result corresponding to each first classification model is determined; and then, according to the quantity of items corresponding to item data in the first training data in the test set, carrying out refinement matching on the sample test results corresponding to each first classification model to obtain model test results corresponding to N first classification models, so as to be used for subsequent data analysis and screen out models which are more advantageous in the business scene.
In an embodiment, as shown in fig. 5, in step S204, the screening the first training data in the test set according to the model test results corresponding to the N first classification models, and determining the second training data includes:
501: classifying the model test results corresponding to the N first classification models by adopting a quantile point strategy to obtain M quantiles and the accumulated accuracy rate corresponding to each quantile point; wherein M is a positive integer greater than 1.
502: determining the quantiles with the accumulated accuracy rate larger than the preset accuracy rate as target quantiles corresponding to each first classification model, and determining first training data corresponding to the target quantiles as to-be-selected training data corresponding to each first classification model;
503: and performing integration and de-duplication processing on the training data to be selected corresponding to the N first classification models, and determining second training data.
The Quantile (Quantile) is also called Quantile, and means a numerical point dividing the probability distribution range of a random variable into several equal parts, and there are median (i.e. binary), quartile, percentile and the like in common use. And the quantile point strategy is set to have different quantile point strategies according to different distribution of model test results corresponding to the N first classification models so as to adapt to different data sets for analysis.
As an example, in step S501, after obtaining the model test result, the server performs quantile classification on the model test results corresponding to the N first classification models by using a quantile policy, so as to obtain quantiles and quantile data corresponding to each model test result, where the quantile data includes an accumulated accuracy rate, an accumulated sample size, an accumulated positive sample size, and an accumulated coverage rate (a ratio of an item number of item data corresponding to the quantile to a total item number). And confirming corresponding M quantiles according to the service requirements, and confirming the accumulated accuracy rate corresponding to each quantile for model comparison and data screening.
In this example, each quantile point corresponds to the quantile point data including the accumulated accuracy, the accumulated sample volume, the accumulated positive sample volume and the accumulated coverage, for example, a first classification model, the total item quantity of the item data of which is the model test result corresponding to 858 ten thousand item data, when the quantile point is 0.01, the accumulated sample volume is 94103, the accumulated positive sample volume is 32982, the accumulated coverage is 9.69%, and the accumulated accuracy is 35.05%; when the quantile is 0.02, the cumulative sample size is 179946, the cumulative positive sample size is 52344, the cumulative coverage is 15.38%, and the cumulative accuracy is 29.09%.
As an example, in step S502, after the server processes the model test result by using the quantile policy, because the quantile data corresponding to the quantiles of different first classification models are different, according to the accumulated accuracy rate, the quantile corresponding to the accumulated accuracy rate that is greater than the preset accuracy rate is determined as the target quantile corresponding to each first classification model. And then determining the first training data corresponding to the target sub-locus points as the training data to be selected corresponding to each first classification model, wherein the training data to be selected is used for secondary training of the models after being combed. The preset accuracy is set according to actual service requirements.
In this example, if the preset accuracy is 20.48%, where an accumulated accuracy corresponding to a first classification model using the XGBoot algorithm is 20.48%, the corresponding quantile is 0.08, the accumulated sample size is 687032, and the 0.08 quantile is used as a target quantile of the first classification model to obtain the quantile and the above (more accurate) 687032 corresponding pieces of first training data as the training data to be selected; when the accumulated accuracy rate corresponding to the other first classification model using the DNN algorithm is 20.48%, the corresponding quantile is 0.1, the accumulated sample size is 858790, the 0.1 quantile is used as the target quantile of the first classification model, and 858790 pieces of first training data corresponding to the quantile are acquired and used as the to-be-selected training data.
Further, the training data to be selected corresponding to each first classification model is different in accumulated sample size under the same accumulated accuracy rate, and the item quantity corresponding to the item data of the training data to be selected corresponding to each first classification model is also different.
As an example, in step S503, after the server acquires the candidate training data corresponding to the N first classification models, since each first classification model uses the first training data, the N candidate training data have overlapped item data, and the N candidate training data are subjected to the integration deduplication processing, so that the second training data with more significant features is obtained.
In the example, model test results corresponding to the N first classification models are divided by adopting a quantile strategy, first training data corresponding to a target quantile are screened as to-be-selected training data according to the fact that the accumulated accuracy of each first classification model is larger than the quantile corresponding to the preset accuracy, and finally, after the to-be-selected training data corresponding to the N first classification models are integrated and de-duplicated, second training data with more remarkable characteristics are obtained and are used for training the models, and therefore the efficiency and the accuracy of model training are improved.
In an embodiment, as shown in fig. 6, in step S206, obtaining a comprehensive classification model according to the N second classification models includes:
601: determining model priorities corresponding to the N first classification models according to model training results corresponding to the N first classification models;
602: performing model training on the N first classification models by adopting second training effect data to obtain N second classification models;
603: and acquiring a comprehensive classification model according to the N second classification models and the corresponding model priorities.
As an example, in step S601, after obtaining the model training results corresponding to the N first classification models, the server compares the quantile data of each first classification model based on the quantile corresponding to the model training results, so as to determine a model priority, that is, the weight occupied by each second classification model when performing data classification in the integrated classification model.
In this example, if the accumulated accuracy rate corresponding to one of the first classification models using the XGBoot algorithm is 20.48%, the corresponding quantile is 0.08, the accumulated accuracy rate corresponding to the other first classification model using the DNN algorithm is 20.48%, the corresponding quantile is 0.1, and the accumulated accuracy rate corresponding to the other first classification model using the RF algorithm is 20.48%, the corresponding quantile is 0.02. From the above data, it can be seen that, in the same sample size, the first classification model using the DNN algorithm has the highest training effect in the present business scenario, and is used as the first priority model, that is, the first classification model using the DNN algorithm has the highest priority, and the weight occupied when data classification is performed is the largest.
As an example, in step S602, after confirming the priority of the first classification model, the server performs secondary model training on the N first classification models by using the second training data, so as to obtain N second classification models with higher accuracy. In this example, the accumulated accuracy corresponding to the sibling points is significantly increased by the trained second classification model compared to the first classification model.
As an example, in step S603, after acquiring N second classification models, the server integrates the second classification models according to the N second classification models and corresponding model priorities to obtain an integrated classification model with multiple second classification models, when the data to be processed is input into the integrated classification model, the data to be processed is classified by the multiple second classification models, and a final model identification result is determined according to the N data processing results, so as to improve the accuracy of the data classification service to be processed.
In this example, the priority of each first training model is determined according to the model training result of each first training model, and then each first training model is trained by using second feature data with more significant features to obtain N second training models for integration processing, so as to obtain a comprehensive classification model with higher accuracy, thereby improving the accuracy of the classification service of the data to be processed.
In another embodiment, as shown in fig. 7, in step S206, after obtaining the comprehensive classification model according to the N second classification models, the model training method further includes:
701: acquiring data to be processed;
702: processing the data to be processed by adopting the N second classification models to obtain data processing results output by the N second classification models;
703: and obtaining a model identification result according to the data processing results and the model priorities of the N second classification models.
As an example, in step S701, after receiving the data processing instruction, the server receives data to be processed. Wherein, the service scene of the data to be processed is consistent with the service scene of the training comprehensive classification model.
As an example, in step S702, after receiving the data to be processed, the server inputs the comprehensive classification model, and processes the data to be processed through N second classification models in the comprehensive classification model, so as to obtain respective data processing results of the N second classification models. Wherein the data processing result comprises a classification result probability.
As an example, in step S703, after acquiring the data processing results corresponding to the N second classification models, the server adjusts the proportion of the data processing results corresponding to each second classification model according to the model priorities of the N second classification models, and performs weighted average to obtain a model identification result.
In the example, the data to be processed is processed through the N second classification models in the comprehensive classification model with higher accuracy rate and more stability after training, so that the accuracy rate of the classification service of the data to be processed is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, a model training apparatus is provided, and the model training apparatus corresponds to the model training method in the above embodiment one to one. As shown in fig. 8, the model training apparatus includes a first training data obtaining model 801, a first classification model obtaining model 802, a model test result obtaining model 803, a second training data obtaining model 804, a second classification model obtaining model 805, and a comprehensive classification model obtaining model 806. The detailed description of each functional module is as follows:
a first training data acquisition model 801 for acquiring first training data, and dividing the first training data into a training set and a test set;
a first classification model obtaining model 802, which is used for training the N general models by adopting first training data in a training set to obtain N first classification models; wherein N is a positive integer;
a model test result obtaining model 803, which is used for testing the N first classification models by using the first training data in the test set, and obtaining model test results corresponding to the N first classification models;
a second training data acquisition model 804, which is used for screening the first training data in the test set according to the model test results corresponding to the N first classification models to determine second training data;
a second classification model obtaining model 805, which performs model training on the N first classification models by using second training data to obtain N second classification models;
and a comprehensive classification model obtaining model 806, which obtains a comprehensive classification model according to the N second classification models.
In one embodiment, the dry audio signal acquisition module 802 includes:
the audio frequency spectrum acquisition unit to be processed adopts a target U-Net model to convert the audio file to be processed and acquire an audio frequency spectrum to be processed;
and the dry sound audio signal acquisition unit is used for performing accompaniment separation on the audio file to be processed according to the audio frequency spectrum to be processed to acquire the dry sound audio signal.
In one embodiment, the first training data acquisition model 801 includes:
the device comprises an original training data acquisition unit, a data acquisition unit and a data acquisition unit, wherein the original training data acquisition unit acquires original training data which comprises positive sample data and negative sample data;
the training data feature acquisition unit is used for extracting features of the original training data to acquire training data features;
the first training data acquisition unit is used for processing all training data characteristics by adopting a preset format to acquire first training data;
the sample division ratio obtaining unit is used for determining the sample division ratio according to the item quantity corresponding to the first training data and a preset quantity threshold;
and the first training data dividing unit is used for dividing the first training data into a training set and a test set according to the sample dividing proportion.
In one embodiment, the model test result obtaining model 803 includes:
the sample test result acquisition unit is used for testing the N first classification models by adopting the first training data in the test set and determining a sample test result corresponding to each first classification model;
and the model test result acquisition unit is used for acquiring model test results corresponding to the N first classification models according to the number of items corresponding to the first training data in the test set and the sample test result corresponding to each first classification model.
In an embodiment, the second training data acquisition model 804 includes:
the accumulated accuracy rate acquisition unit is used for classifying the model test results corresponding to the N first classification models by adopting a quantile strategy to acquire M quantiles and accumulated accuracy rates corresponding to each quantile;
the to-be-selected training data acquisition unit is used for determining the subsites corresponding to the accumulated accuracy rate greater than the preset accuracy rate as target subsites corresponding to each first classification model, and determining the first training data corresponding to the target subsites as the to-be-selected training data corresponding to each first classification model;
and the second training data acquisition unit is used for integrating and de-duplicating the to-be-selected training data corresponding to the N first classification models and determining second training data.
In one embodiment, the integrated classification model acquisition model 806 includes:
the model priority confirming unit is used for confirming the model priorities corresponding to the N first classification models according to the model training results corresponding to the N first classification models;
the second classification model acquisition unit is used for carrying out model training on the N first classification models by adopting a second training effect to acquire N second classification models;
and the comprehensive classification model obtaining unit is used for obtaining the comprehensive classification model according to the N second classification models and the corresponding model priorities.
In another embodiment, the model training apparatus further includes:
the data to be processed acquisition module acquires data to be processed;
the data processing result acquisition module is used for processing the data to be processed by adopting the N second classification models and acquiring data processing results output by the N second classification models;
and the model identification result acquisition module is used for acquiring a model identification result according to the data processing results and the model priorities of the N second classification models.
For specific limitations of the model training device, reference may be made to the above limitations of the model training method, which are not described herein again. The modules in the model training apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to execute data employed or generated during the model training method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a model training method.
In an embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the computer program, the model training method in the foregoing embodiments is implemented, for example, as shown in S201-S206 in fig. 2, or as shown in fig. 3 to 7, which is not described herein again to avoid repetition. Alternatively, when the processor executes the computer program, the functions of each module/unit in the embodiment of the model training apparatus are implemented, for example, the functions of the first training data obtaining model 801, the first classification model obtaining model 802, the model test result obtaining model 803, the second training data obtaining model 804, the second classification model obtaining model 805, and the comprehensive classification model obtaining model 806 shown in fig. 8, which are not described herein again for avoiding repetition.
In an embodiment, a computer-readable storage medium is provided, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for training a model in the foregoing embodiments is implemented, for example, S201 to S205 shown in fig. 2, or shown in fig. 3 to fig. 7, which is not described herein again to avoid repetition. Alternatively, the computer program, when executed by the processor, implements the functions of each module/unit in the embodiment of the model training apparatus, such as the functions of the first training data obtaining model 801, the first classification model obtaining model 802, the model test result obtaining model 803, the second training data obtaining model 804, the second classification model obtaining model 805, and the comprehensive classification model obtaining model 806 shown in fig. 8, and is not described herein again to avoid repetition.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambuS (RambuS) direct RAM (RDRAM), direct RambuS Dynamic RAM (DRDRAM), and RambuS Dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A method of model training, comprising:
acquiring first training data, and dividing the first training data into a training set and a test set;
training N general models by adopting first training data in the training set to obtain N first classification models; wherein N is a positive integer;
testing the N first classification models by adopting the first training data in the test set to obtain model test results corresponding to the N first classification models;
screening first training data in the test set according to model test results corresponding to the N first classification models to determine second training data;
performing model training on the N first classification models by using the second training data to obtain N second classification models;
and acquiring a comprehensive classification model according to the N second classification models.
2. The model training method of claim 1, wherein said obtaining first training data comprises:
acquiring original training data;
extracting the characteristics of the original training data to obtain the characteristics of the training data;
and processing all the training data characteristics by adopting a preset format to obtain first training data.
3. The model training method of claim 1, wherein said partitioning the first training data into a training set and a test set comprises:
determining a sample division ratio according to the number of items corresponding to the first training data and a preset number threshold;
and dividing the first training data into a training set and a test set according to the sample division ratio.
4. The model training method of claim 1, wherein the step of testing the N first classification models by using the first training data in the test set to obtain the model test results corresponding to the N first classification models comprises:
testing the N first classification models by adopting first training data in a test set, and determining a sample test result corresponding to each first classification model;
and obtaining model test results corresponding to the N first classification models according to the number of items corresponding to the first training data in the test set and the sample test result corresponding to each first classification model.
5. The model training method of claim 1, wherein the screening the first training data in the test set according to the model test results corresponding to the N first classification models to determine the second training data comprises:
classifying the model test results corresponding to the N first classification models by adopting a quantile strategy to obtain M quantiles and the accumulated accuracy rate corresponding to each quantile; wherein M is a positive integer greater than 1.
Determining the accumulated accuracy rate to be a target quantile corresponding to each first classification model according to the quantile corresponding to the accumulated accuracy rate greater than the preset accuracy rate, and determining the first training data corresponding to the target quantile to be the to-be-selected training data corresponding to each first classification model;
and integrating and de-duplicating the to-be-selected training data corresponding to the N first classification models, and determining second training data.
6. The model training method of claim 1, wherein said obtaining a composite classification model from said N second classification models comprises:
determining model priorities corresponding to the N first classification models according to model training results corresponding to the N first classification models;
performing model training on the N first classification models by adopting the second training effect data to obtain N second classification models;
and acquiring a comprehensive classification model according to the N second classification models and the corresponding model priorities.
7. The model training method of claim 1, wherein after said obtaining a composite classification model from said N second classification models, said model training method further comprises:
acquiring data to be processed;
processing the data to be processed by adopting N second classification models to obtain data processing results output by the N second classification models;
and obtaining a model identification result according to the data processing results and the model priorities of the N second classification models.
8. A model training apparatus, comprising:
the training data acquisition method comprises the steps of obtaining first training data by a first training data acquisition model, and dividing the first training data into a training set and a test set;
a first classification model obtaining model, which is used for training N general models by adopting first training data in the training set to obtain N first classification models; wherein N is a positive integer;
the model test result acquisition model is used for testing the N first classification models by adopting the first training data in the test set to acquire model test results corresponding to the N first classification models;
a second training data acquisition model, which screens the first training data in the test set according to the model test results corresponding to the N first classification models to determine second training data;
a second classification model obtaining model, which is used for carrying out model training on the N first classification models by adopting the second training data to obtain N second classification models;
and acquiring a comprehensive classification model according to the N second classification models.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the model training method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out a model training method according to any one of claims 1 to 7.
CN202211004997.9A 2022-08-22 2022-08-22 Model training method and device, computer equipment and storage medium Pending CN115345299A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211004997.9A CN115345299A (en) 2022-08-22 2022-08-22 Model training method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211004997.9A CN115345299A (en) 2022-08-22 2022-08-22 Model training method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115345299A true CN115345299A (en) 2022-11-15

Family

ID=83953459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211004997.9A Pending CN115345299A (en) 2022-08-22 2022-08-22 Model training method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115345299A (en)

Similar Documents

Publication Publication Date Title
CN110147726B (en) Service quality inspection method and device, storage medium and electronic device
US20210257066A1 (en) Machine learning based medical data classification method, computer device, and non-transitory computer-readable storage medium
CN110598206B (en) Text semantic recognition method and device, computer equipment and storage medium
CN110569500A (en) Text semantic recognition method and device, computer equipment and storage medium
CN109543925B (en) Risk prediction method and device based on machine learning, computer equipment and storage medium
WO2022105129A1 (en) Content data recommendation method and apparatus, and computer device, and storage medium
US20220198326A1 (en) Spectral data processing for chemical analysis
CN113420113A (en) Semantic recall model training and recall question and answer method, device, equipment and medium
CN110674131A (en) Financial statement data processing method and device, computer equipment and storage medium
CN110765757A (en) Text recognition method, computer-readable storage medium, and computer device
CN111932363A (en) Identification and verification method, device, equipment and system for authorization book
CN110968664A (en) Document retrieval method, device, equipment and medium
CN114218427A (en) Voice quality inspection analysis method, device, equipment and medium
CN112632248A (en) Question answering method, device, computer equipment and storage medium
CN113707296B (en) Medical scheme data processing method, device, equipment and storage medium
CN111882034A (en) Neural network processing and face recognition method, device, equipment and storage medium
CN114372532A (en) Method, device, equipment, medium and product for determining label marking quality
CN113704389A (en) Data evaluation method and device, computer equipment and storage medium
CN113762392A (en) Financial product recommendation method, device, equipment and medium based on artificial intelligence
CN113782093A (en) Method and device for acquiring gene expression filling data and storage medium
CN108986786B (en) Voice interaction equipment rating method, system, computer equipment and storage medium
CN115345299A (en) Model training method and device, computer equipment and storage medium
CN112732423B (en) Process migration method, device, equipment and medium
CN115203339A (en) Multi-data source integration method and device, computer equipment and storage medium
CN114283429A (en) Material work order data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination