fsdaR (version 0.4-9)

tclustICsol: Extracts a set of best relevant solutions obtained by tclustIC

Description

The function tclustICsol() takes as input an object of class tclustic.object, the output of function tclustIC (that is a series of matrices which contain the values of the information criteria BIC/ICL/CLA for different values of k and c) and extracts the first best solutions. Two solutions are considered equivalent if the value of the adjusted Rand index (or the adjusted Fowlkes and Mallows index) is above a certain threshold. For each tentative solution the program checks the adjacent values of c for which the solution is stable. A matrix with adjusted Rand indexes is given for the extracted solutions.

Usage

tclustICsol(out, NumberOfBestSolutions = 5, ThreshRandIndex = 0.7,
  whichIC = c("ALL", "CLACLA", "MIXMIX", "MIXCLA"), Rand = TRUE,
  msg = TRUE, plot = FALSE, trace = FALSE, ...)

Arguments

out

An S3 object of class tclustic.object (output of tclustIC) containing the values of the information criteria BIC (MIXMIX), ICL (MIXCLA) or CLA (CLACLA), for different values of k (number of groups) and different values of c (restriction factor), for a prespecified level of trimming.

NumberOfBestSolutions

Number of best solutions to extract from BIC/ICL matrix. The default value of NumberOfBestSolutions is 5

ThreshRandIndex

Threshold to identify spurious solutions - the threshold of the adjusted Rand index to use to consider two solutions as equivalent. The default value of ThreshRandIndex is 0.7

whichIC

Specifies the information criterion to use to extract best solutions. Possible values for whichIC are:

  • CLACLA = in this case best solutions are referred to the classification likelihood.

  • MIXMIX = in this case in this case best solutions are referred to the mixture likelihood (BIC).

  • MIXCLA = in this case in this case best solutions are referred to ICL.

  • ALL = in this case best solutions both three solutions using classification and mixture likelihood are produced. In the output class out all the three matrices MIXMIXbs, CLACLAbs and MIXCLAbs are given.

The default value is whichIC="ALL".

Rand

Index to use to compare partitions. If Rand=TRUE (default) the adjusted Rand index is used, else the adjusted Fowlkes and Mallows index is used.

msg

It controls whether to display or not messages (from MATLAB) on the screen. If msg=TRUE (default) messages about the progression of the search are displayed on the screen otherwise only error messages will be displayed.

plot

If plot=TRUE, the best solutions which have been found are shown on the screen.

trace

Whether to print intermediate results. Default is trace=FALSE.

...

potential further arguments passed to lower level functions.

Value

An S3 object of class tclusticsol.object

References

Cerioli, A., Garcia-Escudero, L.A., Mayo-Iscar, A. and Riani M. (2017). Finding the Number of Groups in Model-Based Clustering via Constrained Likelihoods, emphJournal of Computational and Graphical Statistics, pp. 404-416, https://doi.org/10.1080/10618600.2017.1390469.

Hubert L. and Arabie P. (1985), Comparing Partitions, Journal of Classification, Vol. 2, pp. 193-218.

See Also

tclustIC, tclustfsda, carbikeplot

Examples

Run this code
# NOT RUN {
 
# }
# NOT RUN {
 data(geyser2)
 out <- tclustIC(geyser2, whichIC="MIXMIX", plot=FALSE, alpha=0.1)

 ## Plot first two best solutions using as Information criterion MIXMIX
 print("Best solutions using MIXMIX")
 outMIXMIX <- tclustICsol(out, whichIC="MIXMIX", plot=TRUE, NumberOfBestSolutions=2)

 print(outMIXMIX$MIXMIXbs)
 
# }

Run the code above in your browser using DataCamp Workspace