Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.dbs

Plot objects of class dbs


Description

This function provides a graphical tool to display diagnostics of density-based cluster analysis by means of the density-based silhouette information.

Usage

## S4 method for signature 'dbs'
plot(x, y , xlab = "", ylab = "", col = NULL, lwd = 3, cex = 0.9, 
    cex.axis = 0.5, main = NULL, labels = FALSE, ...)

Arguments

x

An object of dbs-class;

y

Not used; for compatibility with generic plot;

xlab

A title for the x axis;

ylab

A title for the y axis;

col

A specification for the plotting color. Default are colors in palette corresponding to the group labels;

lwd

A specification for the width of the bars in the plot;

cex

A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default;

cex.axis

The magnification to be used for axis annotation relative to the current setting of cex;

main

An overall title for the plot;

labels

Logical. Should row index of data be added to the plot?

...

Further arguments to be passed to plot.

Details

After computing the density-based silhouette index by applying dbs-methods, data are partitioned into the clusters, sorted in a decreasing order with respect to their dbs value and displayed on a bar graph.

Methods

signature(x = "dbs", y = "missing")

S4 method for plotting objects of dbs-class

See Also

Examples

#example 1: no groups in data
#random generation of group labels
set.seed(54321)
x <- rnorm(50)
groups <- sample(1:2, 50, replace=TRUE)
groups
dsil <- dbs(x=as.matrix(x), clusters=groups)
dsil
summary(dsil)
plot(dsil, labels=TRUE, lwd=6)

#example 2: wines data
# load data
data(wine)

gr <- wine[,1]

# select a subset of variables
x <- wine[, c(2,5,8)]

#clustering
cl <- pdfCluster(x)
 
dsil <- dbs(cl)
plot(dsil)

pdfCluster

Cluster Analysis via Nonparametric Density Estimation

v1.0-3
GPL-2
Authors
Adelchi Azzalini, Giovanna Menardi for the current version; Adelchi Azzalini, Giovanna Menardi and Tiziana Rosolin up to version 0.1-13.
Initial release
2018-12-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.