Convert NumPyro data into an InferenceData object.
If no dims are provided, this will infer batch dim names from NumPyro model plates. For event dim names, such as with the ZeroSumNormal, infer={"event_dims":dim_names}
can be provided in numpyro.sample, i.e.:
# equivalent to dims entry, {"gamma": ["groups"]} gamma = numpyro.sample( "gamma", dist.ZeroSumNormal(1, event_shape=(n_groups,)), infer={"event_dims":["groups"]} )
There is also an additional extra_event_dims
input to cover any edge cases, for instance deterministic sites with event dims (which dont have an infer
argument to provide metadata).
For a usage example read the Creating InferenceData section on from_numpyro
numpyro.mcmc.MCMC
Fitted MCMC object from NumPyro
Prior samples from a NumPyro model
dict
Posterior predictive samples for the posterior
Out of sample predictions
Dictionary containing constant data variables mapped to their values.
Constant data used for out-of-sample predictions.
int
, optional
dict
[str
] -> list
[str
]
Map of dimensions to coordinates
dict
[str
] -> list
[str
]
Map variable names to their coordinates. Will be inferred if they are not provided.
Dims for predictions data. Map variable names to their coordinates. Default behavior is to infer dims if this is not provided
Number of chains used for sampling. Ignored if posterior is present.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4