DMM.model_gm#
module for Gaussian mixture model
- class ModelGM(w=1, x=0, std=1)#
Bases:
object
class for 1-d Gaussian mixture model weights: ndarray of weights centers: ndarray of means sigma: standard deviations
Initialize a GM model w: arrary of weights x: arrary of means std: scalar or array of standard deviations. If scalar, components share the same std.
- mean_rv()#
discrete rv for the means
- moments_gm(degree)#
moments of GM model
Args: degree: int highest degree k
Returns: moments of Gaussian mixture model from degree 1 to k
- std_rv()#
discrete rv for the sigmas
- sample_gm(model, num)#
n random samples from Gaussian mixture model