View source: R/HelperFunctions.R
get_centers | R Documentation |
Get Centers for Partitioning
get_centers(data, K, cluster_args, cluster_on_indicators)
data |
Matrix of predictor data |
K |
Number of partitions minus 1 ( |
cluster_args |
List with custom centers and kmeans args |
cluster_on_indicators |
Include binary predictors in clustering |
Returns partition centers via:
1. Custom supplied centers if provided as a valid K \times q
matrix
2. kmeans clustering on all non-spline variables if cluster_on_indicators=TRUE
3. kmeans clustering excluding binary variables if cluster_on_indicators=FALSE
Matrix of cluster centers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.