View source: R/090_optim_cust.R
clust_optim | R Documentation |
clust_optim produces a scree plot with number of cluster at x-axis and total within-cluster sum of squares at y-axis
clust_optim(
obj2clust = NULL,
num_clstrs = seq(5, 50, 5),
standardise_vars = TRUE,
...
)
obj2clust |
SpatRaster object (or its file name). Each layer is one variable |
num_clstrs |
Numeric. Optional. Vector with a sequence of number of clusters to check for optimal |
standardise_vars |
Logical. Optional. If TRUE (default), variables are standardised (mean = 0; sd = 1) |
... |
Optional. Arguments for |
The 'scree plot method' allows the user to assess how the quality of the
K-means clustering improves when increasing the number of clusters. An elbow in the curve
indicates the optimal number of clusters. K-means are run with kmeans
A scree plot
Xavier Rotllan-Puig
PCAs4clust
; EFT_clust
; kmeans
dirctry <- paste0(system.file(package='LPDynR'), "/extdata")
variables_noCor <- rm_multicol(dir2process = dirctry,
multicol_cutoff = 0.7)
clust_optim(obj2clust = variables_noCor,
num_clstrs = seq(5, 50, 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.