| In December 2019,an acute respiratory infectious disease caused by a novel coronavirus broke out and quickly spread to various parts of the world,which had a huge impact on the normal lives of people around the world.As the economic center of China,Shanghai suffered significant losses in its financial,cultural,and import and export industries due to the impact of the COVID-19 epidemic.Therefore,how to scientifically and reasonably analyze and predict the development of the epidemic has become a major focus of many researchers.In this work,three models are established based on differential equations for infectious disease and neural networks to predict the future number of cases for the Shanghai COVID-19 epidemic from March 1st to May 29th,2022,and the performance and results of the three models are comprehensively compared.This study first establishes a SAIRD differential equations model for the Shanghai COVID-19 epidemic from March 1st to May 29th,2022.The model includes six compartments,i.e.,asymptomatic infected individuals S,confirmed cases I,those who have been released from medical observation R1,those who have recovered R2,and the deceased D.Then,the case data for the epidemic is retrieved from the website of the Shanghai Municipal Health Commission and processed to meet the requirements of the SAIRD infectious disease model.Next,three prediction models are established for predicting future case numbers.Model 1 directly utilizes LSTM based on case data from the 1st day to the 80th day to predict case data from the 81st day to the 90th day.Model 2 first uses PINN to fit the time-varying parameters(β1,β2,γ1,γ2,α,μ,and p)of the SAIRD differential equations from day1 to day 80,then uses LSTM to predict the time-varying parameters from the 1st day to the80th day.Finally,using the case data of the 80th day as the initial value and the predicted time-varying parameters,Euler’s method is used to calculate the numerical solution from the 81st day to the 90th day,which is the predicted case data for the next 10 days.Model 3is similar to Model 2 in process,but the main difference is that Model 3 uses First-Principles Machine Learning to fit the time-varying parameters instead of PINN.The models are evaluated from four aspects:fitting effect of time-varying parameters,prediction effect of future case numbers,training time,and interpretability of the results.Model 3 is better than model 2 in fitting the time-varying parameters.This may be because model 2 adds the residual term of the differential equations for the SAIRD infectious disease model to the loss function,while model 3 first substitutes the fitted time-varying parameters into the differential equations for the SAIRD infectious disease model to obtain the numerical solution,and then includes the error between the numerical solution and the true value in the loss function,making the fitted time-varying parameters more in line with the transmission mechanism of the epidemic.In terms of the prediction effect of future case numbers,the error of model 1 is larger,and the errors of model 2 and model 3 are close and smaller.This is because model 1 is developed from a data perspective only and does not consider the inherent mechanism of the infectious disease,while model 2 and model 3consider the inherent mechanism of the infectious disease from different perspectives.In terms of the training time of the model,model 1 requires less time,while model 2 and model3 require more time due to the time-varying parameter fitting process.In terms of the interpretability of the prediction results,model 1 lacks interpretability because it is a pure neural network model,while both model 2 and model 3 combine differential equations with neural networks,making them more interpretable.This study uses a combination of differential equations for infectious disease and neural networks to study the Shanghai epidemic,not only providing insights into fitting time-varying parameters and predicting future case numbers,but also providing research directions for the prevention and control of major infectious diseases such as COVID-19. |