gemclus.data.draw_gmm

gemclus.data.draw_gmm(n, loc, scale, pvals, random_state=None) Tuple[ndarray, ndarray][source]

Returns \(n\) samples drawn from a mixture of Gaussian distributions. The number of components is determined by the number of elements in the lists of the parameters.

Parameters:
n: int

The number of samples to draw from the GMM.

loc: list of K ndarray of shape (d,)

A list containing the means of all components of the Gaussian mixture distributions.

scale: list of K ndarray of shape (d,d)

A list containing the covariances of all components of the Gaussian mixture distribution.

pvals: ndarray of shape (K,)

The proportions of each component of the Gaussian mixture.

random_state: int, RandomState instance or None, default=None

Determines random number generation for dataset creation. Pass an int for reproducible output across multiple runs.

Returns:
X: ndarray of shape (n, d)

The array containing the samples drawn from the mixture model. d is the

y: ndarray of shape (n,)

The component from which each sample originates.

Examples using gemclus.data.draw_gmm

Non parametric clustering

Non parametric clustering

Graph node clustering with a nonparametric model

Graph node clustering with a nonparametric model

Extending GemClus to build your own discriminative clustering model

Extending GemClus to build your own discriminative clustering model