| This paper is aimed at tens of thousands of chain pharmacies nationwide under a certain brand,with the purpose of assisting the operation management of pharmacies by establishing a drug sales forecasting model.Drug is a special commodity and its user group is directional.Therefore,it is very difficult for drug stores to carry out inventory management and procurement.Drug sales prediction algorithm should be used to make prediction to help drugstores reduce operating costs and meet the needs of users at different levels.Due to the influence of many factors such as user factors and drug factors,it is difficult to make sales forecast for different drugs,so model optimization is needed.However,the particularity of the drug leads to the extreme sparsity of the sample,which requires feature engineering processing.(1)In terms of feature engineering,different drug types have different user groups,which leads to the diversity of learning samples.It is difficult to construct behavioral characteristics of different drug groups through the same static feature method.Drug consumption data set has the problem of positive and negative sample imbalance,and the sparsity is stronger than that of common goods,which will affect the training effect of the model.(2)In terms of model optimization,the extreme diversity of samples led to different models for pharmacies in different regions,which required selection.The diversity of samples requires better robustness of the model,and the parameters of the model need to be optimized.In view of the existing problems in feature engineering,this paper puts forward a modeling method based on Dynamic feature selection(DFS)and SS-KSMOTE(Stratified sampling-kmeans-SMOTE).The dynamic feature selection method first selects the non-proprietary features among the features,and the proprietary features that can reflect the attributes of the drug are selected.Then,each proprietary feature subset of the drug is combined with the non-proprietary features in turn,and the information gain of the feature subset is deleted.Finally,the proprietary features of the drug with the best effect are retained,and the combination of the non-proprietary features is the final training feature.The SS-KSMOTE algorithm is based on k-means,stratified Sampling and SMOTE(Synthetic Minority Over Sampling Technique)to deal with sample imbalance.SS-KSMOTE method first cluster the minority class samples,use the improved SMOTE to generate new minority class samples,then use stratified sampling method to reduce the majority class samples and construct the balance training set.To solve the model optimization problem,this paper designed three different models,DNN,DNN+Attention and Bi GRU+Attention,according to the scenario of drug store sales prediction,and progressively optimized the parameters to find the optimal model parameter setting.In this paper,a model parameter optimization Algorithm was designed based on Genetic Algorithm(GA),and a suitable genetic operator was designed to realize automatic parameter optimization of drug sales forecasting model and find the best model parameter combination.The experimental results show that the feature engineering modeling based on dynamic feature selection and SS-KSMOTE and the parameter optimization method based on deep learning and genetic algorithm proposed in this paper can effectively improve the prediction effect of the model and accurately find the potential user groups for different drugs of the brand chain drugstore. |