GaussianMixtureModel.sample

GaussianMixtureModel.sample(num_datapoints)[source]

Samples the provided number of datapoints from the GMM.

Parameters:

num_datapoints (int) -- The number of datapoints to sample.

Return type:

Tensor

Returns:

A tensor of shape [num_datapoints, num_features] with the random samples.

Attention

This method does not automatically perform batching. If you need to sample many datapoints, call this method multiple times.