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).
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 mselect_adproclus or mselect_adproclus_low_dim.
title: String. Optional title.
grid: Boolean. FALSE means for low dimensional ADPROCLUS all lines will be in one plot. TRUE means separate plots.
digits: Integer. The number of decimal places to display.
Returns
Invisibly returns the ggplot2 object.
Examples
# Loading a test dataset into the global environmentx <- stackloss
# Estimating models with cluster parameter values ranging from 1 to 4model_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 clustersplot_scree_adpc(model_fits)# Estimating models with cluster parameter values ranging from 1 to 4# and component parameter values also ranging from 1 to 4model_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 clustersplot_scree_adpc(model_fits)
See Also
mselect_adproclus: to obtain the model_fit input from the possible ADPROCLUS models
mselect_adproclus_low_dim: to obtain the model_fit input from the possible low dimensional ADPROCLUS models
select_by_CHull: for automatic model selection via CHull method