fboot: Evaluate the robustness of a functional clustering by...

Description Usage Arguments Details Value References Examples

View source: R/fexport.R

Description

Evaluate by bootstrapping the robustness of a functional clustering to perturbations of data. The perturbed data can be the number of assemblages taken into account, or the number of performances taken into account.

Usage

1
2
3
4
fboot(fres,
      opt.var = c("assemblages", "performances"), nbIter = 1,
      opt.nbMax = fres$nbOpt, opt.R2 = FALSE, opt.plot = FALSE,
      filename = "" )

Arguments

fres

an object resulting from a functional clustering obtained using the function fclust.

opt.var

a string, that indicates the variable to test. The option can be "assemblages" or "performances".

nbIter

an integer, that indicates the number of random drawing to do.

opt.nbMax

a logical. If opt.plot = TRUE, the trees resulting from leaving out each performance is plotted.

opt.R2

a logical. If opt.R2 = TRUE, the primary tree is validated and the vectors of coefficient of determination (R^2) and efficiency (E) are computed.

opt.plot

a logical. If opt.plot = TRUE, the primary trees resulting from leaving out each performance are plotted. If opt.R2 = TRUE, the secondary trees resulting from leaving out each performance are plotted.

filename

a string, used as radical for naming the file "filename.components.csv", "filemane.assemblages.csv" or "filemane.performances.csv" according to the dimensions of matrices.

Details

The trees obtained by bootstrapping of performances to omit are compared to the reference tree obtained with all components using different criteria : "Czekanowski_Dice", "Folkes_Mallows", "Jaccard", "Kulczynski", "Precision", "Rand", "Recall", "Rogers_Tanimoto", "Russel_Rao", "Sokal_Sneath1" and "Sokal_Sneath2" index. For more informations, see the notice of R-package clusterCrit.

Value

a list of lists, each containing a matrix by clustering index.

References

Package "clusterCrit": Clustering Indices, by Bernard Desgraupes (University of Paris Ouest - Lab Modal'X)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Enable the comments
oldOption <- getOption("verbose")
if (!oldOption) options(verbose = TRUE)
layout(matrix(c(1,2,3,4), nrow = 2, ncol = 2, byrow = TRUE))




test.boot <- fboot(fres = CedarCreek.2004.2006.res,
                   opt.var  = "performances",
                   nbIter   = 4,
                   opt.plot = TRUE)


layout(1)
options(verbose = oldOption)

functClust documentation built on Dec. 2, 2020, 5:06 p.m.