function_space.FunctionSpaceMethod
function_space.FunctionSpaceMethod()A function-space method: passes over the data that end in the posterior itself.
The posterior is a GP whose kernel contains the prior’s covariance (\(J \Sigma_0 J^\top\)), so plan takes the prior. Passes, statistics and generators are those of a weight-space Staged. fs.laplace swaps the real likelihood in with lk.replace, so the posterior must be a dataclass with a likelihood field.
Attributes
| Name | Description |
|---|---|
| requires | What the method needs from the model and the likelihood. |
Methods
| Name | Description |
|---|---|
| plan | The method’s passes, before any data. |
plan
function_space.FunctionSpaceMethod.plan(params, ctx, prior, /)The method’s passes, before any data.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| params | Params | The fitted params, where the model is linearized. | required |
| ctx | FitContext | The fit’s context. | required |
| prior | PriorWithCovariance | The prior over params. Its covariance \(\Sigma_0\) enters the kernel. |
required |
Returns
| Name | Type | Description |
|---|---|---|
| Pass[_B_co] | The first Pass of a chain built with chain(...), ending in Done with the posterior. |
Raises
| Name | Type | Description |
|---|---|---|
| CapabilityError | Implementations may raise it when the model or likelihood lacks something the method needs. | |
| StructureError | Implementations may raise it when the params or layout don’t fit the method. |