Comments (4)
"hello" (sorry couldn't help it)
from bridge.jl.
Hi @mschauer
I'm trying to port this example to Bridge.jl. Can I check that the noise term is correct (ie matching my other example)?
function Bridge.σ(t, u, P::SIR)
(S,I,R) = u
N = S + I + R
ifrac = P.β*P.c*I/N*S
rfrac = P.γ*I
return @SMatrix Float64[
sqrt(ifrac) 0.0
-sqrt(ifrac) -sqrt(rfrac)
0.0 sqrt(rfrac)
]
end
or do I need to remove the square roots?
In my StochasticDiffEq
example, sometimes the states go below zero, so I have a callback to stop the solver then. Is there something comparable in Bridge.jl? I can run a single run, but the benchmark current fails because of this.
Any tips on parameter inference using Bridge.jl when data is the cumulative number of cases (see here) would be great, and would allow me to add another example.
Full gist so far here
from bridge.jl.
Bridge doesn't support callbacks. I would just simulate and reject simulated trajectories which become negative, for that to work, you can use sqrt(abs(ifrac))
to avoid triggering an error message.
But can we reparametrize the SDE by using Ito's formula on log(X(t))
? That would be convenient from a statistical point of view swell.
I can give you an example for inference from the cumulative number of cases, perhaps using https://github.com/mschauer/MitosisStochasticDiffEq.jl with @frankschae because that is what we are currently working on/working with.
from bridge.jl.
Thanks @mschauer. I have a reparameterization from Fintzi et al. that transforms to consider log(X(t)+1), but your workaround (which is obvious now that you mention it) is great for now.
https://github.com/epirecipes/sir-julia/blob/master/markdown/mbp/mbp.md
Thanks for the pointer to Mitosis.jl
!
from bridge.jl.
Related Issues (17)
- Implement OU bridge
- `bi` interface HOT 1
- Initial release HOT 2
- Heads-up: replacement of SamplePath HOT 1
- Usefulness of LabelledArrays HOT 3
- Error tagging new release
- Failed to precompile Bridge HOT 2
- Implement Chambers, Mallow and Struck for $\alpha$-stable processes HOT 2
- Address t. kelmans comments HOT 2
- Tag release HOT 1
- 3DExamples a few issues with upgrade to Julia 1.2 HOT 1
- Release 0.11.* HOT 15
- Bridge.expint inappropriately returns NaN HOT 1
- expint is now in SpecialFunctions HOT 1
- TagBot trigger issue HOT 2
- SDE solver interface overhaul 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 bridge.jl.