mlpack.gmm_probability

gmm_probability(...)GMM Probability Calculator

>>> from mlpack import gmm_probability

This program calculates the probability that given points came from a given GMM (that is, P(X | gmm)). The GMM is specified with the 'input_model' parameter, and the points are specified with the 'input' parameter. The output probabilities may be saved via the 'output' output parameter.

So, for example, to calculate the probabilities of each point in 'points' coming from the pre-trained GMM 'gmm', while storing those probabilities in 'probs', the following command could be used:

>>> output = gmm_probability(input_model=gmm, input=points)

>>> probs = output['output']

## input options

- input (numpy matrix or arraylike, float dtype): [required] Input matrix to calculate probabilities of.
- input_model (mlpack.GMMType): [required] Input GMM to use as model.
- copy_all_inputs (bool): If specified, all input parameters will be deep copied before the method is run. This is useful for debugging problems where the input parameters are being modified by the algorithm, but can slow down the code.
- verbose (bool): Display informational messages and the full list of parameters and timers at the end of execution.

## output options

The return value from the binding is a dict containing the following elements:

- output (numpy matrix, float dtype): Matrix to store calculated probabilities in.