pangeo_fish.hmm.estimator.EagerEstimator.decode

pangeo_fish.hmm.estimator.EagerEstimator.decode#

EagerEstimator.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 probabilities

    • mask: a mask to select ocean pixels

    • initial: the initial probability map

    • final: 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 (str or list of str, default: "viterbi") – The decoding method. Possible values are:

    • "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 (None or list of str, default: [``”distance”, ``"speed"]) – Additional quantities to compute from the decoded tracks. Use None or an empty list to compute nothing.

    Possible values are:

    • "distance": distance to the previous track point in [km].

    • "speed": average speed from the previous to the current track point in [km/h].