Learn R Programming

salso (version 0.2.5)

plot.salso.summary: Heatmap, Multidimensional Scaling, Pairs, and Dendrogram Plotting for Partition Estimation

Description

This function produces one of four plots: 1. "heatmap": A heatmap showing the pairwise allocation probabilities that items are clustered. 2. "mds": A scatter plot using classical multidimensional scaling (also known as principal coordinates analysis) with the exemplar (i.e., the most representative observation) of each cluster emphasized. 3. "pairs": Pairs plots of all the variables with the exemplar (i.e., the most representative observation) of each cluster emphasized. 4. "dendrogram": A dendrogram based on expected partition loss showing the relationships among clusters when merging pairs of clusters such that the increase in the expectation of the posterior loss is minimized.

Usage

# S3 method for salso.summary
plot(
  x,
  type = c("heatmap", "mds", "pairs", "dendrogram")[1],
  data = NULL,
  showLabels = length(x$estimate) 

Arguments

x

An object returned by summary(y), where y itself is returned by the salso function.

type

A string equal to "heatmap", "mds", "pairs", or "dendrogram".

data

The data from which the partition estimation was obtained. This is required when type='pairs' and ignored otherwise.

showLabels

Should the names of items be shown in the plot when type="heatmap"?

...

Arguments to be passed to methods, such as graphical parameters (see par).

Value

NULL, invisibly.

See Also

salso, summary.salso.estimate, cmdscale.

Examples

Run this code
# NOT RUN {
# For examples, use 'nCores=1' per CRAN rules, but in practice omit this.
draws <- iris.clusterings
est <- salso(draws, nCores=1)
summ <- summary(est)
plot(summ, type="heatmap")
plot(summ, type="mds")
plot(summ, type="pairs", data=iris)
plot(summ, type="dendrogram")

# }

Run the code above in your browser using DataLab