medil.models.GaussianMCM.sample

GaussianMCM.sample(sample_size: int, include_latent: bool = False) numpy.typing.NDArray[source]

Sample observations from a GaussianMCM.

Requires biadj and parameters to be set, either by calling fit() or by constructing the model via medil.sample.mcm().

Parameters:
  • sample_size (int) – Number of observations to draw.

  • include_latent (bool, optional) – If True, also return the sampled latent variables.

Returns:

  • samples (ndarray of shape (sample_size, num_meas))

  • latent_samples (ndarray of shape (sample_size, num_latent), only if include_latent=True)