The plot
method for class ctlcurves
: This function plots a ctlcurves
object, comparing the target functions values with different values of parameter restr.fact
.
# S3 method for ctlcurves
plot (x, what = c ("obj", "min.weights", "doubtful"),
main, xlab, ylab, xlim, ylim, col, lty = 1, ...)
The ctlcurves object to be printed.
A string indicating which type of plot shall be drawn. See the details section for more information.
A character-string containing the title of the plot.
Arguments passed to plot
.
A single value or vector of line colors passed to lines
.
A single value or vector of line types passed to lines
.
Arguments to be passed to or from other methods.
These curves show the values of the trimmed classification
(log-)likelihoods when altering the trimming proportion alpha
and the number of clusters k
.
The careful examination of these curves provides valuable
information for choosing these parameters in a clustering problem.
For instance, an appropriate k
to be chosen is one that we do
not observe a clear increase in the trimmed classification likelihood
curve for k with respect to the k+1 curve for almost all the range of
alpha values. Moreover, an appropriate choice of parameter alpha may
be derived by determining where an initial fast increase of the
trimmed classification likelihood curve stops for the final chosen k.
A more detailed explanation can be found in Garc<ed>a-Escudero et al. (2010).
This function implements a series of plots, which display characteristic values of the each model, computed with different values for k
and alpha
.
The plot type is selected by setting argument what
to one of the following values:
"obj"
Objective function values.
"min.weights"
The minimum cluster weight found for each computed model. This plot is intended to spot spurious clusters, which in general yield quite small weights.
"doubtful"
The number of "doubtful" decisions identified by
DiscrFact
.
Garc<ed>a-Escudero, L.A.; Gordaliza, A.; Matr<e1>n, C. and Mayo-Iscar, A. (2010), "Exploring the number of groups in robust model-based clustering." Statistics and Computing, (Forthcoming). Preprint available at www.eio.uva.es/infor/personas/langel.html.
# NOT RUN {
sig <- diag (2)
cen <- rep (1, 2)
x <- rbind(mvtnorm::rmvnorm(108, cen * 0, sig),
mvtnorm::rmvnorm(162, cen * 5, sig * 6 - 2),
mvtnorm::rmvnorm(30, cen * 2.5, sig * 50)
)
ctl <- ctlcurves(x, k = 1:4)
plot(ctl)
# }
Run the code above in your browser using DataCamp Workspace