Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

theogf/BayesianQuadrature.jl

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BayesianQuadrature

Stable Dev Build Status Coverage Status Code Style: Blue DOI

Package for implementing different methods of Bayesian quadrature. Bayesian quadrature consists in estimating the integral I = ∫ f(x) p(x) dx by using Gaussian Processes where p(x) is assumed to be Gaussian. More precisely we replace f(x) by a GP by estimating f for multiple samples x_i. We then get a posterior distribution for the integral : p(I|{x_i}) = N(m, S).

Given a Bayesian problem p(x|y) = p(y|x) p_0(x) / p(y) you can estimate p(y) by calling :

using BayesianQuadrature
using Distributions
using KernelFunctions
p_0 = MvNormal(ones(2)) # As for now the prior must be a MvNormal
log_f(x) = logpdf(MvNormal(0.5 * ones(2)), x) # The logarithm of the Integrand log_f, the log-likelihood function typically
model = BayesModel(p_0, log_f) # Combine both to create the model
bquad = BayesQuad(SEKernel(); l=0.1, σ=1.0) # Will simply approximate p(y|x) with a GP (only works with SEKernel for now
sampler = PriorSampling() # Will sample from the prior p_0
p_I, _ = bquad(model, sampler; nsamples=100) # Returns a Normal distribution
@show p_I # Normal{Float64}(μ=0.07063602778449946, σ=0.0028050929209120458)

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.