Computes the assignment weights of a single point to the different distributions that we are fitting.
The value of this point.
An array containing the weights of all current distributions.
An array containing all distributions we have fit.
Returns a tuple containing the per-point weights of all distributions, and the expected complete log likelihood contribution of this point.
Implements the basic expectation stage for most EM algorithms.
An RDD of data points.
An array containing the distributions fit in the last iteration. This array should contain k distributions, where k is the number of components in the mixture.
The weights of the different distributions.
Returns an RDD of assignments to classes, and the total ECLL.
Runs an EM loop to fit a mixture model.
An RDD of doubles to fit the mixture model to.
The initial distributions to start running EM from.
The maximum number of iterations to run.
Returns an array of fit distributions.
Initializes the distributions, given a mean and a sigma.
Trains a mixture model on an integer dataset.