powered by
covw(X, Z, normalize = TRUE)
Z
# Z as an indicator matrix X = iris[,1:4] Z = unmap(iris$Species) str(covw(X, Z)) # Z as a matrix of weights mod = Mclust(X, G = 3, modelNames = "VVV") str(covw(X, mod$z))
Run the code above in your browser using DataLab