Learn R Programming

clusterHD (version 1.0.2)

getLambda: select lambda based on AIC or BIC

Description

Select the regularization parameter for HTK-means clustering based on information criteria.

Usage

getLambda(HTKmeans.out, type  = "AIC")

Value

The selected value for lambda

Arguments

HTKmeans.out

the output of a call to HTKmeans.

type

either "AIC" (default) or "BIC".

Author

J. Raymaekers and R.H. Zamar

Details

This function selects the best lambda (based on information criteria AIC or BIC) out of the HTKmeans.out$inputargs$lambdas sequence of values.

References

Raymaekers, Jakob, and Ruben H. Zamar. "Regularized K-means through hard-thresholding." arXiv preprint arXiv:2010.00950 (2020).

See Also

HTKmeans

Examples

Run this code
X <- mclust::banknote
y <- as.numeric(as.factor(X[, 1]))
lambdas <- seq(0, 1, by = 0.01)
X <- X[, -1]
HTKmeans.out <- HTKmeans(X, 2, lambdas)

# Both AIC and BIC suggest a lambda of 0.02 here:

# \donttest{
getLambda(HTKmeans.out, "AIC")
getLambda(HTKmeans.out, "BIC")
# }

Run the code above in your browser using DataLab