public class GmModel extends AbstractGmModel
AbstractGmModel
using EM updates on GMMs with diagonal covariances. Inspired by Lawrence Saul's EM code.Constructor and Description |
---|
GmModel()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
RealArray |
computeLogWeightedDensities(GmComponents gmc,
RealArray points)
Computes the log of the weighted densities.
|
GmComponents |
initialize(RealArray input,
int nComps,
double regularization)
Initializes the mixture components.
|
void |
update(GmComponents gmc,
RealArray posterior,
RealArray points,
double regularization)
Performs the update rule.
|
computePosterior, train
public GmComponents initialize(RealArray input, int nComps, double regularization)
AbstractGmModel
initialize
in class AbstractGmModel
input
- the input.nComps
- the number of components.regularization
- the regularization hint.public void update(GmComponents gmc, RealArray posterior, RealArray points, double regularization)
AbstractGmModel
update
in class AbstractGmModel
gmc
- the mixture components.posterior
- the posterior distribution p(components | points)
.points
- the input.regularization
- the regularization hint.public RealArray computeLogWeightedDensities(GmComponents gmc, RealArray points)
AbstractGmModel
computeLogWeightedDensities
in class AbstractGmModel
gmc
- the mixture components.points
- the input.p(points | components)
.