MarkovChain.fit

MarkovChain.fit(sequences)[source]

Fits the Markov chain on the provided data and returns the fitted estimator.

Parameters:

sequences (Union[ndarray[Any, dtype[float32]], Tensor, Dataset[Tensor]]) -- The sequences to fit the Markov chain on.

Return type:

MarkovChain

Returns:

The fitted Markov chain.