pangeo_fish.hmm.estimator.CachedEstimator.predict_proba

pangeo_fish.hmm.estimator.CachedEstimator.predict_proba#

CachedEstimator.predict_proba(X, *, cache=None, spatial_dims=None, temporal_dims=None, progress=None)#

Predict the state probabilities

This is done by applying the forward-backward algorithm to the data.

Parameters:
  • X (xarray.Dataset) – The emission probability maps. The dataset should contain these variables:

    • initial, the initial probability map

    • pdf, the emission probabilities

    • mask, a mask to select ocean pixels

  • cache (str, pathlib.Path or zarr.Store) – Path to the cache store. Used to compute the state probabilities with nearly constant memory usage.

  • spatial_dims (list of hashable, optional) – The spatial dimensions of the dataset.

  • temporal_dims (list of hashable, optional) – The temporal dimensions of the dataset.

Returns:

state_probabilities (xarray.DataArray) – The computed state probabilities

Notes

The convolution implementation does not allow skipping nan values. Thus, we replace these with zeroes, apply the filter, and at the end revert back to nans.