pangeo_fish.hmm.estimator.CachedEstimator#
- class pangeo_fish.hmm.estimator.CachedEstimator(predictor_factory: callable, sigma: float | None = None, cache: str | PathLike | BaseStore | MutableMapping = None, progress: bool = False)#
Estimator to train and predict gaussian random walk hidden markov models
This estimator caches intermediate data to a zarr store, allowing it to compute tracks that wouldn’t fit into memory otherwise, even on very big machines.
- Parameters:
predictor_factory (callable) – Factory for the predictor class. It expects the parameter (“sigma”) as a keyword argument and returns the predictor instance.
sigma (
float, optional) – The primary model parameter: the standard deviation of the distance per time unit traveled by the fish, in the same unit as the grid coordinates.cache (
strorzarr.Store) – Zarr store to write intermediate results to.
- __init__(predictor_factory: callable, sigma: float | None = None, cache: str | PathLike | BaseStore | MutableMapping = None, progress: bool = False) None#
Methods
__init__(predictor_factory[, sigma, cache, ...])decode(X[, states, mode, spatial_dims, ...])Decode the state sequence from the selected model and the data
predict_proba(X, *[, cache, spatial_dims, ...])Predict the state probabilities
score(X, *[, cache, spatial_dims, ...])Score the fit of the selected model to the data
set_params(**params)Set the parameters on a new instance
to_dict()Attributes
cacheprogresssigmapredictor_factory