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