Giter Site home page Giter Site logo

juliaapproxinference / likelihoodfreeinference.jl Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 11.5 MB

Likelihood-Free Inference for Julia.

License: Other

Julia 100.00%
abc approximate-bayesian-computation likelihood-free-inference approximate-bayesian-inference likelihood-free

likelihoodfreeinference.jl's Introduction

LikelihoodfreeInference.jl

Lifecycle

Documentation

Given some measured data y0 and a potentially stochastic model model(x) that takes parameters x and returns simulated data y, LikelihoodfreeInference.jl allows to find approximate posterior distributions over x or approximate maximum likelihood (ML) and maximum a posteriori (MAP) point estimates, by runnning

run!(method, model, y0)

where method can be an Approximate Bayesian Computation (ABC) method PMC, AdaptiveSMC, K2ABC, KernelABC (subtypes(LikelihoodfreeInference.AbstractABC)) or PointEstimator, KernelRecursiveABC (subtypes(LikelihoodfreeInference.AbstractPointABC)).

Example

using LikelihoodfreeInference, StatsPlots, Distributions
model(x) = randn() .+ x
data = [2.]
method = KernelABC(delta = eps(),
                   K = 10^4,
                   kernel = Kernel(),
                   prior = TruncatedMultivariateNormal([0.], [5.],
                                                       lower = [-5.],
                                                       upper = [5.]))
result = run!(method, model, data)
println("Approximate posterior mean = $(mean(method))")
figure = histogram(method, normalize = true, xlims = (-5, 5))
plot!(figure, -1:.01:5, pdf.(Normal.(-1:.01:5, 26/25), 25/26*2.0))

See documentation or example notebooks Gaussian model and Blowfly model.

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.