Comments (6)
Is this due to the ode? If yes a first step to a solution could be to replace the handwritten ode solver
in
covid19_inference/covid19_inference/model.py
Line 107 in 9df8b1e
by the pymc3 internal solution from pymc3.ode
, which in turn uses scipy.integrate.odeint
If you think this is sensible, I can give it a try later.
from covid19_inference.
Not really sure. I didn't know the ode module. But I don't think it is very good approach as it won't work for the SEIR-model (not yet in this repo) as it not only needs the past timestep, but up to 9 in the past.
The reason is that we implemented it such that the delay is not exponentially distrubuted, but lognormal.
from covid19_inference.
Theano has a debug mode, where it stops when nans occur, I will try that next
from covid19_inference.
I bet you a beer its the ode solver.
from covid19_inference.
Deal ;) I learnt today, that there exist a way to implement also the SEIR model with a not-exponential incubation period with an ODE (Erlang-SEIR https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3673147/). So I do now think that it would be sensible to use the pymc3 ode solver for the SIR model. If you still want to do it, go on :)
I did try to avoid nans in the SIR model by clipping the infected and susceptible number between 0 and N_population, so I would think that this isn't reason for the errors.
from covid19_inference.
The error was in the weekend correction, where I used an hierarchical beta distribution. There I forgot to assure, that the sigma is in a correct range, which lead to nans. It is corrected by eb8e4e4
from covid19_inference.
Related Issues (20)
- Testing data class
- JHU-data has different format HOT 2
- Example SIR model with one german state has negative lambda values? HOT 9
- Advanced plotting in example_bundeslaender.ipynb is broken
- delay_cases function parameters
- cannot import name 'data_retrieval' HOT 4
- Import error when module covid19_inference is installed (instead of loaded from directory) HOT 1
- Region population size HOT 3
- AttributeError: 'RKI' object has no attribute 'get_new_confirmed' & 'get_confirmed' HOT 2
- Script for simple SIR and SEIR models HOT 2
- Offset in _new_cases_to_cum_cases seems to be broken
- Windows user strftime bug HOT 2
- plot._distributions does not acoomodate named models HOT 3
- Error with Trace(MCMC) in Example_bundeslaender HOT 1
- doubt about the posterior distributions HOT 2
- Plotting: AssertionError: var should be in trace.varnames HOT 6
- ERROR [pymc3] The rhat statistic is larger than 1.4 for some parameters. The sampler did not converge. HOT 6
- KeyError when using the "state" parameter in jhu "get_new" and "get_total_confirmed_deaths_recovered" methods HOT 3
- Nan errors in example notebooks HOT 3
- :noIssue: ❓ disappeared updates of divi json data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from covid19_inference.