Python Laplace approximation in Bayesian inference

AI Thread Summary
The discussion centers on a Python project involving Bayesian inference to estimate four or more parameters using Markov Chain Monte Carlo (MCMC) methods. The user seeks to evaluate evidence through the Laplace approximation in n-dimensions, specifically using the formula E = P(x_0)2π^(n/2)|C|^(1/2), where C represents the covariance matrix and P(x_0) is the maximum posterior value. While obtaining the covariance matrix is straightforward, the challenge lies in determining P(x_0) for more than two parameters, as traditional methods like matplotlib.hist2d are insufficient for higher dimensions. A suggestion is made to explore the corner library, which may provide useful tools for visualizing and analyzing multidimensional distributions.
BRN
Messages
107
Reaction score
10
Hello everybody,
I am working on a Python project in which I have to make Bayesian inference to estimate 4 or more parameters using MCMC.
I also need to evaluate the evidence and I thought to do so through the Laplace approximation in n-dimensions:

$$ E = P(x_0)2\pi^{n/2}|C|^{1/2} $$

Where C is the parameter's covariance matrix and ##P(x_0)## is the maximum value that assumes the posterior.
Getting the covariance matrix is not a problem, but I don't know how get FX0. If they were only 2 parameters I could use matplotlib.hist2d, but being more than 4 parameters...
How could I do?
Some idea?

Thank you!
 
Technology news on Phys.org
BRN said:
FX0.
What is this ?
Are you looking for something like this

https://corner.readthedocs.io/en/latest/pages/quickstart.html
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top