Create a transformer definition

create_transformer(
  name,
  type,
  input_type = "numeric",
  output_type = "numeric",
  fit_func = NULL,
  apply_func,
  name_generator,
  allow_replace = FALSE
)

Arguments

name

Transformer name

type

Type: "unary", "binary", "supervised_unary"

input_type

Type of input: "numeric" or "categorical"

output_type

Type of output: "numeric" or "categorical"

fit_func

function(data, input_cols, target_col = NULL) returning state

apply_func

function(data, input_cols, state = NULL) returning new column vector

name_generator

function(input_cols) returning output column name

allow_replace

Logical. Whether column sampling allows replacement.