pipe_clustering: Add cluster labels to a training set

Description Usage Arguments Value

View source: R/clustering.R

Description

Add cluster labels to a training set

Usage

1
2
pipe_clustering(train, cluster_column = "cluster",
  exclude_columns = character(0), k = 4, metric = "euclidean")

Arguments

train

The train dataset, as a data.frame or data.table. Data.tables may be changed by reference.

cluster_column

Name for the new cluster label column

exclude_columns

Columns to be excluded from the clustering. Should be provided as a character vector. Non-numerical columns will automatically be excluded

k

The number of clusters.

metric

The distance metric used. Currently only 'euclidean' and 'manhattan' are supported.

Value

A list containing the transformed train dataset and a trained pipe.


jeroenvdhoven/datapiper documentation built on July 14, 2019, 9:34 p.m.