File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed
Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,31 @@ def fit_INLA(
1515 return_latent_posteriors : bool = False ,
1616 ** sampler_kwargs ,
1717) -> az .InferenceData :
18- """
19- TODO ADD DOCSTRING
18+ r"""
19+ Performs inference over a linear mixed model using Integrated Nested Laplace Approximations (INLA).
20+
21+ As it stands, INLA in PyMC Extras has three main limitations:
22+
23+ - Does not support inference over the latent field, only the hyperparameters.
24+ - Optimisation for $\mu^*$ is bottlenecked by calling `minimize`, and to a lesser extent, computing the hessian $f^"(x)$.
25+ - Does not offer sparse support which can provide significant speedups.
26+
27+ Parameters
28+ ----------
29+ x: TensorVariable
30+ The latent gaussian to marginalize out.
31+ Q: TensorVariable
32+ Precision matrix of the latent field.
33+ minimizer_seed: int
34+ Seed for random initialisation of the minimum point x*.
35+ model: pm.Model
36+ PyMC model.
37+ minimizer_kwargs:
38+ Kwargs to pass to pytensor.optimize.minimize during the optimization step maximizing logp(x | y, params).
39+ returned_latent_posteriors:
40+ If True, also return posteriors for the latent Gaussian field (currently unsupported).
41+ sampler_kwargs:
42+ Kwargs to pass to pm.sample.
2043 """
2144 model = pm .modelcontext (model )
2245
You can’t perform that action at this time.
0 commit comments