I am using a sigmoidal function to fit the historical data of Covid-19 and predict or forecast. And also use LinearRegression and RandomForestRegressor to predict. I thought of a sigmoidal function first because China's data resembled a sigmoidal shape. Therefore, I try to fit sigmoid functions onto Nepal also.
Step-1:Load dataset from s3 (download from https://covid.ourworldindata.org/data/owid-covid-data.csv)
Sigmoid function, Here is a snap of how I learnt to fit Sigmoid Function - y = c/(1+np.exp(-a*(x-b))) and 3 coefficients [c, a, b]:
- c - the maximum value (eventual maximum infected people, the sigmoid scales to this value eventually)
- a - the sigmoidal shape (how the infection progress. The smaller, the softer the sigmoidal shape is)
- b - the point where the sigmoid start to flatten from steepening (the midpoint of sigmoid, when the rate of increase start to slow down)
Step-7: Prediction Using Manual sigmoidal fitting:
Nepal,
The b coefficient is 270, which means that the model starts to flatten 270 days, after the 25th of September, and really flatten significantly after 540 days.
The c coefficient is 145000, which is the predicted amount of infected people.
The coefficient is 0.04 is smaller than China's 0.22, which means the sigmoid is even softer in China. This means that Nepal will take even longer than China to fight Covid-19.
From this, its seen that in Nepal if the graph goes like that:
max Active case: 145000,
curve stop steepening, start flattening by day: 270,
which is: 2020-09-25,
the curve flattens by day: 540
No comments:
Post a Comment