catto_median: Median encoding

Description Usage Arguments Value Examples

View source: R/aggregate.R

Description

Median encoding

Usage

1
catto_median(train, ..., response = NULL, test = NULL, verbose = TRUE)

Arguments

train

The training data, in a data.frame or tibble.

...

The columns to be encoded. If none are specified, then all character and factor columns are encoded.

response

The response variable used to calculate medians.

test

The test data, in a data.frame or tibble.

verbose

Should informative messages be printed? Defaults to TRUE.

Value

The encoded dataset in a cattonum_df if no test dataset was provided, and the encoded datasets in a cattonum_df2 otherwise.

Examples

1
catto_median(iris, response = Sepal.Length)

cattonum documentation built on July 2, 2020, 2:26 a.m.