getCategTransform: get function that encodes away less common values in a...

Description Usage Arguments Value

View source: R/transformation_functions.R

Description

get function that encodes away less common values in a feature saves you from those errors on missing factor levels in test set

Usage

1
getCategTransform(col, fit_dt, threshold = 0, default_value = "other")

Arguments

col:

transformation function will transform this column

fit_dt:

use data in fit_dt to calculate less common feature values

threshold:

retain only those values that occur more than this many times in fit_dt

Value

list(col, fun) where fun is the transformation function


jukujala/R-data-pipe documentation built on Jan. 13, 2020, 11:28 a.m.