MarkovChain.sample

MarkovChain.sample(num_sequences, sequence_length)[source]

Samples state sequences from the fitted Markov chain.

Parameters
  • num_sequences (int) -- The number of sequences to sample.

  • sequence_length (int) -- The length of the sequences to sample.

Return type

Tensor

Returns

The sampled sequences as a tensor of shape [num_sequences, sequence_length].

Note

This method does not parallelize across multiple processes, i.e. performs no synchronization.