WO2020155300A1 - 一种模型预测方法及装置 - Google Patents

一种模型预测方法及装置 Download PDF

Info

Publication number
WO2020155300A1
WO2020155300A1 PCT/CN2019/077237 CN2019077237W WO2020155300A1 WO 2020155300 A1 WO2020155300 A1 WO 2020155300A1 CN 2019077237 W CN2019077237 W CN 2019077237W WO 2020155300 A1 WO2020155300 A1 WO 2020155300A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
prediction
data
target
level sub
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.)
Ceased
Application number
PCT/CN2019/077237
Other languages
English (en)
French (fr)
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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co 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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to EP19894391.2A priority Critical patent/EP3712825A4/en
Priority to US16/908,589 priority patent/US20200320419A1/en
Publication of WO2020155300A1 publication Critical patent/WO2020155300A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/086Learning methods using evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/09Supervised learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/0985Hyperparameter optimisation; Meta-learning; Learning-to-learn
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/01Probabilistic graphical models, e.g. probabilistic networks

Definitions

  • This application relates to the field of data processing technology, and in particular to a model prediction method and device.
  • machine learning In the field of data processing technology, machine learning is a very popular research direction. Generally speaking, machine learning can obtain a target model based on training data, and use the target model to predict the data to be predicted, thereby obtaining the prediction result of the data to be predicted.
  • Deep learning system is a commonly used machine learning method. Specifically, users can build a deep learning system by manually designing a deep learning network model. By using the built deep learning network model to train the training data set, predictions can be obtained A better target model.
  • manual design of a deep learning network model is usually a relatively complicated process. If a target model with a better prediction effect needs to be trained, it may require users to learn many aspects of knowledge, which wastes manpower and time.
  • the prior art in order to solve the above-mentioned problems, the prior art usually uses an automated machine learning method to train a deep learning network model.
  • automated machine learning methods usually rely on existing preset training algorithms. Based on the preset training algorithms, multiple random models with different model structures can be obtained, and preset screening rules can be used to select multiple random models from multiple random models. An optimal model is screened out, and the optimal model is trained based on the training data input by the user to obtain the target model.
  • users can obtain the target model without manually designing a deep learning network model.
  • the preset training algorithm may only be suitable for certain applications, and cannot meet the needs of multiple users; in a possible situation, if the training data is less, the training method obtained by this method
  • the target model usually has a poor predictive effect.
  • the embodiments of the present application provide a model prediction method and device to improve the prediction effect of the model.
  • An embodiment of the application provides a model prediction method, the method includes:
  • the first target model is based on the prediction accuracy of the training data based on the first model and the A first-level sub-model obtained by a model is obtained from the prediction accuracy of the training data, the first model is the initial model or the N-th sub-model obtained based on the initial model, and N is greater than or equal to 1.
  • the first target model is any target model of the plurality of target models;
  • the prediction result of the data to be predicted is determined according to the prediction results respectively corresponding to the multiple target models.
  • the first target model is obtained based on the prediction accuracy of the first model on the training data and the prediction accuracy of the first-level sub-model obtained based on the first model on the training data, including:
  • the prediction accuracy of the first-level sub-model obtained based on the first model on the training data is less than the preset threshold, if the prediction accuracy of the first model on the training data is less than the first level According to the prediction accuracy of the sub-model on the training data, the first target model is obtained according to the first-level sub-model.
  • the method further includes: determining that the first model is the target model when the prediction accuracy of the training data by the first model is greater than a preset threshold.
  • the method further includes: if the prediction accuracy of the first model on the training data is greater than the prediction accuracy of the first-level sub-model on the training data, obtaining all data according to the first model The first target model.
  • the determining the prediction result of the data to be predicted according to the prediction results respectively corresponding to the multiple target models includes:
  • the second prediction result is a prediction result other than the first prediction result among the prediction results respectively corresponding to the multiple target models.
  • An embodiment of the present application provides a model prediction device, the device includes:
  • the prediction module is used to predict the data to be predicted using multiple target models to obtain prediction results corresponding to the multiple target models; wherein the first target model is based on the prediction accuracy of the first model on the training data And the prediction accuracy of the training data based on the first-level sub-model obtained by the first model, the first model is the initial model or the Nth-level sub-model obtained based on the initial model, and N is An integer greater than or equal to 1; the first target model is any target model of the multiple target models;
  • the determining module is used to determine the prediction result of the data to be predicted according to the prediction results respectively corresponding to the multiple target models.
  • the device further includes a training module, which is specifically configured to: when the prediction accuracy of the first-level sub-model obtained based on the first model on the training data is less than a preset threshold, if the The prediction accuracy of the first model for the training data is less than the prediction accuracy of the first-level sub-model for the training data, and the first target model is obtained according to the first-level sub-model.
  • a training module which is specifically configured to: when the prediction accuracy of the first-level sub-model obtained based on the first model on the training data is less than a preset threshold, if the The prediction accuracy of the first model for the training data is less than the prediction accuracy of the first-level sub-model for the training data, and the first target model is obtained according to the first-level sub-model.
  • the training module is further configured to determine that the first model is the target model when the prediction accuracy of the training data by the first model is greater than a preset threshold.
  • the training module is further configured to: if the prediction accuracy of the first model on the training data is greater than the prediction accuracy of the first-level sub-model on the training data, then according to the first model Obtain the first target model.
  • the determining module is configured to: if the number of target models whose prediction results are the first prediction results is greater than the number of target models whose prediction results are the second prediction results, determine that the prediction results of the data to be predicted are all The first prediction result; the second prediction result is a prediction result other than the first prediction result among the prediction results respectively corresponding to the multiple target models.
  • multiple target models are obtained, and the multiple target models are used to predict the data to be predicted, and the prediction results corresponding to the multiple target models are obtained, and then the prediction results corresponding to the multiple target models are determined.
  • the embodiment of the present application determines the prediction result of the data to be predicted based on the prediction results respectively corresponding to multiple target models.
  • Fig. 1 is a schematic diagram of a process corresponding to a model prediction method according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart corresponding to a method for obtaining a first target model according to an embodiment of the present application
  • Fig. 3 is a schematic structural diagram of four first-level sub-models obtained based on an initial model according to an embodiment of the present application;
  • Fig. 4 is a schematic diagram of a model prediction method according to an embodiment of the present application.
  • Fig. 5 is a schematic structural diagram of a model prediction device according to an embodiment of the present application.
  • the specific implementation process of the model prediction method may include the process of model training (training phase) and the process of using multiple target models obtained by training to predict the data to be predicted (prediction phase), or may also include other The specific process is not limited.
  • FIG. 1 is a schematic diagram of a process corresponding to a model prediction method according to an embodiment of the application, and the method includes:
  • Step 101 Obtain data to be predicted.
  • the data to be predicted may include one type of data, or may also include multiple types of data. If the data to be predicted includes one type of data, the data to be predicted can be image data (video and/or picture), or text data (for example, user data, log data, sales records, etc.), or It can be audio data; if the data to be predicted includes multiple types of data, the data to be predicted can be any combination of image data, text data, and audio data, which is not specifically limited.
  • the data to be predicted may be user data provided by Internet marketers, and the user data may include characteristic information such as the user's gender, blood type, height, and weight.
  • the model prediction method in the embodiment of the present application it is possible to determine whether the data to be predicted is a user interested in the products marketed by the marketer after the data to be predicted is predicted.
  • the data to be predicted may be log data on a network platform.
  • the model prediction method in the embodiment of this application it is possible to determine whether the data to be predicted is of Logs of sensitive information.
  • Step 102 Use multiple target models to predict data to be predicted, and obtain prediction results corresponding to the multiple target models.
  • multiple target models can be used to predict the data to be predicted, respectively, to obtain prediction information corresponding to the multiple target models, and then determine multiple target models according to the prediction information corresponding to the multiple target models.
  • Target models correspond to the prediction results.
  • the prediction information corresponding to the target model can be a prediction score.
  • the prediction result can include the first label (such as White samples) and second labels (such as black samples).
  • the prediction score of the target model predicted by the data to be predicted is greater than or equal to the second preset threshold, it can be determined that the prediction result corresponding to the target model is the first label; accordingly, If the prediction score predicted by the target model for the data to be predicted is less than the second preset threshold, it can be determined that the prediction result corresponding to the target model is the second label.
  • the prediction information corresponding to the target model may be prediction hyperplane distribution information corresponding to the data to be predicted.
  • the prediction hyperplane can be preset, for each target model, the target model can be used to map the data to be predicted to one side of the prediction hyperplane, and then the target model corresponding to the location of the target model can be determined according to the location of the data to be predicted. forecast result.
  • the target model maps the data to be predicted to one side of the prediction hyperplane, it can be determined that the prediction result corresponding to the target model is the first label; if the target model maps the data to be predicted to the other side of the prediction hyperplane, then It can be determined that the prediction result corresponding to the target model is the second label.
  • implementation 1 and implementation 2 are only exemplary descriptions of the way to obtain the prediction results corresponding to the target model. In other possible implementations, other methods can also be used to determine the prediction results corresponding to the target model. limited.
  • Step 103 Determine the prediction result of the data to be predicted according to the prediction results respectively corresponding to the multiple target models.
  • the types and quantities of the multiple prediction results can be counted. If the prediction result is the first prediction result, the number of target models is greater than the prediction result as the second prediction The number of target models of the result can determine that the prediction result of the data to be predicted is the first prediction result; the second prediction result can be any prediction result other than the first prediction result among the prediction results respectively corresponding to multiple target models .
  • Table 1 is a schematic diagram of prediction results corresponding to multiple models.
  • Table 1 A schematic representation of the prediction results corresponding to multiple models
  • the prediction results corresponding to the second target model, the third target model, and the fifth target model are all the second label, and the prediction results corresponding to the first target model and the fourth target model are the first label, then It is determined that the prediction result includes the first label and the second label.
  • the number of target models whose prediction result is the first label is two, and the number of target models whose prediction result is the second label is three. Therefore, it can be determined that the second label is the first prediction result, and the first label is the first label.
  • Two prediction results, and the prediction result corresponding to the data to be predicted is the second label.
  • the foregoing embodiment of the present application uses the prediction results corresponding to multiple target models to determine the prediction result of the data to be predicted, compared to the prior art method of determining the prediction result of the data to be predicted by the prediction result corresponding to one target model , It can avoid the technical problem of poor prediction effect caused by the model structure problem of a target model, thereby improving the prediction effect of the model; that is, the model prediction method in the embodiment of this application can be applied to a variety of applications, and The user experience is better.
  • multiple target models may be obtained by training according to methods in the prior art, or may also be obtained by training by those skilled in the art according to actual conditions, and the specifics are not limited.
  • the first target model may be obtained based on the prediction accuracy of the first model on the training data and the prediction accuracy of the first-level sub-model obtained based on the first model on the training data.
  • the first model may be the initial model or based on The Nth level submodel obtained from the initial model.
  • the first target model may be any target model among multiple target models.
  • the generation process of target models other than the first target model can be implemented with reference to the generation process of the first target model. It should be noted that any one of the multiple target models can be generated based on the same first model, that is, if there are N target models, each of the N target models can be Generated based on the same first model.
  • FIG. 2 is a schematic flowchart corresponding to a method for obtaining a first target model provided by an embodiment of the application, and the method includes:
  • Step 201 Obtain multiple first-level sub-models of the first model based on the first model, and use a Bayesian scoring function to filter the multiple first-level sub-models to obtain an optimal first-level sub-model.
  • the first model may be an initial model, or may also be an Nth level sub-model obtained based on the initial model.
  • the initial model can be a random model based on automated machine learning methods. For example, users can control the structure of the automated machine learning system's random combination model by triggering the random generated instructions of the automated machine learning system , Get a random model.
  • the structure of the model may include the number of various network layers set in the model, the arrangement order of the various network layers, the number of convolution kernels, and the value of the convolution kernels. Among them, multiple network layers may include convolutional layers, pooling layers, activation layers, etc., or may also include other network layers, which are not specifically limited.
  • the multiple first-level sub-models of the initial model may be based on the initial model.
  • the structure is randomly generated.
  • multiple first-level sub-models of the initial model can be obtained by adding at least one network layer on the basis of the initial model, or can also be obtained by adjusting the order of the added at least one network layer on the basis of the initial model.
  • FIG. 3 is a schematic structural diagram of four first-level sub-models obtained based on the initial model.
  • the initial model 300 includes a convolutional layer, a pooling layer, and an activation layer that are sequentially set.
  • the number of convolution kernels of the initial model 300 is a1, and the size of the convolution kernel is b1.
  • the number of convolution kernels and the size of the convolution kernels of the first-level sub-model 301 and the first-level sub-model 303 are the same as the initial model 300, and the first-level sub-model 301 includes two convolutions. Layer, an activation layer, and a pooling layer.
  • the first-level sub-model 303 includes a convolutional layer, two activation layers, and a pooling layer set in sequence. Then the first-level sub-model 301 and the first-level sub-model 303 It can be obtained by adding a network layer on the basis of the initial model 300.
  • both the first-level sub-model 302 and the first-level sub-model 304 include a convolution layer, an activation layer, and a pooling layer, and the number of convolution kernels of the first-level sub-model 302 is a2, then The first-level sub-model 302 can be obtained by adjusting the number of convolution kernels of at least one network layer added on the basis of the initial model 300; the size of the convolution kernel of the first-level sub-model 304 is b2, then the first-level sub-model 304 The model 304 may be obtained by adjusting the value of the added convolution kernel of at least one network layer on the basis of the initial model 300.
  • the connection sequence of multiple network layers included in the model can have many possibilities. For example, multiple network layers can be connected in sequence in the manner shown in Figure 3, or multiple network layers can be connected randomly. Not limited.
  • the first-level sub-model 301 may include four network layers, the first and fourth layers are both convolutional layers, the second layer is the pooling layer, and the third layer is the activation layer.
  • the first sub-model 301 may be a convolutional layer, a pooling layer, an activation layer, and a convolutional layer in sequence; in another example, the first sub-model 301 may also be a convolutional layer, an activation layer Layer, pooling layer, convolutional layer and activation layer are connected.
  • the first-level sub-model 301 to the first-level sub-model 304 can be scored respectively using preset scoring rules to obtain the first-level sub-model 301 to the scores of the first-level submodel 304, and then select the first-level submodel with the largest score as the optimal first-level submodel.
  • the preset scoring rules can be set by those skilled in the art according to actual conditions, or can also be determined through experiments, which are not specifically limited.
  • a Bayesian scoring function can be used as the preset scoring rule.
  • the Bayesian scoring function can score the structure of the model. If the structure of the model is better, the score of the model determined by the Bayesian scoring function is higher; correspondingly, if the structure of the model is worse, then The lower the score of the model determined by the Bayesian scoring function.
  • the Bayesian scoring function can include scoring parameters. In actual use, after the Bayesian scoring function is used to score the model, the scoring parameters of the Bayesian scoring function can be evaluated based on the prediction accuracy of the model. Update to make the scoring effect of Bayesian scoring function better.
  • the initial Bayesian scoring function can be used to score multiple first-level sub-models of the initial model.
  • the scoring parameters in the initial Bayesian scoring function can be set by those skilled in the art based on experience, or can also be based on The actual situation is set, and the specific is not limited. Further, after the initial Bayesian scoring function is used to score the first-level sub-model 301 to the first-level sub-model 304, if it is determined that the sub-model with the largest score is the first-level sub-model 302, the first-level sub-model 302 can be The sub-model 302 serves as the optimal first-level sub-model of the initial model.
  • Step 201 specifically describes the implementation process of obtaining the first-level sub-model of the initial model.
  • the first model may be the first-level sub-model of the initial model. Any one of the sub-model 301 to the first-level sub-model 304.
  • the first model may be the optimal first-level sub-model 302 of the initial model. That is, if the first model is the N-th level sub-model of the initial model, the first model may be the first-level sub-model of the N-1 level sub-model of the initial model.
  • the method in step 201 can be used to obtain the four first-level sub-models 311 to 314 of the optimal first-level sub-model 302, where the best first-level The four first-level sub-models 311 to the first-level sub-model 314 of the sub-model 302 are the four second-level sub-models 311 to the second-level sub-model 314 of the initial model; accordingly, the first model may be the initial model Any one of the four second-level sub-models 311 to 314 of the second-level sub-model 314 may also be the optimal second-level sub-model 312 of the initial model. Further, the method in step 201 may be used to obtain the optimal first-level sub-model of the first model.
  • Step 202 Determine the prediction accuracy of the optimal first-level sub-model based on the training data.
  • the training data may be provided by the user, or may also be obtained in advance through various methods (such as the Internet, a questionnaire survey, etc.), and the specifics are not limited.
  • the training data can be divided into first data and second data in advance.
  • the first data can be used to train the model
  • the second data can be used to verify the trained model and determine the training data. effect.
  • the training data may be divided into the first data and the second data according to a preset ratio.
  • the training data includes 1000 pieces of image data. If the preset ratio is 8:2, 800 pieces of image data among the 1000 pieces of image data can be used as the first data, and 800 pieces of image data can be divided from the 1000 pieces of image data. The other 200 pieces of image data are used as the second data.
  • the first data can be input to the model training system, so that the model training system uses the first data to perform model training on the optimal first-level sub-model to obtain The trained model.
  • the trained model can be used to predict the second data, and the prediction accuracy of the optimal first-level sub-model can be determined by counting the number of data in the second data matching the prediction result with the real result.
  • Step 203 Compare the prediction accuracy of the optimal first-level sub-model on the training data with a first preset threshold.
  • the first preset threshold can be set by those skilled in the art based on experience, or can also be determined based on experiments, and is not specifically limited.
  • step 204a if the prediction accuracy of the optimal first-level sub-model on the training data is greater than or equal to the first preset threshold, step 204a can be performed; if the prediction accuracy of the optimal first-level sub-model on the training data is less than For the first preset threshold, step 204b can be executed.
  • Step 204a Determine the optimal first-level submodel as the first target model.
  • the optimal first-level sub-model serves as the first target model.
  • Step 204b comparing the prediction accuracy of the optimal first-level sub-model on the training data with the prediction accuracy of the first model on the training data.
  • the prediction accuracy of the optimal first-level sub-model on the training data is less than the first preset threshold, it can indicate that the prediction effect of the optimal first-level sub-model cannot meet the preset requirements.
  • the prediction accuracy of the first model on the training data can be compared with the prediction accuracy of the optimal first-level sub-model on the training data, and the first model can be updated according to the result of the comparison, and then according to the updated first model Get the first target model.
  • the first data (for example, 800 pieces of image data) can be used to train the first model and the optimal first-level sub-model respectively, and the trained first model and the best first-level trained model can be used
  • the sub-models respectively predict the second data (for example, 200 pieces of image data), and determine the prediction accuracy of the first model for the second data and the prediction accuracy of the optimal first-level sub-model for the second data. If the prediction accuracy of the optimal first-level sub-model on the second data is greater than the prediction accuracy of the first model on the second data, step 205a can be performed, and if the prediction accuracy of the first model on the second data is greater than the optimal For the prediction accuracy of the first-level sub-model on the second data, step 205b may be executed.
  • the optimal first-level sub-model For example, after using the optimal first-level sub-model to predict 200 pieces of image data, it is determined that the prediction results of 150 pieces of image information are the same as the real results, and the prediction results of 50 pieces of image information are different from the real results; use the first model After predicting 200 pieces of image data, it is determined that the prediction result of 100 pieces of image information is the same as the real result, and the prediction result of 100 pieces of image information is different from the real result, it can be determined that the prediction accuracy of the optimal first sub-model is greater than that of the first The accuracy of the prediction result of the model, at this time step 205a can be executed.
  • the model structure of the optimal first-level sub-model and the optimal first-level is updated by the sub-model to the scoring parameters of the Bayesian scoring function to obtain the updated Bayesian scoring function.
  • the updated Bayesian scoring function can be used in the subsequent model scoring process. No description here.
  • Step 205a Determine that the optimal first-level submodel is the updated first model, and execute step 201.
  • the optimal first-level sub-model may be used as the updated first A model, and using the updated first model to repeat steps 201 to 204 until a first target model whose prediction accuracy of the training data is greater than or equal to the first preset threshold is obtained.
  • the first-level sub-model 311 to the first-level sub-model 314 of the optimal first-level sub-model 302 can be obtained according to step 201 (ie Multiple second-level sub-models of the initial model), and then use the updated Bayesian scoring function to score the first-level sub-models 311 to 314 to obtain the optimal first-level sub-model (for example, the first The first-level sub-model 312), and then according to the prediction accuracy of the first-level sub-model 312 on the training data and the prediction accuracy of the optimal first-level sub-model 302 on the training data, the first target model is obtained.
  • Step 205b Determine that the first model is the updated first model, and execute step 201.
  • the first model can be used as the updated first model, and the updated Repeat steps 201 to 204 for the first model of, until a first target model whose prediction accuracy of the training data is greater than or equal to the first preset threshold is obtained. For example, if it is determined that the first model is the updated first model, the first-level sub-model 301 to the first-level sub-model 304 can be discarded, and step 201 can be performed using the first model again to obtain the first level of the first model.
  • Sub-model 305 to first-level sub-model 308 (determined randomly, and may be the same as or different from first-level sub-model 301 to first-level sub-model 304, and is not limited); further, the updated The Bayesian scoring function scores the first-level sub-model 305 to the first-level sub-model 308, and obtains the optimal first-level sub-model (for example, the first-level sub-model 307), which can be evaluated according to the first-level sub-model 307
  • the prediction accuracy of the training data and the prediction accuracy of the first model on the training data are used to obtain the first target model.
  • step 203 is only an example of a condition for determining the end of the loop provided in the embodiment of the present application.
  • the condition for determining the end of the loop can be set by a person skilled in the art according to the actual situation, and is not specifically limited.
  • the second preset threshold can also be preset, and the number of loop executions can be recorded. If the number of loop executions is greater than or equal to the second preset threshold, the end of the loop can be determined, and at this time, the end of the loop can be determined
  • the optimal first-level sub-model at time is the first target model.
  • FIG. 4 is a schematic diagram of a model prediction method provided in an embodiment of the application.
  • the model prediction method may include a training phase and a prediction phase.
  • multiple target models can be obtained through the training phase, and the training process of each target model can be implemented with reference to the method in step 201 to step 204; further, the prediction result of the data to be predicted can be determined through the prediction phase, and the data to be predicted
  • the prediction process can be implemented with reference to the method in step 101 to step 103.
  • an embodiment of the present application also provides a model prediction device, and the specific content of the device can be implemented with reference to the foregoing method.
  • Fig. 5 is a schematic structural diagram of a model prediction device provided by an embodiment of the application, including:
  • the obtaining module 501 is used to obtain data to be predicted
  • the prediction module 502 is configured to use the multiple target models to predict the data to be predicted to obtain the prediction results respectively corresponding to the multiple target models; wherein the first target model is based on the training data of the first model The prediction accuracy and the prediction accuracy of the first-level sub-model obtained based on the first model on the training data are obtained, and the first model is the initial model or the Nth-level sub-model obtained based on the initial model , N is an integer greater than or equal to 1; the first target model is any target model of the multiple target models;
  • the determining module 503 is configured to determine the prediction result of the data to be predicted according to the prediction results respectively corresponding to the multiple target models.
  • the device further includes a training module 504, and the training module 504 is specifically configured to:
  • the prediction accuracy of the first-level sub-model obtained based on the first model on the training data is less than the preset threshold, if the prediction accuracy of the first model on the training data is less than the first level According to the prediction accuracy of the sub-model on the training data, the first target model is obtained according to the first-level sub-model.
  • training module 504 is also used to:
  • the prediction accuracy of the first model on the training data is greater than a preset threshold, it is determined that the first model is the target model.
  • training module 504 is also used to:
  • the first target model is obtained according to the first model.
  • the determining module 503 is used to:
  • the second prediction result is a prediction result other than the first prediction result among the prediction results respectively corresponding to the multiple target models.
  • multiple target models are obtained, and multiple target models are used to predict the data to be predicted, and the prediction results corresponding to the multiple target models are obtained, and then according to the multiple target models Respectively corresponding prediction results, determine the prediction results of the data to be predicted; wherein, any one of the multiple target models is based on the prediction accuracy of the first model on the training data and the first-level sub-model obtained based on the first model Based on the prediction accuracy of the training data, the first model may be the initial model or an Nth-level sub-model obtained based on the initial model.
  • the embodiment of the present application determines the prediction result of the data to be predicted based on the prediction results respectively corresponding to multiple target models.
  • this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware.
  • this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Algebra (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Physiology (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种模型预测方法及装置,其中方法包括:获取带预测数据(步骤101);使用多个目标模型对待预测数据进行预测,得到多个目标模型分别对应的预测结果(步骤102);根据多个目标模型分别对应的预测结果,确定待预测数据的预测结果(步骤103)。该方法基于多个目标模型分别对应的预测结果确定待预测数据的预测结果,可以避免一个目标模型的模型结构问题所导致的预测效果较差,从而提高模型的预测效果;且通过分析第一模型和基于第一模型得到的第一级子模型分别对训练数据的预测精确度,可以选取精确度较高的模型执行后续的训练过程,从而使得训练得到的目标模型更加准确。

Description

一种模型预测方法及装置 技术领域
本申请涉及数据处理技术领域,特别涉及一种模型预测方法及装置。
背景技术
在数据处理技术领域中,机器学习是一个非常热门的研究方向,通常来说,机器学习可以基于训练数据得到目标模型,并使用目标模型对待预测数据进行预测,从而得到待预测数据的预测结果。深度学习系统为一种常用的机器学习方法,具体地说,用户可以通过人工设计深度学习网络模型来构建深度学习系统,通过使用构建得到的深度学习网络模型对训练数据集进行训练,可以得到预测效果较好的目标模型。然而,人工设计深度学习网络模型通常是较为复杂的过程,若需要训练出预测效果较好的目标模型,可能需要用户学习多方面的知识,浪费人力和时间。
发明人发现现有技术至少存在以下问题:为了解决上述问题,现有技术通常采用自动化机器学习方法来训练深度学习网络模型。具体地说,自动化机器学习方法通常依赖于现有的预设训练算法,基于该预设训练算法可以得到模型结构各不相同的多个随机模型,进而可以采用预设筛选规则从多个随机模型中筛选出一个最优模型,并基于用户输入的训练数据对最优模型进行训练,得到目标模型。采用该种方法,用户无需人工设计深度学习网络模型,即可以获取到目标模型。然而,在实际操作中,预设训练算法可能仅适用于一定的应用场合,而无法满足多个用户的需要;在一种可能的情况下,若训练数据较少,采用该种方式训练得到的目标模型通常会具有较差的预测效果。
综上,目前亟需一种模型预测方法,用以提高模型的预测效果。
发明内容
本申请实施例提供一种模型预测方法及装置,用以提高模型的预测效果。
本申请实施例提供的一种模型预测方法,所述方法包括:
获取待预测数据;
使用多个目标模型对所述待预测数据进行预测,得到所述多个目标模型分别对应的预测结果;其中,第一目标模型是根据第一模型对训练数据的预测精确度和基于所述第一模型得到的第一级子模型对所述训练数据的预测精确度得到的,所述第一模型为初始模型或者基于所述初始模型得到的第N级子模型,N为大于或等于1的整数;所述第一目标模型为所述多个目标模型中的任一目标模型;
根据所述多个目标模型分别对应的预测结果,确定所述待预测数据的预测结果。
另外,所述第一目标模型是根据第一模型对训练数据的预测精确度和基于所述第一模型得到的第一级子模型对所述训练数据的预测精确度得到的,包括:
当基于所述第一模型得到的第一级子模型对所述训练数据的预测精确度小于预设阈值时,若所述第一模型对所述训练数据的预测精确度小于所述第一级子模型对所述训练数据的预测精确度,则根据所述第一级子模型得到所述第一目标模型。
另外,所述方法还包括:当所述第一模型对所述训练数据的预测精确度大于预设阈值时,则确定所述第一模型为所述目标模型。
另外,所述方法还包括:若所述第一模型对所述训练数据的预测精确度大于所述第一级子模型对所述训练数据的预测精确度,则根据所述第一模型得到所述第一目标模型。
另外,所述根据所述多个目标模型分别对应的预测结果,确定所述待预 测数据的预测结果,包括:
若预测结果为第一预测结果的目标模型的个数大于预测结果为第二预测结果的目标模型的个数,则确定所述待预测数据的预测结果为所述第一预测结果;所述第二预测结果为所述多个目标模型分别对应的预测结果中除所述第一预测结果以外的预测结果。
本申请实施例提供的一种模型预测装置,所述装置包括:
获取模块,用于获取待预测数据;
预测模块,用于使用多个目标模型对所述待预测数据进行预测,得到所述多个目标模型分别对应的预测结果;其中,第一目标模型是根据第一模型对训练数据的预测精确度和基于所述第一模型得到的第一级子模型对所述训练数据的预测精确度得到的,所述第一模型为初始模型或者基于所述初始模型得到的第N级子模型,N为大于或等于1的整数;所述第一目标模型为所述多个目标模型中的任一目标模型;
确定模块,用于根据所述多个目标模型分别对应的预测结果,确定所述待预测数据的预测结果。
另外,所述装置还包括训练模块,所述训练模块具体用于:当基于所述第一模型得到的第一级子模型对所述训练数据的预测精确度小于预设阈值时,若所述第一模型对所述训练数据的预测精确度小于所述第一级子模型对所述训练数据的预测精确度,则根据所述第一级子模型得到所述第一目标模型。
另外,所述训练模块还用于:当所述第一模型对所述训练数据的预测精确度大于预设阈值时,则确定所述第一模型为所述目标模型。
另外,所述训练模块还用于:若所述第一模型对所述训练数据的预测精确度大于所述第一级子模型对所述训练数据的预测精确度,则根据所述第一模型得到所述第一目标模型。
另外,所述确定模块用于:若预测结果为第一预测结果的目标模型的个数大于预测结果为第二预测结果的目标模型的个数,则确定所述待预测数据的 预测结果为所述第一预测结果;所述第二预测结果为所述多个目标模型分别对应的预测结果中除所述第一预测结果以外的预测结果。
本申请的上述实施例中,获取多个目标模型,并使用多个目标模型对待预测数据进行预测,得到多个目标模型分别对应的预测结果,进而根据多个目标模型分别对应的预测结果,确定待预测数据的预测结果;其中,多个目标模型中的任一目标模型是根据第一模型对训练数据的预测精确度和基于第一模型得到的第一级子模型对训练数据的预测精确度得到的,第一模型可以为初始模型或者基于初始模型得到的第N级子模型。本申请实施例基于多个目标模型分别对应的预测结果确定待预测数据的预测结果,相比于现有技术采用一个目标模型对应的预测结果确定待预测数据的预测结果的方式来说,可以避免一个目标模型的模型结构问题所导致的预测效果较差的技术问题,从而提高模型的预测效果;且,通过分析第一模型和基于第一模型得到的第一级子模型分别对训练数据的预测精确度,可以选取精确度较高的模型执行后续的训练过程,从而使得训练得到的目标模型更加准确;也就是说,本申请实施例中的模型预测方法可以适用于多种应用场合,且用户的体验较好。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定。
图1是根据本申请实施例中的一种模型预测方法对应的流程示意图;
图2是根据本申请实施例中的一种得到第一目标模型的方法对应的流程示意图;
图3是根据本申请实施例中的一种基于初始模型得到的四个第一级子模型的结构示意图;
图4是根据本申请实施例中的一种模型预测方法示意图;
图5是根据本申请实施例中的一种模型预测装置的结构示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请部分实施例进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请部分实施例中,模型预测方法的具体实现过程可以包括模型训练的过程(训练阶段)和使用训练得到的多个目标模型对待预测数据进行预测的过程(预测阶段),或者还可以包括其他的过程,具体不作限定。
图1为本申请实施例涉及一种模型预测方法对应的流程示意图,该方法包括:
步骤101,获取待预测数据。
本申请实施例中,待预测数据可以包括一种类型的数据,或者也可以包括多种类型的数据。若待预测数据包括一种类型的数据,则待预测数据可以为图像数据(视频和/或图片),或者也可以为文本数据(比如,用户的数据、日志数据、销售记录等),或者还可以为音频数据;若待预测数据包括多种类型的数据,则待预测数据可以为图像数据、文本数据、音频数据的任意组合,具体不作限定。
示例性地,在一种可能的应用场景中,待预测数据可以为互联网营销商提供的用户的数据,用户的数据可以包括用户的性别、血型、身高、体重等特征信息。通过采用本申请实施例中的模型预测方法,可以在对待预测数据进行预测后,确定待预测数据是否为对营销商营销的产品感兴趣的用户。在另一种可能的应用场景中,待预测数据可以为网络平台上的日志数据,通过采用本申请实施例中的模型预测方法,可以在对待预测数据进行预测后,确定待预测数据是否为具有敏感信息的日志。
步骤102,使用多个目标模型对待预测数据进行预测,得到多个目标模型分别对应的预测结果。
本申请实施例中,获取待预测数据后,可以使用多个目标模型分别对待预测数据进行预测,得到多个目标模型分别对应的预测信息,进而根据多个目标模型分别对应的预测信息确定多个目标模型分别对应的预测结果。在一种可能的实现方式(为便于描述,简称为实现方式1),目标模型对应的预测信息可以为预测分值,以目标模型为二分类模型为例,预测结果可以包括第一标签(比如白样本)和第二标签(比如黑样本),若目标模型对待预测数据预测的预测分值大于或等于第二预设阈值,则可以确定目标模型对应的预测结果为第一标签;相应地,若目标模型对待预测数据预测的预测分值小于第二预设阈值,则可以确定目标模型对应的预测结果为第二标签。
在另一种可能的实现方式(为便于描述,简称为实现方式1)中,目标模型对应的预测信息可以为待预测数据对应的预测超平面分布信息。具体地说,可以预先设置预测超平面,针对于每一个目标模型,可以使用该目标模型将待预测数据映射至预测超平面的一侧,进而根据待预测数据所在的位置确定该目标模型对应的预测结果。比如,若目标模型将待预测数据映射至预测超平面的一侧,则可以确定目标模型对应的预测结果为第一标签;若目标模型将待预测数据映射至预测超平面的另一侧,则可以确定目标模型对应的预测结果为第二标签。
需要说明的是,实现方式1和实现方式2仅为示例性描述得到目标模型对应的预测结果的方式,在其它可能的实现方式中,也可以采用其它方式确定目标模型对应的预测结果,具体不作限定。
步骤103,根据多个目标模型分别对应的预测结果,确定待预测数据的预测结果。
具体实施中,在确定多个目标模型分别对应的预测结果后,可以统计多个预测结果所属的种类和数量,若预测结果为第一预测结果的目标模型的个数大于预测结果为第二预测结果的目标模型的个数,则可以确定待预测数据的预测结果为第一预测结果;第二预测结果可以为多个目标模型分别对应的预测结 果中除第一预测结果以外的任一预测结果。举例来说明,表1为一种多个模型分别对应的预测结果的示意。
表1:一种多个模型分别对应的预测结果的示意
模型 预测结果
第一目标模型 第一标签
第二目标模型 第二标签
第三目标模型 第二标签
第四目标模型 第一标签
第五目标模型 第二标签
如表1所示,第二目标模型、第三目标模型和第五目标模型对应的预测结果均为第二标签,第一目标模型和第四目标模型对应的预测结果为第一标签,则可以确定预测结果包括第一标签和第二标签。其中,预测结果为第一标签的目标模型的数量为两个,预测结果为第二标签的目标模型的数量为三个,因此,可以确定第二标签为第一预测结果,第一标签为第二预测结果,且待预测数据对应的预测结果为第二标签。
本申请的上述实施例采用基于多个目标模型分别对应的预测结果确定待预测数据的预测结果,相比于现有技术采用一个目标模型对应的预测结果确定待预测数据的预测结果的方式来说,可以避免一个目标模型的模型结构问题所导致的预测效果较差的技术问题,从而提高模型的预测效果;也就是说,本申请实施例中的模型预测方法可以适用于多种应用场合,且用户的体验较好。
本申请实施例中,多个目标模型可以为根据现有技术中的方式训练得到的,或者也可以由本领域技术人员根据实际情况训练得到的,具体不作限定。例如,第一目标模型可以是根据第一模型对训练数据的预测精确度和基于第一模型得到的第一级子模型对训练数据的预测精确度得到的,第一模型可以为初始模型或者基于初始模型得到的第N级子模型。其中,第一目标模型可以为多个目标模型中的任一目标模型。
下面具体描述根据第一模型得到第一目标模型的过程,除第一目标模型以外的目标模型的生成过程可以参照第一目标模型的生成过程进行实现。需要说明的是,多个目标模型中的任一目标模型可以为基于同一个第一模型生成的,也就是说,若存在N个目标模型,则N个目标模型中的每个目标模型均可以基于同一个第一模型进行生成。
图2为本申请实施例提供的一种得到第一目标模型的方法对应的流程示意图,该方法包括:
步骤201,基于第一模型得到第一模型的多个第一级子模型,使用贝叶斯评分函数从多个第一级子模型中筛选得到最优第一级子模型。
此处,第一模型可以为初始模型,或者也可以为基于初始模型得到的第N级子模型。以第一模型是初始模型为例,初始模型可以为基于自动化机器学习方法得到的一个随机模型,比如,用户可以通过触发自动化机器学习系统的随机生成指令,控制自动化机器学习系统随机组合模型的结构,得到随机模型。模型的结构可以包括模型中设置的多种网络层的数量、多种网络层的排列顺序、卷积核的数量以及卷积核的数值等。其中,多种网络层可以包括卷积层、池化层、激活层等,或者也可以包括其它网络层,具体不作限定。
具体实施中,根据初始模型得到初始模型的多个第一级子模型的方式可以有多种,在一种可能的实现方式中,初始模型的多个第一级子模型可以为基于初始模型的结构随机生成的。比如,初始模型的多个第一级子模型可以为在初始模型的基础上增加至少一个网络层得到的,或者也可以为在初始模型的基础上调整增加的至少一个网络层的排列顺序得到的,或者也可以为在初始模型的基础上调整增加的至少一个网络层的卷积核的数量得到的,或者也可以为在初始模型的基础上调整增加的至少一个网络层的卷积核的数值得到的,或者还可以为采用上述的任意组合得到的,具体不做限定。
举例来说明,图3为基于初始模型得到的四个第一级子模型的结构示意图,如图3所示,初始模型300包括依次设置的一个卷积层、一个池化层和一 个激活层,初始模型300的卷积核的数量为a1,卷积核的大小为b1。根据图3所示,第一级子模型301和第一级子模型303的卷积核的数量和卷积核的大小均与初始模型300相同,且第一级子模型301包括两个卷积层、一个激活层和一个池化层,第一级子模型303包括依次设置的一个卷积层、两个激活层、一个池化层,则第一级子模型301和第一级子模型303可以为在初始模型300的基础上增加网络层得到的。相应地,第一级子模型302和第一级子模型304均包括一个卷积层、一个激活层和一个池化层,且第一级子模型302的卷积核的数量为a2,则第一级子模型302可以为在初始模型300的基础上调整增加的至少一个网络层的卷积核的数量得到的;第一级子模型304的卷积核的大小为b2,则第一级子模型304可以为在初始模型300的基础上调整增加的至少一个网络层的卷积核的数值得到的。
需要说明的是,模型所包括的多个网络层的连接顺序可以有多种可能,比如,可以按照图3所示意的方式依次连接多个网络层,或者也可以随机连接多个网络层,具体不做限定。如图3所示,第一级子模型301可以包括四个网络层,第一层和第四层均为卷积层,第二层为池化层,第三层为激活层。在一个示例中,第一子模型301可以为卷积层、池化层、激活层和卷积层依次连接构成的;在另一个示例中,第一子模型301也可以为卷积层、激活层、池化层、卷积层和激活层连接构成的。
本申请实施例中,在得到初始模型的四个第一级子模型后,可以使用预设评分规则对第一级子模型301~第一级子模型304分别进行评分,得到第一级子模型301~第一级子模型304的分值,进而选择分值最大的第一级子模型作为最优第一级子模型。具体实施中,预设评分规则可以由本领域技术人员根据实际情况进行设置,或者也可以通过实验进行确定,具体不作限定。
例如,可以采用贝叶斯评分函数作为预设评分规则。具体地说,贝叶斯评分函数可以对模型的结构进行评分,若模型的结构越好,则通过贝叶斯评分函数确定的模型的评分越高;相应地,若模型的结构越差,则通过贝叶斯评分 函数确定的模型的评分越低。在一个示例中,贝叶斯评分函数中可以包括评分参数,在实际使用中,采用贝叶斯评分函数对模型进行评分后,可以基于模型的预测精确度对贝叶斯评分函数的评分参数进行更新,以使贝叶斯评分函数的评分效果更好。
具体实施中,可以使用初始贝叶斯评分函数对初始模型的多个第一级子模型进行评分,初始贝叶斯评分函数中的评分参数可以由本领域技术人员根据经验进行设置,或者也可以根据实际情况进行设置,具体不作限定。进一步地,采用初始贝叶斯评分函数分别对第一级子模型301~第一级子模型304进行评分后,若确定评分最大的子模型为第一级子模型302,则可以将第一级子模型302作为初始模型的最优第一级子模型。
步骤201具体描述了得到初始模型的第一级子模型的实现过程,本申请实施例中,若第一模型为初始模型的第一级子模型,则第一模型可以为初始模型的第一级子模型301~第一级子模型304中的任意一个。例如,第一模型可以为初始模型的最优第一级子模型302。也就是说,若第一模型为初始模型的第N级子模型,则第一模型可以为初始模型的第N-1级子模型的第一级子模型。举例来说明,若N=2,则可以采用步骤201中的方法得到最优第一级子模型302的四个第一级子模型311~第一级子模型314,其中,最优第一级子模型302的四个第一级子模型311~第一级子模型314即为初始模型的四个第二级子模型311~第二级子模型314;相应地,第一模型可以为初始模型的四个第二级子模型311~第二级子模型314中的任意一个,或者也可以为初始模型的最优第二级子模型312。进一步地,可以采用步骤201中的方法获取第一模型的最优第一级子模型。
步骤202,基于训练数据确定最优第一级子模型的预测精确度。
此处,训练数据可以为用户提供的,或者也可以为预先通过多种方式(比如互联网、问卷调查等)获取的,具体不做限定。本申请实施例中,可以预先将训练数据划分为第一数据和第二数据,第一数据可以用于训练模型,第二数 据可以用于对训练得到的模型进行验证,确定训练得到的模型的效果。具体地说,对训练数据划分的方式可以有多种,比如,可以按照预设比例将训练数据划分为第一数据和第二数据。举例来说,训练数据包括1000条图像数据,若预设比例为8:2,则可以将1000条图像数据中的800条图像数据作为第一数据,将1000条图像数据中除800条图像数据以外的200条图像数据作为第二数据。
具体实施中,可以在模型训练系统中加载最优第一级子模型后,将第一数据输入模型训练系统,使得模型训练系统使用第一数据对最优第一级子模型进行模型训练,得到训练后的模型。进一步地,可以使用训练后的模型对第二数据进行预测,通过统计第二数据中预测结果和真实结果匹配的数据的数量,确定最优第一级子模型的预测精确度。
步骤203,将最优第一级子模型对训练数据的预测精确度与第一预设阈值进行对比。
此处,第一预设阈值可以由本领域技术人员根据经验进行设置,或者也可以根据实验确定,具体不作限定。具体实施中,若最优第一级子模型对训练数据的预测精确度大于或等于第一预设阈值,则可以执行步骤204a;若最优第一级子模型对训练数据的预测精确度小于第一预设阈值,则可以执行步骤204b。
步骤204a,确定最优第一级子模型为第一目标模型。
此处,若最优第一级子模型对训练数据的预测精确度大于或等于第一预设阈值,则可以说明最优第一级子模型的预测效果较好,此时,可以将最优第一级子模型作为第一目标模型。
步骤204b,将最优第一级子模型对训练数据的预测精确度与第一模型对训练数据的预测精确度进行对比。
本申请实施例中,若最优第一级子模型对训练数据的预测精确度小于第一预设阈值,则可以说明最优第一级子模型的预测效果不能满足预设要求,此时,可以将第一模型对训练数据的预测精确度和最优第一级子模型对训练数据的预测精确度进行对比,并根据对比的结果对第一模型进行更新,进而根据更 新后的第一模型得到第一目标模型。
具体实施中,可以使用第一数据(比如,800条图像数据)分别对第一模型和最优第一级子模型进行训练,并使用训练后的第一模型和训练后的最优第一级子模型分别对第二数据(比如,200条图像数据)进行预测,确定第一模型对第二数据的预测精确度和最优第一级子模型对第二数据的预测精确度。若最优第一级子模型对第二数据的预测精确度大于第一模型对第二数据的预测精确度,则可以执行步骤205a,若第一模型对第二数据的预测精确度大于最优第一级子模型对第二数据的预测精确度,则可以执行步骤205b。
举例来说,使用最优第一级子模型对200条图像数据进行预测后,确定150条图像信息的预测结果与真实结果相同,50条图像信息的预测结果与真实结果不同;使用第一模型对200条图像数据进行预测后,确定100条图像信息的预测结果与真实结果相同,100条图像信息的预测结果与真实结果不同,则可以确定最优第一子模型的预测精确度大于第一模型的预测结果精确度,此时可以执行步骤205a。
在一种可能的实现方式中,在确定最优第一级子模型对训练数据的预测精确度小于第一预设阈值后,可以根据最优第一级子模型的模型结构和最优第一级子模型对训练数据的预测精确度对贝叶斯评分函数的评分参数进行更新,得到更新后的贝叶斯评分函数,更新后的贝叶斯评分函数可以用于后续的模型评分过程,此处不做描述。
步骤205a,确定最优第一级子模型为更新后的第一模型,并执行步骤201。
本申请实施例中,若最优第一级子模型对第二数据的预测精确度大于第一模型对第二数据的预测精确度,则可以将最优第一级子模型作为更新后的第一模型,并使用更新后的第一模型重复执行步骤201~步骤204,直至得到对训练数据的预测精确度大于或等于第一预设阈值的第一目标模型。比如,若确定最优第一级子模型302为更新后的第一模型,则可以根据步骤201得到最优第一级子模型302的第一级子模型311~第一级子模型314(即初始模型的多个第二级 子模型),进而使用更新后的贝叶斯评分函数对第一级子模型311~第一级子模型314进行评分,得到最优第一级子模型(比如第一级子模型312),进而根据第一级子模型312对训练数据的预测精确度和最优第一级子模型302对训练数据的预测精确度,得到第一目标模型。
步骤205b,确定第一模型为更新后的第一模型,并执行步骤201。
此处,若第一模型对第二数据的预测精确度大于最优第一级子模型对第二数据的预测精确度,则可以将第一模型作为更新后的第一模型,并使用更新后的第一模型重复执行步骤201~步骤204,直至得到对训练数据的预测精确度大于或等于第一预设阈值的第一目标模型。比如,若确定第一模型为更新后的第一模型,则可以将第一级子模型301~第一级子模型304抛弃,重新使用第一模型执行步骤201,得到第一模型的第一级子模型305~第一级子模型308(随机确定的,与第一级子模型301~第一级子模型304可以相同,或者也可以不同,不做限定);进一步地,可以使用更新后的贝叶斯评分函数对第一级子模型305~第一级子模型308进行评分,得到最优第一级子模型(比如第一级子模型307),并可以根据第一级子模型307对训练数据的预测精确度和第一模型对训练数据的预测精确度,得到第一目标模型。
需要说明的是,步骤203仅为本申请实施例中提供的一种确定循环结束的条件示例,具体实施中,确定循环结束的条件可以由本领域技术人员根据实际情况进行设置,具体不作限定。在另一个示例中,也可以预先设置第二预设阈值,并记录循环执行的次数,若循环执行的次数大于或等于第二预设阈值,则可以确定循环结束,此时,可以确定循环结束时的最优第一级子模型为第一目标模型。
图4为本申请实施例中提供的一种模型预测方法示意图,如图4所示,该模型预测方法可以包括训练阶段和预测阶段。其中,通过训练阶段可以得到多个目标模型,每个目标模型的训练过程可以参照步骤201~步骤204中的方式进行实现;进一步地,通过预测阶段可以确定待预测数据的预测结果,对待预测 数据的预测过程可以参照步骤101~步骤103中的方式进行实现。
针对上述方法流程,本申请实施例还提供一种模型预测装置,该装置的具体内容可以参照上述方法实施。
图5为本申请实施例提供的一种模型预测装置的结构示意图,包括:
获取模块501,用于获取待预测数据;
预测模块502,用于使用所述多个目标模型对所述待预测数据进行预测,得到所述多个目标模型分别对应的预测结果;其中,第一目标模型是根据第一模型对训练数据的预测精确度和基于所述第一模型得到的第一级子模型对所述训练数据的预测精确度得到的,所述第一模型为初始模型或者基于所述初始模型得到的第N级子模型,N为大于或等于1的整数;所述第一目标模型为所述多个目标模型中的任一目标模型;
确定模块503,用于根据所述多个目标模型分别对应的预测结果,确定所述待预测数据的预测结果。
另外,所述装置还包括训练模块504,所述训练模块504具体用于:
当基于所述第一模型得到的第一级子模型对所述训练数据的预测精确度小于预设阈值时,若所述第一模型对所述训练数据的预测精确度小于所述第一级子模型对所述训练数据的预测精确度,则根据所述第一级子模型得到所述第一目标模型。
另外,所述训练模块504还用于:
当所述第一模型对所述训练数据的预测精确度大于预设阈值时,则确定所述第一模型为所述目标模型。
另外,所述训练模块504还用于:
若所述第一模型对所述训练数据的预测精确度大于所述第一级子模型对所述训练数据的预测精确度,则根据所述第一模型得到所述第一目标模型。
另外,所述确定模块503用于:
若预测结果为第一预测结果的目标模型的个数大于预测结果为第二预 测结果的目标模型的个数,则确定所述待预测数据的预测结果为所述第一预测结果;所述第二预测结果为所述多个目标模型分别对应的预测结果中除所述第一预测结果以外的预测结果。
从上述内容可以看出:本申请的上述实施例中,获取多个目标模型,并使用多个目标模型对待预测数据进行预测,得到多个目标模型分别对应的预测结果,进而根据多个目标模型分别对应的预测结果,确定待预测数据的预测结果;其中,多个目标模型中的任一目标模型是根据第一模型对训练数据的预测精确度和基于第一模型得到的第一级子模型对训练数据的预测精确度得到的,第一模型可以为初始模型或者基于初始模型得到的第N级子模型。本申请实施例基于多个目标模型分别对应的预测结果确定待预测数据的预测结果,相比于现有技术采用一个目标模型对应的预测结果确定待预测数据的预测结果的方式来说,可以避免一个目标模型的模型结构问题所导致的预测效果较差的技术问题,从而提高模型的预测效果;且,通过分析第一模型和基于第一模型得到的第一级子模型分别对训练数据的预测精确度,可以选取精确度较高的模型执行后续的训练过程,从而使得训练得到的目标模型更加准确;也就是说,本申请实施例中的模型预测方法可以适用于多种应用场合,且用户的体验较好。
本领域内的技术人员应明白,本申请的实施例可提供为方法、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计 算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请的多个实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括多个实施例以及落入本申请范围的所有变更和修改。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (10)

  1. 一种模型预测方法,其中,所述方法包括:
    获取待预测数据;
    使用多个目标模型对所述待预测数据进行预测,得到所述多个目标模型分别对应的预测结果;其中,第一目标模型是根据第一模型对训练数据的预测精确度和基于所述第一模型得到的第一级子模型对所述训练数据的预测精确度得到的,所述第一模型为初始模型或者基于所述初始模型得到的第N级子模型,N为大于或等于1的整数;所述第一目标模型为所述多个目标模型中的任一目标模型;
    根据所述多个目标模型分别对应的预测结果,确定所述待预测数据的预测结果。
  2. 根据权利要求1所述的方法,其中,所述第一目标模型是根据第一模型对训练数据的预测精确度和基于所述第一模型得到的第一级子模型对所述训练数据的预测精确度得到的,包括:
    当基于所述第一模型得到的第一级子模型对所述训练数据的预测精确度小于预设阈值时,若所述第一模型对所述训练数据的预测精确度小于所述第一级子模型对所述训练数据的预测精确度,则根据所述第一级子模型得到所述第一目标模型。
  3. 根据权利要求2所述的方法,其中,所述方法还包括:
    当所述第一模型对所述训练数据的预测精确度大于预设阈值时,则确定所述第一模型为所述目标模型。
  4. 根据权利要求2所述的方法,其中,所述方法还包括:
    若所述第一模型对所述训练数据的预测精确度大于所述第一级子模型对所述训练数据的预测精确度,则根据所述第一模型得到所述第一目标模型。
  5. 根据权利要求1至4中任一项所述的方法,其中,所述根据所述多个目标模型分别对应的预测结果,确定所述待预测数据的预测结果,包括:
    若预测结果为第一预测结果的目标模型的个数大于预测结果为第二预测结果的目标模型的个数,则确定所述待预测数据的预测结果为所述第一预测结果;所述第二预测结果为所述多个目标模型分别对应的预测结果中除所述第一预测结果以外的预测结果。
  6. 一种模型预测装置,其中,所述装置包括:
    获取模块,用于获取待预测数据;
    预测模块,用于使用多个目标模型对所述待预测数据进行预测,得到所述多个目标模型分别对应的预测结果;其中,第一目标模型是根据第一模型对训练数据的预测精确度和基于所述第一模型得到的第一级子模型对所述训练数据的预测精确度得到的,所述第一模型为初始模型或者基于所述初始模型得到的第N级子模型,N为大于或等于1的整数;所述第一目标模型为所述多个目标模型中的任一目标模型;
    确定模块,用于根据所述多个目标模型分别对应的预测结果,确定所述待预测数据的预测结果。
  7. 根据权利要求6所述的装置,其中,所述装置还包括训练模块,所述训练模块具体用于:
    当基于所述第一模型得到的第一级子模型对所述训练数据的预测精确度小于预设阈值时,若所述第一模型对所述训练数据的预测精确度小于所述第一级 子模型对所述训练数据的预测精确度,则根据所述第一级子模型得到所述第一目标模型。
  8. 根据权利要求7所述的装置,其中,所述训练模块还用于:
    当所述第一模型对所述训练数据的预测精确度大于预设阈值时,则确定所述第一模型为所述目标模型。
  9. 根据权利要求7所述的装置,其中,所述训练模块还用于:
    若所述第一模型对所述训练数据的预测精确度大于所述第一级子模型对所述训练数据的预测精确度,则根据所述第一模型得到所述第一目标模型。
  10. 根据权利要求6至9中任一项所述的装置,其中,所述确定模块用于:
    若预测结果为第一预测结果的目标模型的个数大于预测结果为第二预测结果的目标模型的个数,则确定所述待预测数据的预测结果为所述第一预测结果;所述第二预测结果为所述多个目标模型分别对应的预测结果中除所述第一预测结果以外的预测结果。
PCT/CN2019/077237 2019-01-31 2019-03-06 一种模型预测方法及装置 Ceased WO2020155300A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19894391.2A EP3712825A4 (en) 2019-01-31 2019-03-06 MODEL PREDICTION METHOD AND DEVICE
US16/908,589 US20200320419A1 (en) 2019-01-31 2020-06-22 Method and device of classification models construction and data prediction

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910096138.9 2019-01-31
CN201910096138.9A CN109800890A (zh) 2019-01-31 2019-01-31 一种模型预测方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/908,589 Continuation US20200320419A1 (en) 2019-01-31 2020-06-22 Method and device of classification models construction and data prediction

Publications (1)

Publication Number Publication Date
WO2020155300A1 true WO2020155300A1 (zh) 2020-08-06

Family

ID=66560714

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077237 Ceased WO2020155300A1 (zh) 2019-01-31 2019-03-06 一种模型预测方法及装置

Country Status (4)

Country Link
US (1) US20200320419A1 (zh)
EP (1) EP3712825A4 (zh)
CN (1) CN109800890A (zh)
WO (1) WO2020155300A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112070093A (zh) * 2020-09-22 2020-12-11 网易(杭州)网络有限公司 生成图像分类模型的方法、图像分类方法、装置和设备
CN113407680A (zh) * 2021-06-30 2021-09-17 竹间智能科技(上海)有限公司 异质集成模型筛选方法和电子设备

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110390425A (zh) * 2019-06-20 2019-10-29 阿里巴巴集团控股有限公司 预测方法以及装置
US20210241147A1 (en) * 2020-11-02 2021-08-05 Beijing More Health Technology Group Co. Ltd. Method and device for predicting pair of similar questions and electronic equipment
US11497001B2 (en) * 2020-11-19 2022-11-08 Kabushiki Kaisha Toshiba Edge-intelligence for stability guaranteed real-time control systems
US12254401B2 (en) * 2020-12-09 2025-03-18 Micron Technology, Inc. Artificial neural network model selection
CN113823411A (zh) * 2021-09-26 2021-12-21 萱闱(北京)生物科技有限公司 风险预测模型的训练方法、装置、介质和计算设备
CN114187980A (zh) * 2022-02-15 2022-03-15 北京晶泰科技有限公司 模型训练方法、模型预测方法、分子筛选方法及其装置
CN117009797B (zh) * 2022-04-24 2025-12-16 腾讯科技(深圳)有限公司 分类模型训练方法、用户分类方法、装置及电子设备
CN115471698B (zh) * 2022-09-06 2023-06-30 湖南经研电力设计有限公司 基于深度学习网络的输变电工程遥感图像分类方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102693452A (zh) * 2012-05-11 2012-09-26 上海交通大学 基于半监督回归学习的多模型软测量方法
CN106931453A (zh) * 2017-02-27 2017-07-07 浙江大学 循环流化床生活垃圾焚烧锅炉NOx排放的预测系统及方法
CN107038442A (zh) * 2017-03-27 2017-08-11 新智认知数据服务有限公司 一种基于深度学习的车牌检测和整体识别方法
US10163062B2 (en) * 2015-03-13 2018-12-25 Carrier Corporation Methods and systems for predicting erroneous behavior of an energy asset using fourier based clustering technique

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899658A (zh) * 2015-06-12 2015-09-09 哈尔滨工业大学 基于时间序列预测模型适用性量化的预测模型选择方法
US10504029B2 (en) * 2015-06-30 2019-12-10 Microsoft Technology Licensing, Llc Personalized predictive models
CN108509727B (zh) * 2018-03-30 2022-04-08 深圳市智物联网络有限公司 数据建模中的模型选择处理方法及装置
CN109145245B (zh) * 2018-07-26 2024-11-29 腾讯科技(北京)有限公司 预测点击率的方法、装置、计算机设备及存储介质
CN109035250B (zh) * 2018-09-11 2021-10-01 中国科学技术大学 建立年龄预测模型的方法及装置、年龄预测方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102693452A (zh) * 2012-05-11 2012-09-26 上海交通大学 基于半监督回归学习的多模型软测量方法
US10163062B2 (en) * 2015-03-13 2018-12-25 Carrier Corporation Methods and systems for predicting erroneous behavior of an energy asset using fourier based clustering technique
CN106931453A (zh) * 2017-02-27 2017-07-07 浙江大学 循环流化床生活垃圾焚烧锅炉NOx排放的预测系统及方法
CN107038442A (zh) * 2017-03-27 2017-08-11 新智认知数据服务有限公司 一种基于深度学习的车牌检测和整体识别方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3712825A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112070093A (zh) * 2020-09-22 2020-12-11 网易(杭州)网络有限公司 生成图像分类模型的方法、图像分类方法、装置和设备
CN113407680A (zh) * 2021-06-30 2021-09-17 竹间智能科技(上海)有限公司 异质集成模型筛选方法和电子设备

Also Published As

Publication number Publication date
EP3712825A1 (en) 2020-09-23
EP3712825A4 (en) 2021-05-12
US20200320419A1 (en) 2020-10-08
CN109800890A (zh) 2019-05-24

Similar Documents

Publication Publication Date Title
WO2020155300A1 (zh) 一种模型预测方法及装置
US20230252327A1 (en) Neural architecture search for convolutional neural networks
US11900232B2 (en) Training distilled machine learning models
US11586941B2 (en) Recommendation method and apparatus
US11386137B2 (en) Dynamic feedback in a recommendation system
CN111095293A (zh) 图像美学处理方法及电子设备
WO2018170454A2 (en) Using different data sources for a predictive model
JP2018517959A (ja) ビデオのための代表ビデオフレームの選択
US11275994B2 (en) Unstructured key definitions for optimal performance
CN114359563B (zh) 模型训练方法、装置、计算机设备和存储介质
CN108833458A (zh) 一种应用推荐方法、装置、介质及设备
CN108322317A (zh) 一种账号识别关联方法及服务器
US20250148280A1 (en) Techniques for learning co-engagement and semantic relationships using graph neural networks
CN108229572B (zh) 一种参数寻优方法及计算设备
US10878339B2 (en) Leveraging machine learning to predict user generated content
US20240095551A1 (en) Systems and methods for successive feature imputation using machine learning
CN117009621A (zh) 信息搜索方法、装置、电子设备、存储介质及程序产品
CN114820409B (zh) 图像异常检测方法、装置、电子设备及存储介质
CN109740743A (zh) 一种分层神经网络查询推荐方法及装置
US11531887B1 (en) Disruptive prediction with ordered treatment candidate bins
CN112686278B (zh) 模型获取方法、装置及存储介质
CN113407680B (zh) 异质集成模型筛选方法和电子设备
CN110688371B (zh) 数据调整方法、装置、电子设备及存储介质
CN117851355A (zh) 用于边节点的数据缓存方法、装置、设备及介质
GB2642392A (en) App-specific learning with privacy preserving

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2019894391

Country of ref document: EP

Effective date: 20200616

NENP Non-entry into the national phase

Ref country code: DE