Pain has always been a difficult problem for doctors and patients.With the continuous progress of medical science and technology,the types of analgesics are also gradually increasing.From ibuprofen capsules often used to relieve headache and low back pain in life to morphine and other drugs commonly used in hospital surgery,it not only greatly reduces the pain of patients,but also helps doctors to treat patients better.However,due to the lack of reasonable evaluation mechanism,drug abuse has appeared.The use of non steroidal analgesics will lead to the adverse reaction of leukopenia,which has also attracted the attention of doctors and scholars.The establishment of an appropriate prediction model can provide reference for doctors when prescribing non steroidal analgesics,and effectively reduce the risk of leukocyte adverse reactions caused by the use of non steroidal analgesics.In this thsis,by obtaining the information of patients using non steroidal analgesics in three hospitals in Shandong Province in 2020,taking part of the standard patient information data as samples,and using various physical indexes of patients with non steroidal analgesics,three common single machine learning models such as KNN model,logistic regression model(LR)and ANN model,random forest(RF)and xgboost integrated learning model are established by calculating accuracy,sensitivity,specificity AUC value,F1 value,compare the advantages and disadvantages of different models,and form a machine learning model with good performance——SE-XGRF model(XGBoost+RF model sampled by SMOTE+ENN)by selecting sampling methods,combined models and other methods.Secondly,taking the patients with adverse reactions of leucopenia after the use of non steroidal analgesics as samples,this thsis divides the time of adverse reactions of leucopenia into two stages:0-7 days,8-14 days and four stages:0-3 days,4-7 days,8-10 days and 11-14 days.Various models are used to predict the time of adverse reactions of leucopenia,and the accuracy is compared to find an appropriate time prediction model,I hope it can provide help for doctors to prescribe non steroidal analgesics and the detection of patients after using non steroidal analgesics.The results show that:(1)the three single machine learning models perform well in judging whether the overall use of non steroidal analgesics causes adverse reactions of leucopenia.At the same time,the specificity of the three models is greater than 90%,and the performance is also good.However,in terms of sensitivity,the sensitivity of logistic regression model is 14.1%,KNN model is 12.4%,ANN model is 18%,and the sensitivity is low The sensitivity of XGBoost is 28.1%and 32.4%.Although it is improved compared with a single machine learning model,it still lacks in sensitivity.(2)Based on the imbalance of the original sample data,this thsis uses smote oversampling,easyensemble undersampling and SMOTE+ ENN mixed sampling to balance the data of XGBoost and RF models.By comparing the model performance under different sampling methods,it is found that the sensitivity of XGBoost and RF models under SMOTE+ENN sampling method is 77%and 69%respectively,which is better than the other two sampling methods.(3)In order to further improve the prediction performance of the model,this thsis uses the soft voting method to combine xgboost and RF models under the SMOTE+ENN sampling mode,and the indexes of the combined model are better than XGBoost and RF models.(4)When the time of leukopenia was divided into two stages,logistic model and ANN model could be used to predict it well;When the time is divided into four segments,the performance of logistic model is better.The purpose of this thsis is to supplement the current research on reducing adverse reactions of leukocytes after the use of non steroidal analgesics,apply machine learning,especially ensemble learning,to the research of adverse reactions of non steroidal analgesics,select the machine learning model with high sensitivity,and make reasonable improvement on it,so as to improve the sensitivity of the model as much as possible on the premise of ensuring the accuracy.On the other hand,it is to supplement the research on adverse reactions of drugs,The innovative se-xgrf model is proposed,which can better balance the data of adverse drug reactions,improve the sensitivity and optimize the performance of the model. |