Giter Club home page Giter Club logo

Comments (4)

getzdan avatar getzdan commented on June 19, 2024 1

"hello" (sorry couldn't help it)

from bridge.jl.

sdwfrost avatar sdwfrost commented on June 19, 2024

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.

mschauer avatar mschauer commented on June 19, 2024

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.

sdwfrost avatar sdwfrost commented on June 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.