View source: R/make_partitions.R
| make_partitions | R Documentation |
Partitions data support into clusters using Voronoi-like diagrams.
Standardization for clustering is handled internally; centers, knots, and
the returned assign_partition function are all on the **raw
(natural) scale** of the original predictors.
make_partitions(
data,
cluster_args,
cluster_on_indicators,
K,
parallel,
cl,
do_not_cluster_on_these,
neighbor_tolerance,
standardize = TRUE,
standardize_mode = "auto",
dummy_adder = 0,
dummy_dividor = 0
)
data |
Numeric matrix of predictor variables (raw scale) |
cluster_args |
Parameters for clustering |
cluster_on_indicators |
Logical to include binary predictors |
K |
Number of partitions minus 1 ( |
parallel |
Logical to enable parallel processing |
cl |
Cluster object for parallel computation |
do_not_cluster_on_these |
Columns to exclude from clustering |
neighbor_tolerance |
Scaling factor for neighbor detection |
standardize |
Logical; whether to standardize data internally before
clustering. Should equal |
standardize_mode |
Character; |
dummy_adder |
Small constant added to numerator during standardization
to avoid exact-zero values (matches |
dummy_dividor |
Small constant added to denominator during
standardization to avoid division by zero (matches
|
A list containing:
Cluster center coordinates on the raw scale.
Knot points between centers on the raw scale.
Function that accepts raw-scale new data and returns integer-like partition assignments (0.5, 1.5, ...).
List of neighboring partition indices.
The forward standardization function used internally (for diagnostic use only).
The inverse standardization function (for diagnostic use only).
Cluster centers on the standardized scale (for diagnostic use only).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.