inferlo.pairwise.bruteforce.sample_bruteforce

inferlo.pairwise.bruteforce.sample_bruteforce(model: PairWiseFiniteModel, num_samples: int) np.array[source]

Samples from Pairwise Finite model.

Explicitly calculates probabilities of every state and uses them to sample from categorical distribution.

Parameters:
  • model – Model to sample from.

  • num_samples – Number of samples.

Returns:

np.array of type np.int32 and shape (num_samples, gr_size). Every row is an independent sample.