The goal of GMM is to learn how to create an R-package by implementing Gaussian Mixture Model for clustering a dataset.
Note: This RMarkdown is created following the guidelines of this R-package example.
You can only install the development version from this repository with:
# install.packages("devtools")
devtools::install_github("Prapti-044/GMM")
This is a basic example which shows you how to cluster the iris dataset:
library(GMM)
result <- apply.GMM(as.matrix(iris[,-5]), 3)
str(result)
#> List of 2
#> $ loglik : num -740
#> $ classification: int [1:150] 2 2 2 2 2 3 2 2 2 2 ...
#> - attr(*, "class")= chr [1:2] "list" "result"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.