# Generate sample data
set.seed(123)
data <- matrix(rnorm(100 * 2), ncol = 2)
# Run GMM clustering with multiple initialization methods
results <- runGMM(data, k = 2)
# Select the best GMM based on BIC
best_model <- BestGMM(results)
# Print the best model
print(best_model)
Run the code above in your browser using DataLab