MATLAB File Help: cv.EM/trainEM | Index |
Estimate the Gaussian mixture parameters from a samples set
[logLikelihoods, labels, probs] = model.trainEM(samples)
double
type it will be converted to the inner matrix of such type
for the further computing.nsamples-by-1
size and double
type.labels_i = argmax_{k}(p_{i,k}), i=1..N
(indices of the
most probable mixture component for each sample). It has
nsamples-by-1
size and single
type.nsamples-by-ClustersNumber
size and
double
type.This variation starts with Expectation step. Initial values of the model parameters will be estimated by the k-means algorithm.
Unlike many of the ML models, EM is an unsupervised learning
algorithm and it does not take responses
(class labels or
function values) as input. Instead, it computes the Maximum
Likelihood Estimate of the Gaussian mixture parameters from an
input sample set, stores all the parameters inside the
structure: p_{i,k}
in probs
, a_k
in means
, S_k
in
covs[k]
, PI_k
in weights
, and optionally computes the
output "class label" for each sample:
labels_i = argmax_{k}(p_{i,k}), i=1..N
(indices of the most
probable mixture component for each sample).
The trained model can be used further for prediction, just like any other classifier. The trained model is similar to the cv.NormalBayesClassifier.
Access | public |
Sealed | false |
Static | false |