I am beginner in Python and am trying to learn curve fitting. I have defined an SEIR Model as follows :
Python Code
y0 = S0 ,I0,E0, R0
t= np.linspace(0,400,400) def deriv(y, t): S,E,I, R = y dSdt = -beta* S*I / N dEdt = beta* S*I / N-sigma*E dIdt = sigma*E-gamma*I dRdt = gamma * I return dSdt, dEdt, dIdt, dRdt sol = odeint(deriv, y0, t) S,E,I,R = sol.T
Data Frame Extraction
I have also extracted a data frame with the relevant data from the COVID -19 Dataset provided by JHU
ydata = [i for i in df2.active] xdata = df2.day_count ydata = np.array(ydata, dtype=float) xdata = np.array(xdata, dtype=float)
Now my question is how to do a basin hopping optimization using the given data ?
https://stackoverflow.com/questions/65376960/how-to-use-the-basin-hopping-optimization-method-in-scipy-to-fit-seir-model-data December 20, 2020 at 12:38PM
没有评论:
发表评论