Description Usage Arguments Value Author(s) Examples
View source: R/map_kmeans_features.R
Creates mapping tables for each numerical feature containing the center for each feature's min and max value. These tables can then be applied using the function 'apply.kmeans.mappings' to calculate the distance to cluster center for each feature. Each feature is scaled by converting it to a range between 0 and 1 before clustering.
1 2 | map.kmeans.features(data, x, clusters = 3, sample.size = 0.3,
seed = 1, progress = TRUE)
|
data |
[required | data.frame] Dataset containing categorical features |
x |
[required | character] A vector of categorical feature names present in the dataset |
clusters |
[optional | integer | default=3] The number of clusters to create in each feature |
sample.size |
[optional | numeric | default=0.3] Percentage to down sample data for decreased computation time |
seed |
[optional | integer| default=1] The random number seed for reproducable results |
progress |
[optional | logical | default=TRUE] Display a progress bar |
List of data frames containing mapping tables
Xander Horn
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.