CN117575412A - Model training method, device, equipment and medium for charge quality prediction - Google Patents

Model training method, device, equipment and medium for charge quality prediction Download PDF

Info

Publication number
CN117575412A
CN117575412A CN202311585760.9A CN202311585760A CN117575412A CN 117575412 A CN117575412 A CN 117575412A CN 202311585760 A CN202311585760 A CN 202311585760A CN 117575412 A CN117575412 A CN 117575412A
Authority
CN
China
Prior art keywords
training
model
data
support vector
quality prediction
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
CN202311585760.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.)
Beijing Institute of Technology BIT
Original Assignee
Beijing Institute of Technology BIT
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 Beijing Institute of Technology BIT filed Critical Beijing Institute of Technology BIT
Priority to CN202311585760.9A priority Critical patent/CN117575412A/en
Publication of CN117575412A publication Critical patent/CN117575412A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06395Quality analysis or management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/27Regression, e.g. linear or logistic regression
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/04Manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Educational Administration (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Manufacturing & Machinery (AREA)
  • Health & Medical Sciences (AREA)
  • Game Theory and Decision Science (AREA)
  • Primary Health Care (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • General Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a model training method, a device, equipment and a medium for charge quality prediction, wherein the method comprises the following steps: acquiring a historical charging data set, wherein the historical charging data set comprises charging process parameter data and corresponding quality data; dividing a historical charging data set into a plurality of training sets and a plurality of test sets according to a cross-validation method, wherein one training set corresponds to one test set; training the support vector regression model through a plurality of groups of training sets based on a Bayesian optimization algorithm to obtain a plurality of training models; obtaining a performance evaluation result of each training model according to the corresponding test set; and under the condition that the performance evaluation result meets the preset evaluation condition, determining a quality prediction model. The quality prediction model of the embodiment of the invention can improve the measurement efficiency and accuracy of the charge quality.

Description

Model training method, device, equipment and medium for charge quality prediction
Technical Field
The invention relates to the technical field of quality prediction, in particular to a model training method, device, equipment and medium for charge quality prediction.
Background
With the continued development of weapon technology, a great deal of modern high-performance weaponry emerges, and one of the most important factors affecting the performance of such weaponry is charge quality. At present, most of charge process research and development are more traditional, and charge quality is mainly measured by a more traditional method such as a drainage method, so that the problems of complex production process, long production period, lower production efficiency and the like are caused.
In recent years, machine learning and deep learning are increasingly widely applied in the field of quality prediction, but are less applied in the field of charge compression molding quality prediction, and the accuracy of traditional prediction models on charge quality prediction is lower.
Disclosure of Invention
The invention aims to provide a model training method, device, equipment and medium for charge quality prediction, which are used for solving the problem of low efficiency and accuracy of charge quality measurement in the prior art.
In order to solve the above technical problems, an embodiment of the present invention provides a model training method for charge quality prediction, including:
acquiring a historical charging data set, wherein the historical charging data set comprises technological parameter data and corresponding quality data of charging;
dividing the historical charge data set into a plurality of training sets and a plurality of test sets according to a cross-validation method, wherein one training set corresponds to one test set;
training the support vector regression model through a plurality of groups of training sets based on a Bayesian optimization algorithm to obtain a plurality of training models;
obtaining a performance evaluation result of each training model according to the corresponding test set;
and under the condition that the performance evaluation result meets a preset evaluation condition, determining a quality prediction model.
Optionally, before acquiring the historical charge data set, the method further comprises:
acquiring a plurality of groups of historical charging data, wherein each group of historical charging data comprises raw data of charging process parameters and corresponding quality data;
and carrying out normalization processing and correlation analysis on the original data to obtain the process parameter data.
Optionally, dividing the historical charge data set into a plurality of training sets and a plurality of test sets according to a cross-validation method, comprising:
dividing the historical charge data set into K mutually exclusive data subsets according to a K-fold cross validation method, wherein K is an integer greater than 1;
sequentially determining each data subset as a test set;
and under the condition that any one of the data subsets is a test set, determining the rest K-1 data subsets as a group of training sets.
Optionally, based on a bayesian optimization algorithm, training the support vector regression model through multiple sets of training sets to obtain multiple training models, including:
respectively inputting a plurality of groups of training sets into a plurality of support vector regression models, and training the plurality of support vector regression models;
determining optimal parameters of each support vector regression model based on a Bayesian optimization algorithm according to preset parameters of each support vector regression model to obtain a plurality of training models;
wherein a set of the training sets corresponds to one of the support vector regression models and one of the support vector regression models corresponds to one of the training models.
Optionally, determining the optimal parameter of each support vector regression model based on a bayesian optimization algorithm according to the preset parameter of each support vector regression model to obtain a plurality of training models, including:
according to preset parameters of each support vector regression model, a plurality of objective function models are built through a Gaussian process model based on a Bayesian optimization algorithm, wherein one support vector regression model corresponds to one objective function model;
according to a Bayesian formula, the mean value and the variance of the probability distribution function in each objective function model are obtained;
based on an acquisition function, determining the optimal parameter of each support vector regression model according to the mean value and the variance corresponding to each objective function model;
and determining a plurality of training models according to the optimal parameters of the support vector regression models.
Optionally, obtaining a performance evaluation result of each training model according to the corresponding test set includes:
respectively inputting the process parameter data in a plurality of test sets into the corresponding training models to obtain quality prediction results of the plurality of test sets;
and evaluating according to the quality data in each test set and the corresponding quality prediction result to obtain a performance evaluation result of each training model.
Optionally, in a case that the performance evaluation result meets a preset evaluation condition, determining the quality prediction model includes:
carrying out average value operation on the performance evaluation results of each training model to obtain average evaluation results;
and under the condition that the average evaluation result meets a preset evaluation condition, determining the training model corresponding to the highest performance evaluation result as the quality prediction model.
Optionally, the method further comprises:
and under the condition that the performance evaluation result does not meet the preset evaluation condition, updating the training model based on a Bayesian optimization algorithm.
The embodiment of the invention also provides a model training device for predicting the charge quality, which comprises the following components:
the first acquisition module is used for acquiring a historical charging data set, wherein the historical charging data set comprises charging process parameter data and corresponding quality data;
the first dividing module is used for dividing the historical charging data set into a plurality of groups of training sets and a plurality of test sets according to a cross-validation method, wherein one group of training sets corresponds to one test set;
the first training module is used for training the support vector regression model through a plurality of groups of training sets based on a Bayesian optimization algorithm to obtain a plurality of training models;
the first evaluation module is used for obtaining a performance evaluation result of each training model according to the corresponding test set;
the first determining module is used for determining a quality prediction model under the condition that the performance evaluation result meets a preset evaluation condition.
The embodiment of the invention also provides a network device, which comprises: a processor, a memory and a program stored on the memory and executable on the processor, which when executed by the processor implements the model training method for charge quality prediction as claimed in any one of the preceding claims.
The embodiment of the invention also provides a readable storage medium, which comprises: the readable storage medium has stored thereon a program which, when executed by a processor, implements the steps of the model training method for charge quality prediction as described in any of the above.
At least one of the above technical solutions of the invention has the following beneficial effects:
in the scheme, the historical charging data set is divided according to the cross verification method, and the training set and the testing set are determined; training the support vector regression model according to the training set, and optimizing parameters in the support vector regression model by adopting a Bayesian optimization algorithm to obtain a training model; and evaluating the training model according to the test set, and determining a quality prediction model meeting preset conditions. According to the embodiment of the invention, the problem of small data sample size in the historical charge data set can be solved by adopting the cross verification method, the data overfitting is avoided, and the efficiency and the accuracy of charge quality prediction can be improved by using the quality prediction model obtained by training and optimizing the support vector regression model based on the Bayesian optimization algorithm.
Drawings
FIG. 1 is a flow chart of a model training method for charge quality prediction according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of model training by the 5-fold cross-validation method according to the embodiment of the present invention;
FIG. 3 is one of the flow charts of a model training method for charge quality prediction employing an embodiment of the present invention;
FIG. 4 is a second flow chart of a model training method for charge quality prediction using an embodiment of the present invention;
FIG. 5 is a predicted comparison line graph of a quality prediction model according to an embodiment of the present invention;
FIG. 6 is a graph of a predictive contrast line of a prior art conventional support vector regression model;
fig. 7 is a schematic structural diagram of a model training device for charge quality prediction according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment of the invention provides a model training method for charge quality prediction, which is used for carrying out model training on a support vector regression model (support vector regression, SVR), wherein the support vector regression is a regression method based on a support vector machine, and aims to find an optimal hyperplane in a sample space to realize modeling of a regression process, and the model training process of the SVR is described as follows:
assume that there is a training sample set T = { (x) i ,y i ) I=1, 2,..n }, where x is i Refers to the input vector of the ith sample, y i Refers to the output value of the ith sample, and n is the total number of samples.
In general regression problems, the quality of the regression effect, i.e., the loss function, is measured by the difference between the regression model f (x) =wx+b and the true value y, where the loss is 0 when f (x) coincides with y, but in support vector regression, there is a tolerance ε, and the loss is calculated when |f (x) -y| > ε. So the SVR problem can be formalized as:s.t.|y i -f(x i )|≤ε,i=1,2,...n;
on the basis of this, for each sample point (x i ,y i ) Introducing a relaxation variable ζ i ,ζ i ≥0;
When the sample point (x i ,y i ) Satisfy |y i -f(x i ) Zeta when the I is less than or equal to epsilon i =0;
When the sample point (x i ,y i ) Does not satisfy |y i -f(x i ) When the I is less than or equal to epsilon, a relaxation variable zeta exists i So that |y i -f(x i )|≤ε+ζ i The above formula is true, the absolute value is removed, expressed asAnd y i -f(x i )≤ε+ζ i
From the above constraint, it is necessary to make the relaxation variables ζ of the respective sample points as small as possible in addition to the square of the two norms of the weight w i As small as possible, the constrained optimization original problem of SVR is obtained:
wherein C > 0 is a penalty coefficient, representing the constraint degree of regression, and the adaptation capacity of the SVR is controlled by adjusting the magnitude of the penalty parameter C.
The Lagrangian unconstrained optimization function can be obtained through a Lagrangian multiplier method:
wherein alpha is i >0,μ i >0,/>Is a lagrange multiplier.
Obtaining the bias derivative of w in L
Obtaining the bias derivative of b in L
Zeta in L i Obtaining C-alpha by solving bias ii =0;
For LObtaining->
Substituting the formula subjected to the bias derivation into the Lagrangian unconstrained optimization function to obtain a dual problem:
thereby obtaining
Finally, a regression function is obtained
Wherein, (x) i x) is input x and training sample x i Is used to construct a new function The regression function is +.>Wherein k (x i ,x i ) Is a kernel function supporting a vector regression model.
As shown in fig. 1, an embodiment of the present invention provides a model training method for charge quality prediction, including:
step S101, a historical charging data set is obtained, wherein the historical charging data set comprises charging process parameter data and corresponding quality data;
step S102, dividing the historical charge data set into a plurality of training sets and a plurality of test sets according to a cross-validation method, wherein one training set corresponds to one test set;
step S103, training the support vector regression model through a plurality of groups of training sets based on a Bayesian optimization algorithm to obtain a plurality of training models;
step S104, obtaining a performance evaluation result of each training model according to the corresponding test set;
step S105, determining a quality prediction model when the performance evaluation result satisfies a preset evaluation condition.
In the embodiment of the present invention, in step S101, the process parameter data is data related to the process parameters of the pressed charge, where the process parameters include, but are not limited to, pressing temperature, heat preservation time, pressure, etc. of the pressed charge in the press-fit experiment, and the quality data is the molding density of the pressed charge under different process parameters;
in step S102, in general, the number of samples in the historical charge data set is smaller, the historical charge data set is divided into a training set and a test set for training the model according to the cross-validation method, multiple times of division is performed on the historical charge data set, multiple groups of different training sets are generated, each group of training set corresponds to one test set, and under the condition that the samples are smaller, the accuracy of the training model can be improved by adopting the method, and the data fitting phenomenon can be effectively avoided;
in step S103, the support vector regression model is trained through the training set, and meanwhile, the support vector regression model is parameter-optimized through the bayesian optimization algorithm, so that a training model is obtained, and the accuracy of the model is improved, because multiple groups of different training sets can be generated in step S102, one group of training sets is selected each time to train the support vector regression model, a training model is generated, and multiple groups of training sets correspond to multiple training models;
in step S104, each training model corresponds to a set of training sets and corresponds to a test set, each test set is input into the corresponding training model to obtain quality prediction data of the test set, and the quality prediction data is compared with actual quality data in the test set to obtain a performance evaluation result of the training model;
in step S105, a quality prediction model is determined based on the performance evaluation results of the training model, including but not limited to mean square error (Mean Squared Error, MSE), model fitness (R-Squared, R 2 ) And average absolute error (Mean Absolute Error, MAE) and the like.
The charge quality is predicted by adopting the quality prediction model in the embodiment of the invention, so that the measurement efficiency and the measurement accuracy can be improved.
Optionally, before acquiring the historical charge data set, the method further comprises:
acquiring a plurality of groups of historical charging data, wherein each group of historical charging data comprises raw data of charging process parameters and corresponding quality data;
and carrying out normalization processing and correlation analysis on the original data to obtain the process parameter data.
In the embodiment of the invention, technological parameters in a charging experiment and charging quality data corresponding to different technological parameters are firstly obtained through an orthogonal test method and are determined to be historical charging data, wherein the technological parameters include, but are not limited to, parameters such as pressing temperature, heat preservation time and pressure, and the quality data are the forming density of pressed charging. Firstly normalizing the process parameters to obtain data, then carrying out correlation analysis on the process parameter data, and carrying out the pretreatment on the process parameters to obtain the process parameter data.
Optionally, dividing the historical charge data set into a plurality of training sets and a plurality of test sets according to a cross-validation method, comprising:
dividing the historical charge data set into K mutually exclusive data subsets according to a K-fold cross validation method, wherein K is an integer greater than 1;
sequentially determining each data subset as a test set;
and under the condition that any one of the data subsets is a test set, determining the rest K-1 data subsets as a group of training sets.
In the embodiment of the invention, the K-fold cross verification method comprises the following steps: dividing a historical charging data set into K mutually exclusive data subsets, wherein K is an integer greater than 1; secondly, determining one data subset as a test set, determining the rest K-1 data subsets as a group of training sets, and training and evaluating a support vector regression model; and thirdly, repeating the process K-1 in the second step, wherein each time a different data subset is selected as a test set, the corresponding training set is different. As shown in fig. 2, in the case of k=5, the historical charge data set is divided into 5 mutually exclusive data subsets of similar size, each data subset is determined as a test set in turn, the remaining 4 data subsets are a set of training sets (hatched squares in fig. 2 represent test sets, unshaded squares represent training sets), and the support vector regression model is trained and evaluated according to different test sets and the corresponding 4 training sets, respectively, to obtain a corresponding performance evaluation result.
Optionally, based on a bayesian optimization algorithm, training the support vector regression model through multiple sets of training sets to obtain multiple training models, including:
respectively inputting a plurality of groups of training sets into a plurality of support vector regression models, and training the plurality of support vector regression models;
determining optimal parameters of each support vector regression model based on a Bayesian optimization algorithm according to preset parameters of each support vector regression model to obtain a plurality of training models;
wherein a set of the training sets corresponds to one of the support vector regression models and one of the support vector regression models corresponds to one of the training models.
In the embodiment of the invention, a support vector regression model is initialized, the value ranges of penalty parameters C and parameters gamma corresponding to variances in the model are set, and the iteration times of cross verification are set; in each iterative cross-validation process, multiple groups of training sets are respectively input into a support vector regression model for training, and multiple training models are obtained. The method specifically comprises the steps of inputting a set of training sets into a support vector regression model for training, optimizing super parameters in the support vector regression model based on a Bayesian optimization algorithm according to data in the training sets, and generating a corresponding training model after finding out optimal parameters.
Optionally, determining the optimal parameter of each support vector regression model based on a bayesian optimization algorithm according to the preset parameter of each support vector regression model to obtain a plurality of training models, including:
according to preset parameters of each support vector regression model, a plurality of objective function models are built through a Gaussian process model based on a Bayesian optimization algorithm, wherein one support vector regression model corresponds to one objective function model;
according to a Bayesian formula, the mean value and the variance of the probability distribution function in each objective function model are obtained;
based on an acquisition function, determining the optimal parameter of each support vector regression model according to the mean value and the variance corresponding to each objective function model;
and determining a plurality of training models according to the optimal parameters of the support vector regression models.
In the embodiment of the invention, the process of optimizing the support vector regression model by using the Bayesian optimization algorithm is described, the Bayesian optimization algorithm is mainly to continuously update the prior probability distribution of the objective function established in the Gaussian process by using a Bayesian formula through different super-parameter combinations, so that the optimal parameters of the support vector regression model are determined, and the accuracy is higher when the quality prediction is performed by using the optimized support vector regression model.
Wherein, the Bayesian formula is:wherein A and B represent two random events, P (A i B) represents a after occurrence of a known event B i The conditional probability of occurrence, called P (A i B) is A i Posterior probability of P (B|A) i ) A likelihood function of B; p (A) i ) And P (A) j ) The influence of event B is not considered and is therefore referred to as a priori probability of a.
The following is a specific description of an example of support vector regression model optimization:
firstly, constructing an objective function model through a Gaussian process model according to a preset parameter combination (punishment parameter C and variance related parameter gamma) of a support vector regression model, wherein an objective function corresponding to the objective function model is taken as g (x) from a Gaussian process GP, namely g (x) to GP (E (x), K (x, x ')), K (x, x') represents a kernel function of the support vector regression model, and a matrix of the kernel function is defined as:e (x) tableMean is shown, where there is a set of sample points a= { (x) at a mean of 0 1 ,y 1 ),(x 2 ,y 2 ),...,(x i ,y i ) I=1, 2., g (x) to GP (0, K (x, x')).
Then, a new parameter combination x is determined by inputting the acquisition function * And generating a new gaussian distribution, a joint gaussian distribution can be obtained:wherein K (X, X * ) Is X and X * Since the conditional distribution of the multidimensional normal distribution is still normal distribution, the covariance matrix of the (c) can be calculated at a known g (x 1:i ) Under (wherein x 1:i Represents x 1 ,x 2 ,...,x i ),g(x * ) The distribution of conditions obeyed, i.e. g (x * ) Obeys a one-dimensional normal distribution: g (x) * )|g(x 1:i )~N(μ,σ 2 );
According to the calculation formula of the multidimensional normal distribution condition distribution, the mean mu and variance of the condition distribution can be calculated
Selecting an acquisition function according to the mean value and the variance of the conditional distribution, obtaining a parameter combination corresponding to the maximum value of the acquisition function as an optimal parameter, and updating an objective function model; the collection function in this embodiment is a confidence boundary function (Upper Confidence Bound, UCB), and the function formula is:the parameter beta is used for balancing the mean value and the mean square error.
Optionally, obtaining a performance evaluation result of each training model according to the corresponding test set includes:
respectively inputting the process parameter data in a plurality of test sets into the corresponding training models to obtain quality prediction results of the plurality of test sets;
and evaluating according to the quality data in each test set and the corresponding quality prediction result to obtain a performance evaluation result of each training model.
In the embodiment of the invention, for each training model obtained by training, process parameter data in a corresponding test set is input to obtain a corresponding quality prediction result, and according to the real quality data in the test set and the quality prediction result obtained by the training model, performance evaluation is performed on the training model to obtain a performance evaluation result.
Performance evaluation results include, but are not limited to, mean square error (Mean Squared Error, MSE), model fitness (R-Squared, R 2 ) And one or more of the results of the mean absolute error (Mean Absolute Error, MAE) and the like;
the calculation formula of the mean square error is:
wherein y is i Representing the actual quality data in the test set,representing a quality prediction result obtained by training a model, wherein MSE is often used as a loss function of a regression model, and represents the degree of difference between a true value and a predicted value;
the calculation formula of the model fitting degree is as follows:
wherein,mean value of true quality data in the test set, R 2 The value range of (2) is 0 to 1, and the closer to 1, the better the model fitting effect is indicated;
the calculation formula of the average absolute error is as follows:the average absolute error represents the average of absolute errors between the predicted value and the true value.
Optionally, in a case that the performance evaluation result meets a preset evaluation condition, determining the quality prediction model includes:
carrying out average value operation on the performance evaluation results of each training model to obtain average evaluation results;
and under the condition that the average evaluation result meets a preset evaluation condition, determining the training model corresponding to the highest performance evaluation result as the quality prediction model.
In the embodiment of the invention, as the cross verification is carried out once, a plurality of training models are obtained, and then the performance evaluation results corresponding to the plurality of training models are obtained, when whether the training models generated in the iteration meet the requirements or not is evaluated, the average value of the performance evaluation results of each training model generated in the iteration training is required to be obtained, whether the average evaluation results meet the preset evaluation conditions or not is judged, and when the preset evaluation conditions are met, the training model with the optimal performance evaluation results among the plurality of training models generated in the iteration training is determined as the quality prediction model, so that the measurement accuracy of the finally determined quality prediction model is ensured.
Optionally, the method further comprises:
and under the condition that the performance evaluation result does not meet the preset evaluation condition, updating the training model based on a Bayesian optimization algorithm.
In the embodiment of the invention, under the condition that the performance evaluation result does not meet the preset evaluation condition, the training model is iterated, the objective function is updated according to the Bayesian optimization algorithm, the optimal parameters are updated, the training model is updated, and the next performance evaluation is performed on the new training model.
As shown in fig. 3, the process of determining a quality prediction model for charge quality prediction using an embodiment of the present invention is illustrated by way of example only:
step S301, acquiring a plurality of groups of charging technological parameters and charging quality data corresponding to different technological parameters, carrying out normalization processing and correlation analysis on the technological parameters to obtain technological parameter data, and determining a historical charging data set according to the technological parameter data and the corresponding charging quality data;
step S302, dividing a historical charge data set into a plurality of mutually exclusive data subsets with similar sizes according to a cross-validation method, sequentially determining each data subset as a test set, and determining the rest data subsets as a group of training sets when any one data subset is the test set;
step S303, inputting a training set into a support vector regression model, and performing parameter optimization on the support vector regression model based on a Bayesian optimization algorithm to generate a training model, wherein in step S302, the training set is divided into a plurality of groups of training sets through a cross verification method, the plurality of groups of training sets are respectively input into the support vector regression model for training, and each group of training sets corresponds to one training model;
step S304, inputting the technological parameter data in each test set into a corresponding training model to obtain a quality prediction result, and comparing the quality prediction result of the test set with the real charging quality data in the test set to obtain a performance evaluation result of each training model;
step S305, judging whether the performance evaluation result meets the preset evaluation condition, if yes, turning to step S306, if not, turning to step S303 until the preset maximum training iteration number is met; note that, the performance evaluation result in this step refers to an average value of the performance evaluation results of each training model in step S304, for example: if the cross-validation method in step S302 is 5-fold cross-validation, there are 5 training models generated in the corresponding step S303, and there are 5 corresponding performance evaluation results in step S304, in which an average value of the 5 performance evaluation results needs to be obtained, and whether the average value meets a preset evaluation condition is determined;
step S306, determining the training model corresponding to the optimal performance evaluation result in step S304 as a quality prediction model.
As shown in fig. 4, the process of generating one of the training models in step S303 is specifically described by way of example two:
step S401, inputting a group of training sets into a support vector regression model, wherein the support vector regression model needs to be initialized when the model training is performed for the first time, the value ranges of a punishment parameter C and a variance related parameter gamma are set, and the iterative training times of cross verification are set;
step S402, constructing or updating an objective function model through a Gaussian process based on a Bayesian optimization algorithm; it should be noted that, when model training is performed for the first time, a group of parameters are randomly selected as an initial solution to construct an objective function model, when model training is performed for the nth time, the optimal parameters determined by the last model training are used as an initial solution to update the objective function model, and N is an integer greater than 1;
step S403, obtaining the mean value and the variance of the Bayesian probability distribution function in the objective function model;
step S404, determining the position of the next group of parameters based on the acquisition function, calculating the probability value of the parameter, determining the optimal parameter, and updating the prior distribution and the objective function model;
step S405, determining a training model according to the optimal parameters.
As shown in fig. 5, a comparison line diagram of the result of predicting the charge quality and the real charge quality by using the support vector regression model (i.e., the quality prediction model according to the present invention) optimized by the bayesian optimization algorithm provided by the present invention;
according to the model training process, the value range of the punishment parameter C is set as [0.01,2], the value range of the variance related parameter gamma is set as [0.0001,0.01], the number of times of cross validation is set as 5 (5-fold cross validation), and based on a Bayesian optimization algorithm, the support vector regression model is continuously and iteratively trained to minimize the objective function value, the optimal parameter under the data sample is obtained, and the quality prediction model is determined. Inputting the process parameter data of the sample to be predicted into a quality prediction model, obtaining a performance evaluation result of the quality prediction model, and outputting a comparison line diagram of a quality prediction curve (a dotted line part) and an actual quality curve (a solid line part) of the sample.
FIG. 6 is a graph showing a comparison of the predicted charge quality and the actual charge quality of a conventional support vector regression model in the prior art;
inputting the process parameter data of the sample to be predicted into a traditional support vector regression model of default parameters, obtaining a performance evaluation result of the traditional support vector regression model, and outputting a comparison line diagram of a quality prediction curve (a dotted line part) and an actual quality curve (a solid line part) of the sample.
The performance evaluation data of the support vector regression model (i.e., the quality prediction model according to the present invention) and the conventional support vector regression model optimized based on the bayesian optimization algorithm are shown in table 1.
Model name R 2 Mean square error Variance of Average absolute error
Bayesian optimization SVR 0.7214 0.0003 0.9264 0.0147
Traditional SVR 0.359 0.0006 0.4312 0.0204
TABLE 1
From the comparison of fig. 5 and fig. 6 and the performance evaluation data in table 1, it can be seen that the support vector regression model optimized based on the bayesian optimization algorithm (i.e., the quality prediction model according to the present invention) has better data fitting effect and higher prediction accuracy than the conventional support vector regression model.
As shown in fig. 7, an embodiment of the present invention further provides a model training apparatus for predicting charge quality, including:
a first acquisition module 701, configured to acquire a historical charge data set, where the historical charge data set includes process parameter data and corresponding quality data of a charge;
a first dividing module 702, configured to divide the historical charge data set into a plurality of training sets and a plurality of test sets according to a cross-validation method, where a set of the training sets corresponds to one of the test sets;
the first training module 703 is configured to train the support vector regression model through multiple sets of training sets based on a bayesian optimization algorithm, so as to obtain multiple training models;
a first evaluation module 704, configured to obtain a performance evaluation result of each training model according to the corresponding test set;
the first determining module 705 is configured to determine a quality prediction model when the performance evaluation result meets a preset evaluation condition.
Optionally, the apparatus further comprises:
the second acquisition module is used for acquiring a plurality of groups of historical charging data, and each group of historical charging data comprises raw data of charging process parameters and corresponding quality data;
and the first processing module is used for carrying out normalization processing and correlation analysis on the original data to obtain the process parameter data.
Optionally, the first dividing module 702 includes:
the first dividing unit is used for dividing the historical charge data set into K mutually exclusive data subsets according to a K-fold cross verification method, wherein K is an integer greater than 1;
the first determining unit is used for sequentially determining each data subset as a test set;
and the second determining unit is used for determining the rest K-1 data subsets as a group of training sets under the condition that any one data subset is a test set.
Optionally, the first training module 703 includes:
the first training unit is used for respectively inputting a plurality of groups of training sets into a plurality of support vector regression models and training the plurality of support vector regression models;
the first optimization unit is used for determining the optimal parameters of each support vector regression model based on a Bayesian optimization algorithm according to the preset parameters of each support vector regression model to obtain a plurality of training models; wherein a set of the training sets corresponds to one of the support vector regression models and one of the support vector regression models corresponds to one of the training models.
Optionally, the first optimizing unit includes:
the first construction unit is used for constructing a plurality of objective function models through a Gaussian process model based on a Bayesian optimization algorithm according to preset parameters of each support vector regression model, wherein one support vector regression model corresponds to one objective function model;
the first acquisition unit is used for acquiring the mean value and the variance of the probability distribution function in each objective function model according to a Bayesian formula;
the third determining unit is used for determining the optimal parameters of each support vector regression model according to the mean value and the variance corresponding to each objective function model based on the acquisition function;
and the fourth determining unit is used for determining a plurality of training models according to the optimal parameters of the support vector regression models.
Optionally, the first evaluation module 704 includes:
the first input unit is used for respectively inputting the process parameter data in the plurality of test sets into the corresponding training models to obtain quality prediction results of the plurality of test sets;
the first evaluation unit is used for evaluating according to the quality data in each test set and the corresponding quality prediction result to obtain the performance evaluation result of each training model.
Optionally, the first determining module 705 includes:
the first calculation unit is used for carrying out average value operation on the performance evaluation results of each training model to obtain average evaluation results;
and a fifth determining unit, configured to determine, as the quality prediction model, the training model corresponding to the highest performance evaluation result when the average evaluation result satisfies a preset evaluation condition.
Optionally, the apparatus further comprises:
and the first updating module is used for updating the training model based on a Bayesian optimization algorithm under the condition that the performance evaluation result does not meet the preset evaluation condition.
It should be noted that, the embodiment of the apparatus is an apparatus corresponding to the embodiment of the method, and all implementation manners in the embodiment of the method are applicable to the embodiment of the apparatus, so that the same technical effects can be achieved.
The embodiment of the invention also provides a network device, which comprises: a processor, a memory and a program stored on the memory and executable on the processor, which when executed by the processor implements the model training method for charge quality prediction as claimed in any one of the preceding claims.
The embodiment of the invention also provides a readable storage medium, which comprises: the readable storage medium has stored thereon a program which, when executed by a processor, implements the steps of the model training method for charge quality prediction as described in any of the above.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (11)

1. A model training method for charge quality prediction, comprising:
acquiring a historical charging data set, wherein the historical charging data set comprises technological parameter data and corresponding quality data of charging;
dividing the historical charge data set into a plurality of training sets and a plurality of test sets according to a cross-validation method, wherein one training set corresponds to one test set;
training the support vector regression model through a plurality of groups of training sets based on a Bayesian optimization algorithm to obtain a plurality of training models;
obtaining a performance evaluation result of each training model according to the corresponding test set;
and under the condition that the performance evaluation result meets a preset evaluation condition, determining a quality prediction model.
2. A model training method for charge quality prediction according to claim 1, characterized in that before acquiring the historical charge data set, the method further comprises:
acquiring a plurality of groups of historical charging data, wherein each group of historical charging data comprises raw data of charging process parameters and corresponding quality data;
and carrying out normalization processing and correlation analysis on the original data to obtain the process parameter data.
3. A model training method for charge quality prediction according to claim 1, characterized in that the historical charge dataset is divided into a plurality of training sets and a plurality of test sets according to a cross-validation method, comprising:
dividing the historical charge data set into K mutually exclusive data subsets according to a K-fold cross validation method, wherein K is an integer greater than 1;
sequentially determining each data subset as a test set;
and under the condition that any one of the data subsets is a test set, determining the rest K-1 data subsets as a group of training sets.
4. The model training method for charge quality prediction according to claim 1, wherein training the support vector regression model by a plurality of sets of the training sets based on a bayesian optimization algorithm to obtain a plurality of training models, comprising:
respectively inputting a plurality of groups of training sets into a plurality of support vector regression models, and training the plurality of support vector regression models;
determining optimal parameters of each support vector regression model based on a Bayesian optimization algorithm according to preset parameters of each support vector regression model to obtain a plurality of training models;
wherein a set of the training sets corresponds to one of the support vector regression models and one of the support vector regression models corresponds to one of the training models.
5. The model training method for charge quality prediction according to claim 4, wherein determining optimal parameters of each of the support vector regression models based on a bayesian optimization algorithm according to preset parameters of each of the support vector regression models, and obtaining a plurality of training models, comprises:
according to preset parameters of each support vector regression model, a plurality of objective function models are built through a Gaussian process model based on a Bayesian optimization algorithm, wherein one support vector regression model corresponds to one objective function model;
according to a Bayesian formula, the mean value and the variance of the probability distribution function in each objective function model are obtained;
based on an acquisition function, determining the optimal parameter of each support vector regression model according to the mean value and the variance corresponding to each objective function model;
and determining a plurality of training models according to the optimal parameters of the support vector regression models.
6. The model training method for charge quality prediction according to claim 1, wherein obtaining a performance evaluation result of each of the training models from the corresponding test set comprises:
respectively inputting the process parameter data in a plurality of test sets into the corresponding training models to obtain quality prediction results of the plurality of test sets;
and evaluating according to the quality data in each test set and the corresponding quality prediction result to obtain a performance evaluation result of each training model.
7. The model training method for charge quality prediction according to claim 1, wherein determining a quality prediction model in the case where the performance evaluation result satisfies a preset evaluation condition comprises:
carrying out average value operation on the performance evaluation results of each training model to obtain average evaluation results;
and under the condition that the average evaluation result meets a preset evaluation condition, determining the training model corresponding to the highest performance evaluation result as the quality prediction model.
8. The model training method for charge quality prediction of claim 1, further comprising:
and under the condition that the performance evaluation result does not meet the preset evaluation condition, updating the training model based on a Bayesian optimization algorithm.
9. A model training device for charge quality prediction, comprising:
the first acquisition module is used for acquiring a historical charging data set, wherein the historical charging data set comprises charging process parameter data and corresponding quality data;
the first dividing module is used for dividing the historical charging data set into a plurality of groups of training sets and a plurality of test sets according to a cross-validation method, wherein one group of training sets corresponds to one test set;
the first training module is used for training the support vector regression model through a plurality of groups of training sets based on a Bayesian optimization algorithm to obtain a plurality of training models;
the first evaluation module is used for obtaining a performance evaluation result of each training model according to the corresponding test set;
the first determining module is used for determining a quality prediction model under the condition that the performance evaluation result meets a preset evaluation condition.
10. A network device, comprising: a processor, a memory and a program stored on the memory and executable on the processor, which when executed by the processor implements the model training method for charge quality prediction as claimed in any one of claims 1 to 8.
11. A readable storage medium, comprising: the readable storage medium has stored thereon a program which, when executed by a processor, implements the steps of a model training method for charge quality prediction according to any of claims 1 to 8.
CN202311585760.9A 2023-11-24 2023-11-24 Model training method, device, equipment and medium for charge quality prediction Pending CN117575412A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311585760.9A CN117575412A (en) 2023-11-24 2023-11-24 Model training method, device, equipment and medium for charge quality prediction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311585760.9A CN117575412A (en) 2023-11-24 2023-11-24 Model training method, device, equipment and medium for charge quality prediction

Publications (1)

Publication Number Publication Date
CN117575412A true CN117575412A (en) 2024-02-20

Family

ID=89860456

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311585760.9A Pending CN117575412A (en) 2023-11-24 2023-11-24 Model training method, device, equipment and medium for charge quality prediction

Country Status (1)

Country Link
CN (1) CN117575412A (en)

Similar Documents

Publication Publication Date Title
Wilms et al. Sparse canonical correlation analysis from a predictive point of view
CN108985335B (en) Integrated learning prediction method for irradiation swelling of nuclear reactor cladding material
CN109002889A (en) Adaptive iteration formula convolutional neural networks model compression method
CN112557034B (en) Bearing fault diagnosis method based on PCA _ CNNS
CN110751339A (en) Method and device for predicting corrosion rate of pipeline and computer equipment
CN109840283B (en) Local self-adaptive knowledge graph optimization method based on transfer relationship
CN111985825A (en) Crystal face quality evaluation method for roller mill orientation instrument
US20070239415A2 (en) General graphical gaussian modeling method and apparatus therefore
TW202123098A (en) Method and electronic device for selecting neural network hyperparameters
Vieira et al. Main concepts in machine learning
CN114692507A (en) Counting data soft measurement modeling method based on stacking Poisson self-encoder network
CN117575412A (en) Model training method, device, equipment and medium for charge quality prediction
CN117236182A (en) Reinforced concrete bonding strength prediction method based on GWO-SVR
CN117079017A (en) Credible small sample image identification and classification method
CN111177644A (en) Model parameter optimization method, device, equipment and storage medium
CN112951320B (en) Biomedical network association prediction method based on ensemble learning
CN110929849B (en) Video detection method and device based on neural network model compression
CN108304546B (en) Medical image retrieval method based on content similarity and Softmax classifier
Tian et al. Microbial Network Recovery by Compositional Graphical Lasso
Rivier et al. Non‐parametric measure approximations for constrained multi‐objective optimisation under uncertainty
Khan et al. Variable selection with the modified Buckley–James method and the dantzig selector for high–dimensional survival data
CN113850444B (en) Travel demand time sequence prediction method based on guide attention mechanism
CN117574255B (en) Slope safety coefficient prediction method based on pelican algorithm and support vector machine
CN112948203B (en) Elevator intelligent inspection method based on big data
CN116777292B (en) Defect rate index correction method based on multi-batch small sample space product

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