DetermineClusters | R Documentation |
A wrapper for the clValid
and fviz_nbclust
functions to perform clustering diagnostics
DetermineClusters(
SickleJr,
numclusts = 2:20,
clusteringmethod = "kmeans",
diagnosticmethods = c("wss", "silhouette", "gap_stat"),
clValidvalidation = "internal",
createDiagnosticplots = TRUE,
runclValidDiagnostics = TRUE,
printPlots = TRUE,
printclValid = TRUE,
subset = FALSE,
subsetsize = 1000,
seed = NULL
)
SickleJr |
An object of class SickleJr |
numclusts |
A vector of integers indicating the number of clusters to test |
clusteringmethod |
String holding the clustering method: defaults to k-means; since the other methods are not implemented in jrSiCKLSNMF, it is recommended to use k-means. |
diagnosticmethods |
Vector of strings indicating which methods to plot. Defaults to all three of the available: wss, silhouette, and gap_stat |
clValidvalidation |
String containing validation method to use for |
createDiagnosticplots |
Boolean indicating whether to create diagnostic plots for cluster size |
runclValidDiagnostics |
Boolean indicating whether to calculate the diagnostics from |
printPlots |
Boolean indicating whether to print the diagnostic plots |
printclValid |
Boolean indicating whether to print the diagnostic results from |
subset |
Boolean indicating whether to calculate the diagnostics on a subset of the data rather than on the whole dataset. |
subsetsize |
Numeric value indicating size of the subset |
seed |
Numeric value holding the random seed |
An object of class SickleJr with cluster diagnostics added to its clusterdiagnostics
slot
clValidjrSiCKLSNMF
\insertReffactoextrajrSiCKLSNMF
#Since these data are too small, the clValid diagnostics do not run
#properly. See the vignette for an example with the clValid diagnostics
SimSickleJrSmall<-DetermineClusters(SimSickleJrSmall,numclusts=2:5,runclValidDiagnostics=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.