get_optimal_k: get_optimal_k

Description Usage Arguments Value

View source: R/clustering.R

Description

a wrapper to fpc::prediction.strength function. This function is based on consensus clustering using clara algorithm for different k (2 to 10 precisely).

The prediction strength is defined according to Tibshirani and Walther (2005) who recommand to choose as optimal number of clusters the largest number of clusters that leads to a prediction strength above a cutoff of 0.8 or 0.9.

Usage

1
get_optimal_k(scores_tab, ix = NULL, cutoff = 0.8, nrep = 20)

Arguments

scores_tab

data.table; the table of scores

ix

boolean vector of indexes to which scores_tab must be reduced (sampling output)

cutoff

cutoff for the prediction strength (recommanded to range from 0.8 up to 0.9)

nrep

nb of times the clustering is performed for each value of k (bootstrapping)

Value

the optimal number of clusters


charles-bernard/mage documentation built on May 14, 2019, 2 a.m.