Plexora

fit_mixture

Fit a Gaussian mixture to one column of values, as Plexora fits it.

Generated from Plexora 0.0.55View source
from plexora.api import fit_mixture
fit_mixture(values, components=3)

components Gaussians over values (1-D), seeded, in the values' own floating type. Within page_fits() on the website the fit may be made by one of the page's helper Pythons -- the same code and build, so the same numbers -- and AskAgain is raised while it is being made.

Parameters

valuesnumpy.ndarrayrequired

The values, 1-D.

componentsintdefault 3

How many Gaussians. Defaults to 3.

Returns

numpy.ndarray

The means, then the variances, then the weights, each of components, in the order the fit found them.