Learn R Programming

nomclust (version 2.1.6)

eval.plot: Visualization of Evaluation Criteria

Description

The function eval.plot() visualizes the values of seven evaluation criteria for the range of cluster solutions defined by the user in the nomclust, evalclust or nomprox functions. It also indicates the optimal number of clusters determined by these criteria. The charts for the seven evaluation criteria in the nomclust package.

Usage

eval.plot(
  x,
  criteria = "all",
  style = "greys",
  opt.col = "red",
  main = "Cluster Evaluation",
  ...
)

Arguments

x

An output of the nomclust() or nomprox() functions containing the eval and opt components.

criteria

A character string or character vector specifying the criteria that are going to be visualized. It can be selected one particular criterion, a vector of criteria or all the available criteria by typing "all".

style

A character string or a vector of colors defines a graphical style of the produced plots. There are two predefined styles in the nomclust package, namely "greys" and "dark", but a custom color scheme can be set by a user as a vector of a length four.

opt.col

An argument specifying a color that is used for the optimal number of clusters identification.

main

A character string with the chart title.

...

Other graphical arguments compatible with the generic plot() function.

Value

The function returns a series of up to seven plots with evaluation criteria values and the graphical indication of the optimal numbers of clusters (for AIC, BIC, BK, PSFE, PSFM).

Details

The function can be applied to the output of the nomclust(), evalclust() or nomprox() object containing a eval and opt components.

See Also

dend.plot, nomclust, evalclust, nomprox.

Examples

Run this code
# NOT RUN {
# sample data
data(data20)

# creating an object with results of hierarchical clustering 
hca.object <- nomclust(data20, measure = "iof", eval = TRUE)

# a default series of plots
eval.plot(hca.object)

# changing the color indicating the optimum number of clusters
eval.plot(hca.object, opt.col= "darkorange")

# selecting only AIC and BIC criteria with the dark style
eval.plot(hca.object, criteria = c("AIC", "BIC"), style = "dark")

# }

Run the code above in your browser using DataLab