Learn R Programming

tclust (version 1.0-2)

ctlcurves: Classification Trimmed Likelihood Curves

Description

The function applies tclust several times on a given dataset while parameters alpha and k are altered. The resulting object gives an idea of the optimal trimming level and number of clusters considering a particular dataset.

Usage

ctlcurves (x, k = 1:4, alpha = seq (0, 0.2, len = 6), restr.fact = 50, trace = 1, ...)

Arguments

x
A matrix or data frame of dimension n x p, containing the observations (row-wise).
k
A vector of cluster numbers to be checked. By default cluster numbers from 1 to 5 are examined.
alpha
A vector containing the alpha levels to be checked. By default alpha levels from 0 to 0.05 (continuously increased by 0.01), are checked.
restr.fact
The restriction factor passed to tclust.
...
Further parameters, passed to tclust.
trace
Defines the tracing level, which is set to 1 by default. Tracing level 2 gives additional information on the current iteration.

Value

  • The function returns an S3 object of type ctlcurves with components:
  • parA list containing all the parameters passed to this function.
  • objAn array containing the objective functions values of each computed cluster-solution.
  • min.weightsAn array containing the minimum cluster weight of each computed cluster-solution.
  • So far there is no output available for print.ctlcurves. Use plot on an ctlcurves object for a graphical interpretation of it.

encoding

latin1

Details

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�a-Escudero et al (2009).

References

Garc�a-Escudero, L.A.; Gordaliza, A.; Matr�n, C. and Mayo-Iscar, A. (2009), "Exploring the number of groups in robust model-based clustering". Preprint available at www.eio.uva.es/infor/personas/langel.html.

See Also

plot.ctlcurves

Examples

Run this code
#--- EXAMPLE 1 ------------------------------------------

sig <- diag (2)
cen <- rep (1,2)
x <- rbind (
	rmvnorm (108, cen * 0,   sig),
	rmvnorm (162, cen * 5,   sig * 6 - 2),
	rmvnorm (30, cen * 2.5, sig * 50)
)

ctl.a <- ctlcurves (x, k = 1:4, restr.fact=12)
plot(ctl.a)

ctl.b <- ctlcurves (x, k = 1:4, restr.fact = 50)
plot(ctl.b)


#--- EXAMPLE 2 ------------------------------------------

data (geyser2)
ctl <- ctlcurves (geyser2, k = 1:5)
plot(ctl)

Run the code above in your browser using DataLab