distanceToCenter: Computes unsupervised features on numerical and integer...

Description Usage Arguments Value Author(s) Examples

View source: R/clusterFeatures.R

Description

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

Usage

1
2
distanceToCenter(x, numFeats, clusters = 10, autoCode = TRUE,
  progress = FALSE, seed = 1234)

Arguments

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

Value

List containing data.frame with clustered features as well as code when autoCode is TRUE

Author(s)

Xander Horn

Examples

1
clst <- distanceToCenter(x = iris, numFeats = names(iris)[1:4])

XanderHorn/autoML documentation built on Aug. 5, 2020, 11:45 a.m.