You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Finds the quadratic approximation to the posterior, also known as the Laplace approximation.
28
28
29
29
NOTE: The quadratic approximation only works well for unimodal and roughly symmetrical posteriors of continuous variables.
30
-
The usual MCMC convergence and mixing statistics (e.g. R-hat, ESS) will NOT tell you anything about how well this approximation fits your actual (unknown) posterior, indeed they'll always be extremely nice since all "chains" are sampling from exactly the same distribution, the posterior quadratic approximation.
30
+
The usual MCMC convergence and mixing statistics (e.g. R-hat, ESS) will NOT tell you anything about how well this approximation fits your actual (unknown) posterior, indeed they'll always be extremely nice since all samples are from exactly the same distribution, the posterior quadratic approximation.
31
31
Use at your own risk.
32
32
33
33
See Chapter 4 of "Bayesian Data Analysis" 3rd edition for background.
34
34
35
-
Returns an arviz.InferenceData object for compatibility by sampling from the approximated quadratic posterior. Note these are NOT MCMC samples, so the notion of chains is meaningless, and is only included for downstream compatibility with Arviz.
35
+
Returns an arviz.InferenceData object for compatibility by sampling from the approximated quadratic posterior. Note these are NOT MCMC samples.
36
36
37
37
Also returns the exact posterior approximation as a scipy.stats.multivariate_normal distribution.
38
38
39
39
Parameters
40
40
----------
41
41
vars: list
42
42
List of variables to approximate the posterior for.
43
-
n_chains: int
44
-
How many chains to simulate.
45
43
n_samples: int
46
-
How many samples to sample from the approximate posterior for each chain.
44
+
How many samples to sample from the approximate posterior.
0 commit comments