ggcv: GGPlot the Mean Square Error with Error Bar for +/- 1...

Description Usage Arguments Value See Also Examples

View source: R/ggcv.R

Description

GGPlot the Mean Square Error with Error Bar for +/- 1 Standard Error

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ggcv(
  cv.obj,
  title = "MSE for CV of monothetic clustering",
  xlab = "Number of clusters",
  ylab = "MSE +/- 1 SE",
  type = c("b", "p", "l"),
  linetype = 2,
  err.col = "red",
  err.width = 0.2
)

Arguments

cv.obj

A cv.MonoClust object (output of cv.test()).

title

Overall title for the plot.

xlab

Title for x axis.

ylab

Title for y axis.

type

What type of plot should be drawn. Choosing between "l" (line only), "p" (point only), and "b" (both line and point).

linetype

The line type. See vignette("ggplot2-specs").

err.col

Color of the error bars.

err.width

Width of the bars.

Value

A ggplot2 object.

See Also

Plot using base R plot.cv.MonoClust()

Examples

1
2
3
4
5
6
library(cluster)
data(ruspini)

# 10-fold cross-validation
cptable <- cv.test(ruspini, minnodes = 2, maxnodes = 4)
ggcv(cptable)

monoClust documentation built on Feb. 15, 2021, 5:07 p.m.