step_kmeans: step_kmeans: a recipe step for clustering by kmeans.

Description Usage Arguments

View source: R/RecipeSteps.R

Description

step_kmeans: a recipe step for clustering by kmeans.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
step_kmeans(
  recipe,
  ...,
  role = "predictor",
  trained = FALSE,
  skip = FALSE,
  num_k = NULL,
  retain = FALSE,
  id = rand_id("kmeans")
)

Arguments

role

For model terms created by this step, what analysis role should they be assigned?

trained

A logical to indicate if the quantities for preprocessing have been estimated.

skip

A logical. Should the step be skipped when the recipe is baked by [recipes::bake.recipe()]?

num_k

The parameter num_k is passed to the parameter centers in kmeans function.

retain

A logical to specify whether the original predictors should be retained along with the new embedding variables.

id

A character string that is unique to this step to identify it.


TatsumotoH/addstepr documentation built on Dec. 18, 2021, 4:05 p.m.