REBMIX.plot: Plots RNGMIX, REBMIX, RCLRMIX and RCLSMIX Output

plot-methodsR Documentation

Plots RNGMIX, REBMIX, RCLRMIX and RCLSMIX Output

Description

Plots true clusters if x equals "RNGMIX". Plots the REBMIX output depending on what argument if x equals "REBMIX". Plots predictive clusters if x equals "RCLRMIX". Wrongly clustered observations are plotted only if x@Zt is available. Plots predictive classes and wrongly classified observations if x equals "RCLSMIX".

Usage

## S4 method for signature 'RNGMIX,missing'
plot(x, y, pos = 1, nrow = 1, ncol = 1, cex = 0.8,
     fg = "black", lty = "solid", lwd = 1, pty = "m", tcl = 0.5,
     plot.cex = 0.8, plot.pch = 19, ...)
## S4 method for signature 'REBMIX,missing'
plot(x, y, pos = 1, what = c("pdf"),
     nrow = 1, ncol = 1, npts = 200, n = 200, cex = 0.8, fg = "black",
     lty = "solid", lwd = 1, pty = "m", tcl = 0.5,
     plot.cex = 0.8, plot.pch = 19, contour.drawlabels = FALSE,
     contour.labcex = 0.8, contour.method = "flattest",
     contour.nlevels = 12, log = "", ...)
## S4 method for signature 'RCLRMIX,missing'
plot(x, y, s = expression(c), nrow = 1, ncol = 1, cex = 0.8,
     fg = "black", lty = "solid", lwd = 1, pty = "m", tcl = 0.5,
     plot.cex = 0.8, plot.pch = 19, ...)
## S4 method for signature 'RCLSMIX,missing'
plot(x, y, nrow = 1, ncol = 1, cex = 0.8,
     fg = "black", lty = "solid", lwd = 1, pty = "m", tcl = 0.5,
     plot.cex = 0.8, plot.pch = 19, ...)
## ... and for other signatures

Arguments

x

see Methods section below.

y

currently not used.

pos

a desired row number in x@summary to be plotted. The default value is 1.

s

a desired number of clusters to be plotted. The default value is expression(c).

what

a character vector giving the plot types. One of "pdf" for probability density function, "marginal pdf" for marginal probability density function, "IC" for information criterion depending on numbers of components c, "logL" for log likelihood, "D" for total of positive relative deviations, "K" for information criterion depending on bins v or numbers of nearest neighbours k, "cdf" for univariate distribution function or "marginal cdf" for marginal distribution function. The default value is "pdf".

nrow

a desired number of rows in which the empirical and predictive densities are to be plotted. The default value is 1.

ncol

a desired number of columns in which the empirical and predictive densities are to be plotted. The default value is 1.

npts

a number of points at which the predictive densities are to be plotted. The default value is 200.

n

a number of observations to be plotted. The default value is 200.

cex

a numerical value giving the amount by which the plotting text and symbols should be magnified relative to the default, see also par. The default value is 0.8.

fg

a colour used for things like axes and boxes around plots, see also par. The default value is "black".

lty

a line type, see also par. The default value is "solid".

lwd

a line width, see also par. The default value is 1.

pty

a character specifying the type of the plot region to be used. One of "s" generating a square plotting region or "m" generating the maximal plotting region. The default value is "m".

tcl

a length of tick marks as a fraction of the height of a line of the text, see also par. The default value is 0.5.

plot.cex

a numerical vector giving the amount by which plotting characters and symbols should be scaled relative to the default. It works as a multiple of par("cex"). NULL and NA are equivalent to 1.0. Note that this does not affect annotation, see also plot.default. The default value is 0.8.

plot.pch

a vector of plotting characters or symbols, see also points. The default value is 19.

contour.drawlabels

logical. The contours are labelled if TRUE. The default value is FALSE.

contour.labcex

cex for contour labelling. The default value is 0.8. This is an absolute size, not a multiple of par("cex").

contour.method

a character specifying where the labels will be located. The possible values are "simple", "edge" and default "flattest", see also contour.

contour.nlevels

a number of desired contour levels. The default value is 12.

log

a character which contains "x" if the x axis is to be logarithmic, "y" if the y axis is to be logarithmic and "xy" or "yx" if both axes are to be logarithmic. The default value is "".

...

further arguments to par.

Value

Returns (invisibly) a list containing graphical parameters par. Such a list can be passed as an argument to par to restore the parameter values.

Methods

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

an object of class RNGMIX.

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

an object of class RNGMVNORM.

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

an object of class REBMIX.

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

an object of class REBMVNORM.

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

an object of class RCLRMIX.

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

an object of class RCLRMVNORM.

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

an object of class RCLSMIX.

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

an object of class RCLSMVNORM.

Author(s)

Marko Nagode

References

C. M. Bishop. Neural Networks for Pattern Recognition. Clarendon Press, Oxford, 1995.

Examples

## Not run: 
devAskNewPage(ask = TRUE)

data(wine)

colnames(wine)

# Remove Cultivar column from wine dataset.

winecolnames <- !(colnames(wine) 

wine <- wine[, winecolnames]

# Determine number of dimensions d and wine dataset size n.

d <- ncol(wine)
n <- nrow(wine)

wineest <- REBMIX(model = "REBMVNORM",
  Dataset = list(wine = wine),
  Preprocessing = "kernel density estimation",
  Criterion = "ICL-BIC",
  EMcontrol = new("EM.Control", strategy = "best"))

# Plot finite mixture.

plot(wineest, what = c("pdf", "IC", "logL", "D"),
  nrow = 2, ncol = 2, pty = "s")

## End(Not run)

rebmix documentation built on Sept. 11, 2024, 6:30 p.m.