| The problem of data imbalance is currently one of the popular researches in communication,computer,finance and other industries.In the context of the era of digitization,many scenarios will be accompanied by the problem of data imbalance.Since the proportion of minority samples is small,but it has a decisive influence on the direction of things,it is very important to study the problem of data imbalance.In the technological background of the breeding industry,in order to improve the raising efficiency of pigs,it is necessary to carry out an accurate regression prediction on the weight of the pigs.Because of the data imbalance of pig weights,it affects the accuracy of weight prediction.In order to solve this problem,this paper mainly studies the data equalization algorithm based on weight adaptation of pig weight,and verifies the feasibility of dynamically adjusting the weight to achieve accurate weight prediction.The research work is as follows:Firstly,the characteristics of unbalanced data sets are studied.The preprocessing method of the original data was proposed to obtain the unbalanced data set after the preprocessing.In view of the characteristics of data imbalance,use sample oversampling technology in the data level,carry on the research of image reversal and resalt and improve the SMOTE algorithm of synthesizing minority type oversampling.Secondly,based on the ResNet-101 residual network structure,the regression weight prediction network is modified.Comparing the effects of the three loss functions,such as MSE loss,MAE loss and Huber loss on the pig weight prediction model.The GHM loss function is introduced,and the GHM loss function is modified to be similar to the Huber loss function.The combined GHM-R loss function is applied to the weight prediction regression network.Perform weighting experiments on the loss function,and propose five sets of fixed-value proportional loss function weighting and sample reciprocal standardized weighting methods.Under the problem of data imbalance,the feasibility of weighting the loss function of the pig weight measurement network in improving the accuracy of weight prediction authenticating.Finally,the adaptive dynamic adjustment method of the weight of the loss function is studied.Improve the dynamic weighting strategy of the loss function phase difference standardization,and compare the effect of dynamic weight adjustment in three phases.Improve gradient optimization algorithm of the Grad Norm loss function,dynamically adjust the weight through the loss function gradient method.Apply this method to the weight prediction regression network.Compare the model effect of the improved weight adaptive method on the regression weight measurement problem with unbalanced data.Combined with the Easy Ensemble under-sampling method,the base classifier is added to the regression weight prediction network to complete the combination of ensemble learning and dynamically loss function weight adaptation. |