pangeo_fish.hmm.estimator.CachedEstimator.decode#
- CachedEstimator.decode(X, states=None, *, mode='viterbi', spatial_dims=None, temporal_dims=None, progress=False, additional_quantities=['distance', 'speed'])#
Decode the state sequence from the selected model and the data
- Parameters:
X (
xarray.Dataset) – The emission probability maps. The dataset should contain these variables:pdf, the emission probabilitiesmask, a mask to select ocean pixelsinitial, the initial probability mapfinal, the final probability map (optional)
states (
xarray.Dataset, optional) – The precomputed state probability maps. The dataset should contain these variables:states, the state probabilities
mode (
strorlistofstr, default:"viterbi") – The decoding method. Can be one of:"mean": use the centroid of the state probabilities as decoded state"mode": use the maximum of the state probabilities as decoded state"viterbi": use the viterbi algorithm to determine the most probable states
If a list of methods is given, decode using all methods in sequence.
additional_quantities (
Noneorlistofstr, default:[``”distance”, ``"speed"]) – Additional quantities to compute from the decoded tracks. UseNoneor an empty list to not compute anything.Possible values are:
"distance": distance to the previous track point in[km]"speed": average speed for the movement from the previous to the currenttrack point, in
[km/h]
spatial_dims (
listof hashable, optional) – The spatial dimensions of the dataset.temporal_dims (
listof hashable, optional) – The temporal dimensions of the dataset.