plot_scree_adpc {adproclus} | R Documentation |
Scree plot of (low dimensional) ADPROCLUS models
Description
Used for scree-plot based model selection. Visualizes a set of ADPROClUS models
in terms of their number of clusters and model fit (SSE or unexplained variance).
For low dimensional ADPROCLUS models plots are made with the number of
components on the x-axis for each given number of clusters. One can then
choose to have them displayed all in one plot (grid = FALSE
) or next
to each other in separate plots (grid = TRUE
).
Usage
plot_scree_adpc(model_fit, title = NULL, grid = FALSE, digits = 3)
Arguments
model_fit |
Matrix of SSE or unexplained variance scores as given by the
output of |
title |
String. Optional title. |
grid |
Boolean. |
digits |
Integer. The number of decimal places to display. |
Value
Invisibly returns the ggplot2
object.
See Also
mselect_adproclus
to obtain the
model_fit
input from the possible ADPROCLUS modelsmselect_adproclus_low_dim
to obtain the
model_fit
input from the possible low dimensional ADPROCLUS modelsselect_by_CHull
for automatic model selection via CHull method
Examples
# Loading a test dataset into the global environment
x <- stackloss
# Estimating models with cluster parameter values ranging from 1 to 4
model_fits <- mselect_adproclus(data = x, min_nclusters = 1, max_nclusters = 4, seed = 1)
# Plot the results as a scree plot to select the appropriate number of clusters
plot_scree_adpc(model_fits)
# Estimating models with cluster parameter values ranging from 1 to 4
# and component parameter values also ranging from 1 to 4
model_fits <- mselect_adproclus_low_dim(data = x, 1, 4, 1, 4, seed = 1)
# Plot the results as a scree plot to select the appropriate number of clusters
plot_scree_adpc(model_fits)