Font Size: a A A

Time Series Analysis And Prediction Of The Admission Of Patients With Acute Pancreatitis Based On Python Language

Posted on:2024-06-09Degree:MasterType:Thesis
Country:ChinaCandidate:X Y ZengFull Text:PDF
GTID:2544306917966009Subject:Internal medicine
Abstract/Summary:PDF Full Text Request
Objective: To analyze the characteristics and time trends of the number of hospitalized patients with acute pancreatitis(AP),including internal periodicity and seasonality.autoregressive integrated moving average(ARIMA)model,Long-Short Term Memory(LSTM)neural network model and ARIMA-LSTM combination model were constructed.To explore and compare the application efficacy of three models in predicting the time trend of the number of hospitalized patients with acute pancreatitis.Methods: Based on the large database of AP patients in our hospital,a total of 72 months of hospitalized AP patients from January 2014 to December 2019 were collected.Python language software was used to descriptive analysis analyze the basic characteristics of the patients.Then,the monthly number of AP inpatients in the first 60 months was used as the training set,and Python language software was used to establish the ARIMA model,LSTM model and ARIMA-LSTM combination model,respectively.The three models were then used to predict the number of AP inpatients in the next 12 months as the test set.Finally,the fitting effects of different models were observed and evaluated.Results:(1)From January 2014 to December 2019,a total of 3939 AP patients in our hospital were enrolled in 72 months,including 2292 males and1647 females,accounting for 58.2% and 41.8% of the total number,respectively.The most common cause of AP was biliary AP(1898 cases,48.2%),followed by hypertriglyceridemia AP(HTG-AP)(1429 cases,36.3%),and alcoholic AP accounted for 281 cases(7.1%).Mixed AP accounted for 199cases(5%),and other causes accounted for 132 cases(3.4%).The peak age of AP onset was 40-50 years old.(2)The time series analysis showed that the number of AP patients in our hospital increased year by year,and the incidence of AP had a seasonal change.The peak of AP incidence was from February to March,followed by September to November,and the incidence was relatively low in summer.(3)The fluctuation trend of the ARIMA model’s prediction curve for the test set was similar to that of the true value curve,but the fluctuation amplitude bias was large.The root mean squard error(RMSE)of the model’s accuracy index was 13.7937.The mean absolute error(MAE)was8.1659.The predicted curve of the LSTM neural network model was roughly in step with the overall trend and fluctuation of the true value curve.The RMSE value of the model was 2.6943,and the MAE value was 1.9921.The predicted curve of the ARIMA-LSTM combination model was basically consistent with the overall trend and fluctuation of the real value curve.The RMSE value of the combination model was 1.46985,and the MAE value was 1.0087.(4)Among the models constructed by three different ideas,the LSTM model based on machine learning technology has higher prediction accuracy than the traditional ARIMA model,while the ARIMA-LSTM combined model has the highest prediction accuracy and the best prediction effect,that is,the combined model has better prediction effect than the single model.Conclusion:(1)The number of inpatients with AP showed an increasing trend year by year,mostly occurring in middle-aged patients,and bile AP and h G-AP were more common.The incidence of AP varies seasonally,with a peak in February to March,followed by September to November,and relatively few cases in summer.(2)The prediction accuracy of the combined model of ARIMA and LSTM is better than that of the LSTM model,and the prediction accuracy of the two models is significantly better than that of the ARIMA model,that is,the prediction effect of the combined model is better than that of the single model,and the LSTM model based on machine learning in the single model is better than the traditional ARIMA model.(3)The overall modeling process of ARIMA model is relatively simple and good for interpretation,but the prediction effect bias is large;LSTM model has better prediction accuracy than ARIMA,but the modeling process is relatively complex,and poor interpretation.Compared with the single model,the ARIMA-LSTM combined model has the highest prediction accuracy,but it also has some shortcomings such as poor interpretation of the modeling process and numerous parameters.
Keywords/Search Tags:acute pancreatitis, admission inpatients, ARIMA model, LSTM model, time series analysis
PDF Full Text Request
Related items