logLik.kmeans: Experimental: AIC/BIC for kmeans

Description Usage Arguments Details

View source: R/cluster.R

Description

This function is supposed to provide a log-likelihood method for kmeans results, after Neal Fultz at https://stackoverflow.com/a/33202188 and also featured in the stackoverflow package. Note, that the blogged version on Jan 30, 2019 adds a minus and a division by 2 compared to a linked git version. This idea has not been reviewed, and this function has not been tested extensively; feel free to do so and contribute your results.

Usage

1
2
## S3 method for class 'kmeans'
logLik(object, ...)

Arguments

object

a kmeans result object

...

unused

Details

This is an attempt to reproduce the BIC measure in model-based clustering to decide on an optimal number of clusters. This function will be used for kmeans results objects when passed to BIC and AIC functions from the stats package in base R, and BIC and AIC are calculated this way in segmentClusters. It is however not used anywhere at the moment.


segmenTier documentation built on May 2, 2019, 2:49 p.m.