Description Usage Arguments Value Author(s) Examples
View source: R/clusterFeatures.R
K-means clustering is used to create new features on existing numeric and integer features, then calculating the distance to center and using this as the new feature
1 2 | distanceToCenter(x, numFeats, clusters = 10, autoCode = TRUE,
progress = FALSE, seed = 1234)
|
x |
[data.frame | Required] Data.frame containing numeric features to transform |
numFeats |
[character vector | Required] Character vector of numerical features |
clusters |
[integer, Optional] Number of clusters to create |
autoCode |
[logical | Optional] Should code be generated when running the function |
progress |
[logical | Optional] Should a progress bar display the progress when running the function |
seed |
[integer | Optional] Random seed number for reproducable results. Default of 1991 |
List containing data.frame with clustered features as well as code when autoCode is TRUE
Xander Horn
1 | clst <- distanceToCenter(x = iris, numFeats = names(iris)[1:4])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.