clust_optim {LPDynR} | R Documentation |
clust_optim
Description
clust_optim produces a scree plot with number of cluster at x-axis and total within-cluster sum of squares at y-axis
Usage
clust_optim(
obj2clust = NULL,
num_clstrs = seq(5, 50, 5),
standardise_vars = TRUE,
...
)
Arguments
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 |
Details
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
Value
A scree plot
Author(s)
Xavier Rotllan-Puig
See Also
Examples
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))
[Package LPDynR version 1.0.5 Index]