I need to calculate the optimal number of clusters for a classification
based on a large number of observations (tens of thousands). Thibshirani et
al. proposed the gap statistic for this purpose. Is any R code or fucntion
available for this? Any help would be appreciated, including suggestions
about other alternatives for the selection of an optimal number of cluster
from large datasets.