From 909c050a3ea4437d3eee997c37cd9975d8dc97fe Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 19 Nov 2024 08:55:12 +0100 Subject: [PATCH] cluster --- R/1_model_parameters.R | 2 +- R/cluster_performance.R | 37 +++----- R/methods_dbscan.R | 27 ------ R/methods_hclust.R | 102 +++++++++++++------- R/methods_kmeans.R | 54 ----------- R/methods_mclust.R | 7 -- R/methods_pam.R | 15 --- man/cluster_performance.Rd | 24 +---- man/model_parameters.Rd | 2 +- man/model_parameters.hclust.Rd | 101 ++++++++++++++++++++ man/model_parameters.kmeans.Rd | 164 --------------------------------- pkgdown/_pkgdown.yml | 2 +- 12 files changed, 188 insertions(+), 349 deletions(-) create mode 100644 man/model_parameters.hclust.Rd delete mode 100644 man/model_parameters.kmeans.Rd diff --git a/R/1_model_parameters.R b/R/1_model_parameters.R index 1345b122d..0d94c256c 100644 --- a/R/1_model_parameters.R +++ b/R/1_model_parameters.R @@ -16,7 +16,7 @@ #' - [Bayesian][model_parameters.stanreg()]: **BayesFactor**, **blavaan**, **brms**, #' **MCMCglmm**, **posterior**, **rstanarm**, `bayesQR`, `bcplm`, `BGGM`, `blmrm`, #' `blrm`, `mcmc.list`, `MCMCglmm`, ... -#' - [Clustering][model_parameters.kmeans()]: **hclust**, **kmeans**, **mclust**, **pam**, ... +#' - [Clustering][model_parameters.hclust()]: **hclust**, **kmeans**, **mclust**, **pam**, ... #' - [Correlations, t-tests, etc.][model_parameters.htest()]: **lmtest**, `htest`, #' `pairwise.htest`, ... #' - [Meta-Analysis][model_parameters.rma()]: **metaBMA**, **metafor**, **metaplus**, ... diff --git a/R/cluster_performance.R b/R/cluster_performance.R index 9c7f506db..3cae1dfde 100644 --- a/R/cluster_performance.R +++ b/R/cluster_performance.R @@ -2,19 +2,28 @@ #' #' Compute performance indices for clustering solutions. #' -#' @inheritParams model_parameters.kmeans +#' @inheritParams model_parameters.hclust #' #' @examples #' # kmeans #' model <- kmeans(iris[1:4], 3) #' cluster_performance(model) +#' +#' # hclust +#' data <- iris[1:4] +#' model <- hclust(dist(data)) +#' clusters <- cutree(model, 3) +#' cluster_performance(model, data, clusters) +#' +#' # Retrieve performance from parameters +#' params <- model_parameters(kmeans(iris[1:4], 3)) +#' cluster_performance(params) #' @export cluster_performance <- function(model, ...) { UseMethod("cluster_performance") } -#' @rdname cluster_performance #' @export cluster_performance.kmeans <- function(model, ...) { out <- as.data.frame(model[c("totss", "betweenss", "tot.withinss")]) @@ -29,18 +38,7 @@ cluster_performance.kmeans <- function(model, ...) { } - - - #' @rdname cluster_performance -#' @examples -#' # hclust -#' data <- iris[1:4] -#' model <- hclust(dist(data)) -#' clusters <- cutree(model, 3) -#' -#' rez <- cluster_performance(model, data, clusters) -#' rez #' @export cluster_performance.hclust <- function(model, data, clusters, ...) { if (is.null(data)) { @@ -60,13 +58,6 @@ cluster_performance.hclust <- function(model, data, clusters, ...) { } -#' @rdname cluster_performance -#' @examplesIf require("dbscan", quietly = TRUE) -#' # DBSCAN -#' model <- dbscan::dbscan(iris[1:4], eps = 1.45, minPts = 10) -#' -#' rez <- cluster_performance(model, iris[1:4]) -#' rez #' @export cluster_performance.dbscan <- function(model, data, ...) { if (is.null(data)) { @@ -84,12 +75,6 @@ cluster_performance.dbscan <- function(model, data, ...) { # Base -------------------------------------------------------------------- - -#' @rdname cluster_performance -#' @examples -#' # Retrieve performance from parameters -#' params <- model_parameters(kmeans(iris[1:4], 3)) -#' cluster_performance(params) #' @export cluster_performance.parameters_clusters <- function(model, ...) { valid <- model$Cluster != 0 & model$Cluster != "0" # Valid clusters diff --git a/R/methods_dbscan.R b/R/methods_dbscan.R index 7ccfbb9b9..965539a9a 100644 --- a/R/methods_dbscan.R +++ b/R/methods_dbscan.R @@ -1,30 +1,3 @@ -#' @rdname model_parameters.kmeans -#' @inheritParams cluster_centers -#' -#' @examples -#' \donttest{ -#' # DBSCAN --------------------------- -#' if (require("dbscan", quietly = TRUE)) { -#' model <- dbscan::dbscan(iris[1:4], eps = 1.45, minPts = 10) -#' -#' rez <- model_parameters(model, iris[1:4]) -#' rez -#' -#' # Get clusters -#' predict(rez) -#' -#' # Clusters centers in long form -#' attributes(rez)$means -#' -#' # Between and Total Sum of Squares -#' attributes(rez)$Sum_Squares_Total -#' attributes(rez)$Sum_Squares_Between -#' -#' # HDBSCAN -#' model <- dbscan::hdbscan(iris[1:4], minPts = 10) -#' model_parameters(model, iris[1:4]) -#' } -#' } #' @export model_parameters.dbscan <- function(model, data = NULL, clusters = NULL, ...) { if (is.null(data)) { diff --git a/R/methods_hclust.R b/R/methods_hclust.R index 4698080f5..a4a0773e2 100644 --- a/R/methods_hclust.R +++ b/R/methods_hclust.R @@ -1,7 +1,29 @@ -#' @rdname model_parameters.kmeans -#' @inheritParams cluster_centers +#' Parameters from Cluster Models (k-means, ...) +#' +#' Format cluster models obtained for example by [kmeans()]. +#' +#' @param model Cluster model. +#' @inheritParams model_parameters.default +#' @param ... Arguments passed to or from other methods. +#' +#' @examplesIf require("factoextra", quietly = TRUE) && require("dbscan", quietly = TRUE) && require("cluster", quietly = TRUE) && require("fpc", quietly = TRUE) +#' \donttest{ +#' # +#' # K-means ------------------------------- +#' model <- kmeans(iris[1:4], centers = 3) +#' rez <- model_parameters(model) +#' rez +#' +#' # Get clusters +#' predict(rez) +#' +#' # Clusters centers in long form +#' attributes(rez)$means +#' +#' # Between and Total Sum of Squares +#' attributes(rez)$Sum_Squares_Total +#' attributes(rez)$Sum_Squares_Between #' -#' @examples #' # #' # Hierarchical clustering (hclust) --------------------------- #' data <- iris[1:4] @@ -20,6 +42,52 @@ #' # Between and Total Sum of Squares #' attributes(rez)$Total_Sum_Squares #' attributes(rez)$Between_Sum_Squares +#' +#' # +#' # Hierarchical K-means (factoextra::hkclust) ---------------------- +#' data <- iris[1:4] +#' model <- factoextra::hkmeans(data, k = 3) +#' +#' rez <- model_parameters(model) +#' rez +#' +#' # Get clusters +#' predict(rez) +#' +#' # Clusters centers in long form +#' attributes(rez)$means +#' +#' # Between and Total Sum of Squares +#' attributes(rez)$Sum_Squares_Total +#' attributes(rez)$Sum_Squares_Between +#' +#' # K-Medoids (PAM and HPAM) ============== +#' model <- cluster::pam(iris[1:4], k = 3) +#' model_parameters(model) +#' +#' model <- fpc::pamk(iris[1:4], criterion = "ch") +#' model_parameters(model) +#' +#' # DBSCAN --------------------------- +#' model <- dbscan::dbscan(iris[1:4], eps = 1.45, minPts = 10) +#' +#' rez <- model_parameters(model, iris[1:4]) +#' rez +#' +#' # Get clusters +#' predict(rez) +#' +#' # Clusters centers in long form +#' attributes(rez)$means +#' +#' # Between and Total Sum of Squares +#' attributes(rez)$Sum_Squares_Total +#' attributes(rez)$Sum_Squares_Between +#' +#' # HDBSCAN +#' model <- dbscan::hdbscan(iris[1:4], minPts = 10) +#' model_parameters(model, iris[1:4]) +#' } #' @export model_parameters.hclust <- function(model, data = NULL, clusters = NULL, ...) { if (is.null(data)) { @@ -58,34 +126,6 @@ model_parameters.hclust <- function(model, data = NULL, clusters = NULL, ...) { #' @inheritParams n_clusters -#' @rdname model_parameters.kmeans -#' @examples -#' \donttest{ -#' # -#' # pvclust (finds "significant" clusters) --------------------------- -#' if (require("pvclust", quietly = TRUE)) { -#' data <- iris[1:4] -#' # NOTE: pvclust works on transposed data -#' model <- pvclust::pvclust(datawizard::data_transpose(data, verbose = FALSE), -#' method.dist = "euclidean", -#' nboot = 50, -#' quiet = TRUE -#' ) -#' -#' rez <- model_parameters(model, data, ci = 0.90) -#' rez -#' -#' # Get clusters -#' predict(rez) -#' -#' # Clusters centers in long form -#' attributes(rez)$means -#' -#' # Between and Total Sum of Squares -#' attributes(rez)$Sum_Squares_Total -#' attributes(rez)$Sum_Squares_Between -#' } -#' } #' @export model_parameters.pvclust <- function(model, data = NULL, clusters = NULL, ci = 0.95, ...) { if (is.null(data)) { diff --git a/R/methods_kmeans.R b/R/methods_kmeans.R index e28a7a11f..3ee0d0241 100644 --- a/R/methods_kmeans.R +++ b/R/methods_kmeans.R @@ -1,29 +1,3 @@ -#' Parameters from Cluster Models (k-means, ...) -#' -#' Format cluster models obtained for example by [kmeans()]. -#' -#' @param model Cluster model. -#' @inheritParams model_parameters.default -#' @param ... Arguments passed to or from other methods. -#' -#' @examples -#' \donttest{ -#' # -#' # K-means ------------------------------- -#' model <- kmeans(iris[1:4], centers = 3) -#' rez <- model_parameters(model) -#' rez -#' -#' # Get clusters -#' predict(rez) -#' -#' # Clusters centers in long form -#' attributes(rez)$means -#' -#' # Between and Total Sum of Squares -#' attributes(rez)$Sum_Squares_Total -#' attributes(rez)$Sum_Squares_Between -#' } #' @export model_parameters.kmeans <- function(model, ...) { params <- cbind( @@ -64,32 +38,6 @@ model_parameters.kmeans <- function(model, ...) { # factoextra::hkmeans ----------------------------------------------------- - -#' @rdname model_parameters.kmeans -#' @inheritParams cluster_centers -#' -#' @examples -#' \donttest{ -#' # -#' # Hierarchical K-means (factoextra::hkclust) ---------------------- -#' if (require("factoextra", quietly = TRUE)) { -#' data <- iris[1:4] -#' model <- factoextra::hkmeans(data, k = 3) -#' -#' rez <- model_parameters(model) -#' rez -#' -#' # Get clusters -#' predict(rez) -#' -#' # Clusters centers in long form -#' attributes(rez)$means -#' -#' # Between and Total Sum of Squares -#' attributes(rez)$Sum_Squares_Total -#' attributes(rez)$Sum_Squares_Between -#' } -#' } #' @export model_parameters.hkmeans <- model_parameters.kmeans @@ -98,8 +46,6 @@ model_parameters.hkmeans <- model_parameters.kmeans # Methods ------------------------------------------------------------------- - - #' @export print.parameters_clusters <- function(x, digits = 2, ...) { clusterHeading <- "# Clustering Solution" diff --git a/R/methods_mclust.R b/R/methods_mclust.R index 2ea99b033..f8cc2993b 100644 --- a/R/methods_mclust.R +++ b/R/methods_mclust.R @@ -1,10 +1,3 @@ -#' @rdname model_parameters.kmeans -#' -#' @examples -#' if (require("mclust", quietly = TRUE)) { -#' model <- mclust::Mclust(iris[1:4], verbose = FALSE) -#' model_parameters(model) -#' } #' @export model_parameters.Mclust <- function(model, data = NULL, clusters = NULL, ...) { if (is.null(data)) data <- as.data.frame(model$data) diff --git a/R/methods_pam.R b/R/methods_pam.R index 313f600ea..a6621b7e6 100644 --- a/R/methods_pam.R +++ b/R/methods_pam.R @@ -1,18 +1,3 @@ -#' @rdname model_parameters.kmeans -#' -#' @examples -#' \donttest{ -#' # -#' # K-Medoids (PAM and HPAM) ============== -#' if (require("cluster", quietly = TRUE)) { -#' model <- cluster::pam(iris[1:4], k = 3) -#' model_parameters(model) -#' } -#' if (require("fpc", quietly = TRUE)) { -#' model <- fpc::pamk(iris[1:4], criterion = "ch") -#' model_parameters(model) -#' } -#' } #' @export model_parameters.pam <- function(model, data = NULL, clusters = NULL, ...) { if (is.null(data)) data <- as.data.frame(model$data) diff --git a/man/cluster_performance.Rd b/man/cluster_performance.Rd index 90e3ff15c..025a3edb8 100644 --- a/man/cluster_performance.Rd +++ b/man/cluster_performance.Rd @@ -2,30 +2,17 @@ % Please edit documentation in R/cluster_performance.R \name{cluster_performance} \alias{cluster_performance} -\alias{cluster_performance.kmeans} \alias{cluster_performance.hclust} -\alias{cluster_performance.dbscan} -\alias{cluster_performance.parameters_clusters} \title{Performance of clustering models} \usage{ cluster_performance(model, ...) -\method{cluster_performance}{kmeans}(model, ...) - \method{cluster_performance}{hclust}(model, data, clusters, ...) - -\method{cluster_performance}{dbscan}(model, data, ...) - -\method{cluster_performance}{parameters_clusters}(model, ...) } \arguments{ \item{model}{Cluster model.} \item{...}{Arguments passed to or from other methods.} - -\item{data}{A data.frame.} - -\item{clusters}{A vector with clusters assignments (must be same length as rows in data).} } \description{ Compute performance indices for clustering solutions. @@ -34,20 +21,13 @@ Compute performance indices for clustering solutions. # kmeans model <- kmeans(iris[1:4], 3) cluster_performance(model) + # hclust data <- iris[1:4] model <- hclust(dist(data)) clusters <- cutree(model, 3) +cluster_performance(model, data, clusters) -rez <- cluster_performance(model, data, clusters) -rez -\dontshow{if (require("dbscan", quietly = TRUE)) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} -# DBSCAN -model <- dbscan::dbscan(iris[1:4], eps = 1.45, minPts = 10) - -rez <- cluster_performance(model, iris[1:4]) -rez -\dontshow{\}) # examplesIf} # Retrieve performance from parameters params <- model_parameters(kmeans(iris[1:4], 3)) cluster_performance(params) diff --git a/man/model_parameters.Rd b/man/model_parameters.Rd index 4c57e319e..d106e485a 100644 --- a/man/model_parameters.Rd +++ b/man/model_parameters.Rd @@ -46,7 +46,7 @@ the model-specific documentation: \item \link[=model_parameters.stanreg]{Bayesian}: \strong{BayesFactor}, \strong{blavaan}, \strong{brms}, \strong{MCMCglmm}, \strong{posterior}, \strong{rstanarm}, \code{bayesQR}, \code{bcplm}, \code{BGGM}, \code{blmrm}, \code{blrm}, \code{mcmc.list}, \code{MCMCglmm}, ... -\item \link[=model_parameters.kmeans]{Clustering}: \strong{hclust}, \strong{kmeans}, \strong{mclust}, \strong{pam}, ... +\item \link[=model_parameters.hclust]{Clustering}: \strong{hclust}, \strong{kmeans}, \strong{mclust}, \strong{pam}, ... \item \link[=model_parameters.htest]{Correlations, t-tests, etc.}: \strong{lmtest}, \code{htest}, \code{pairwise.htest}, ... \item \link[=model_parameters.rma]{Meta-Analysis}: \strong{metaBMA}, \strong{metafor}, \strong{metaplus}, ... diff --git a/man/model_parameters.hclust.Rd b/man/model_parameters.hclust.Rd new file mode 100644 index 000000000..39fe4c989 --- /dev/null +++ b/man/model_parameters.hclust.Rd @@ -0,0 +1,101 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/methods_hclust.R +\name{model_parameters.hclust} +\alias{model_parameters.hclust} +\title{Parameters from Cluster Models (k-means, ...)} +\usage{ +\method{model_parameters}{hclust}(model, data = NULL, clusters = NULL, ...) +} +\arguments{ +\item{model}{Cluster model.} + +\item{...}{Arguments passed to or from other methods.} +} +\description{ +Format cluster models obtained for example by \code{\link[=kmeans]{kmeans()}}. +} +\examples{ +\dontshow{if (require("factoextra", quietly = TRUE) && require("dbscan", quietly = TRUE) && require("cluster", quietly = TRUE) && require("fpc", quietly = TRUE)) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\donttest{ +# +# K-means ------------------------------- +model <- kmeans(iris[1:4], centers = 3) +rez <- model_parameters(model) +rez + +# Get clusters +predict(rez) + +# Clusters centers in long form +attributes(rez)$means + +# Between and Total Sum of Squares +attributes(rez)$Sum_Squares_Total +attributes(rez)$Sum_Squares_Between + +# +# Hierarchical clustering (hclust) --------------------------- +data <- iris[1:4] +model <- hclust(dist(data)) +clusters <- cutree(model, 3) + +rez <- model_parameters(model, data, clusters) +rez + +# Get clusters +predict(rez) + +# Clusters centers in long form +attributes(rez)$means + +# Between and Total Sum of Squares +attributes(rez)$Total_Sum_Squares +attributes(rez)$Between_Sum_Squares + +# +# Hierarchical K-means (factoextra::hkclust) ---------------------- +data <- iris[1:4] +model <- factoextra::hkmeans(data, k = 3) + +rez <- model_parameters(model) +rez + +# Get clusters +predict(rez) + +# Clusters centers in long form +attributes(rez)$means + +# Between and Total Sum of Squares +attributes(rez)$Sum_Squares_Total +attributes(rez)$Sum_Squares_Between + +# K-Medoids (PAM and HPAM) ============== +model <- cluster::pam(iris[1:4], k = 3) +model_parameters(model) + +model <- fpc::pamk(iris[1:4], criterion = "ch") +model_parameters(model) + +# DBSCAN --------------------------- +model <- dbscan::dbscan(iris[1:4], eps = 1.45, minPts = 10) + +rez <- model_parameters(model, iris[1:4]) +rez + +# Get clusters +predict(rez) + +# Clusters centers in long form +attributes(rez)$means + +# Between and Total Sum of Squares +attributes(rez)$Sum_Squares_Total +attributes(rez)$Sum_Squares_Between + +# HDBSCAN +model <- dbscan::hdbscan(iris[1:4], minPts = 10) +model_parameters(model, iris[1:4]) +} +\dontshow{\}) # examplesIf} +} diff --git a/man/model_parameters.kmeans.Rd b/man/model_parameters.kmeans.Rd deleted file mode 100644 index 739773efd..000000000 --- a/man/model_parameters.kmeans.Rd +++ /dev/null @@ -1,164 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/methods_dbscan.R, R/methods_hclust.R, -% R/methods_kmeans.R, R/methods_mclust.R, R/methods_pam.R -\name{model_parameters.dbscan} -\alias{model_parameters.dbscan} -\alias{model_parameters.hclust} -\alias{model_parameters.pvclust} -\alias{model_parameters.kmeans} -\alias{model_parameters.hkmeans} -\alias{model_parameters.Mclust} -\alias{model_parameters.pam} -\title{Parameters from Cluster Models (k-means, ...)} -\usage{ -\method{model_parameters}{dbscan}(model, data = NULL, clusters = NULL, ...) - -\method{model_parameters}{hclust}(model, data = NULL, clusters = NULL, ...) - -\method{model_parameters}{pvclust}(model, data = NULL, clusters = NULL, ci = 0.95, ...) - -\method{model_parameters}{kmeans}(model, ...) - -\method{model_parameters}{hkmeans}(model, ...) - -\method{model_parameters}{Mclust}(model, data = NULL, clusters = NULL, ...) - -\method{model_parameters}{pam}(model, data = NULL, clusters = NULL, ...) -} -\arguments{ -\item{model}{Cluster model.} - -\item{data}{A data.frame.} - -\item{clusters}{A vector with clusters assignments (must be same length as rows in data).} - -\item{...}{Arguments passed to or from other methods.} - -\item{ci}{Confidence Interval (CI) level. Default to \code{0.95} (\verb{95\%}).} -} -\description{ -Format cluster models obtained for example by \code{\link[=kmeans]{kmeans()}}. -} -\examples{ -\donttest{ -# DBSCAN --------------------------- -if (require("dbscan", quietly = TRUE)) { - model <- dbscan::dbscan(iris[1:4], eps = 1.45, minPts = 10) - - rez <- model_parameters(model, iris[1:4]) - rez - - # Get clusters - predict(rez) - - # Clusters centers in long form - attributes(rez)$means - - # Between and Total Sum of Squares - attributes(rez)$Sum_Squares_Total - attributes(rez)$Sum_Squares_Between - - # HDBSCAN - model <- dbscan::hdbscan(iris[1:4], minPts = 10) - model_parameters(model, iris[1:4]) -} -} -# -# Hierarchical clustering (hclust) --------------------------- -data <- iris[1:4] -model <- hclust(dist(data)) -clusters <- cutree(model, 3) - -rez <- model_parameters(model, data, clusters) -rez - -# Get clusters -predict(rez) - -# Clusters centers in long form -attributes(rez)$means - -# Between and Total Sum of Squares -attributes(rez)$Total_Sum_Squares -attributes(rez)$Between_Sum_Squares -\donttest{ -# -# pvclust (finds "significant" clusters) --------------------------- -if (require("pvclust", quietly = TRUE)) { - data <- iris[1:4] - # NOTE: pvclust works on transposed data - model <- pvclust::pvclust(datawizard::data_transpose(data, verbose = FALSE), - method.dist = "euclidean", - nboot = 50, - quiet = TRUE - ) - - rez <- model_parameters(model, data, ci = 0.90) - rez - - # Get clusters - predict(rez) - - # Clusters centers in long form - attributes(rez)$means - - # Between and Total Sum of Squares - attributes(rez)$Sum_Squares_Total - attributes(rez)$Sum_Squares_Between -} -} -\donttest{ -# -# K-means ------------------------------- -model <- kmeans(iris[1:4], centers = 3) -rez <- model_parameters(model) -rez - -# Get clusters -predict(rez) - -# Clusters centers in long form -attributes(rez)$means - -# Between and Total Sum of Squares -attributes(rez)$Sum_Squares_Total -attributes(rez)$Sum_Squares_Between -} -\donttest{ -# -# Hierarchical K-means (factoextra::hkclust) ---------------------- -if (require("factoextra", quietly = TRUE)) { - data <- iris[1:4] - model <- factoextra::hkmeans(data, k = 3) - - rez <- model_parameters(model) - rez - - # Get clusters - predict(rez) - - # Clusters centers in long form - attributes(rez)$means - - # Between and Total Sum of Squares - attributes(rez)$Sum_Squares_Total - attributes(rez)$Sum_Squares_Between -} -} -if (require("mclust", quietly = TRUE)) { - model <- mclust::Mclust(iris[1:4], verbose = FALSE) - model_parameters(model) -} -\donttest{ -# -# K-Medoids (PAM and HPAM) ============== -if (require("cluster", quietly = TRUE)) { - model <- cluster::pam(iris[1:4], k = 3) - model_parameters(model) -} -if (require("fpc", quietly = TRUE)) { - model <- fpc::pamk(iris[1:4], criterion = "ch") - model_parameters(model) -} -} -} diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 963d63490..031ea3ba1 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -27,7 +27,7 @@ reference: - model_parameters.mlm - model_parameters.glmmTMB - model_parameters.lavaan - - model_parameters.kmeans + - model_parameters.hclust - model_parameters.Mclust - model_parameters.mira - model_parameters.PCA