Prediction function for a Gaussian Mixture Model object
Prediction function for a Gaussian Mixture Model object
predict_GMM(data, CENTROIDS, COVARIANCE, WEIGHTS)## S3 method for class 'GMMCluster'predict(object, newdata,...)
Arguments
data: matrix or data frame
CENTROIDS: matrix or data frame containing the centroids (means), stored as row vectors
COVARIANCE: matrix or data frame containing the diagonal covariance matrices, stored as row vectors
WEIGHTS: vector containing the weights
object, newdata, ...: arguments for the predict generic
Returns
a list consisting of the log-likelihoods, cluster probabilities and cluster labels.
Details
This function takes the centroids, covariance matrix and weights from a trained model and returns the log-likelihoods, cluster probabilities and cluster labels for new data.