powered by
GGPlot the Mean Square Error with Error Bar for +/- 1 Standard Error
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 )
A cv.MonoClust object (output of cv.test()).
cv.MonoClust
cv.test()
Overall title for the plot.
Title for x axis.
Title for y axis.
What type of plot should be drawn. Choosing between "l" (line only), "p" (point only), and "b" (both line and point).
"l"
"p"
"b"
The line type. See vignette("ggplot2-specs").
vignette("ggplot2-specs")
Color of the error bars.
Width of the bars.
A ggplot2 object.
Plot using base R plot.cv.MonoClust()
plot.cv.MonoClust()
# NOT RUN { library(cluster) data(ruspini) # 10-fold cross-validation cptable <- cv.test(ruspini, minnodes = 2, maxnodes = 4) ggcv(cptable) # }
Run the code above in your browser using DataLab