iqbin_assign: Assigning New observations to Existing Iterative Quantile...

Description Usage Arguments Value See Also Examples

View source: R/IterativeQuantileBinning.R

Description

Assigning New observations to Existing Iterative Quantile Bins by using binning definition created by iqbin function

Usage

1
iqbin_assign(bin_def, new_data, output = "data", strict = FALSE)

Arguments

bin_def

Iterative quantile binning definition list as output from iqbin function

new_data

Data frame with column names matching the binned columns from bin-training data

output

Matches format of iqbin and inherets properties from iqnn if applicable "data","both"

strict

TRUE/FALSE: If TRUE Observations must fall within existing bins to be assigned; if FALSE the outer bins in each dimension are unbounded to allow outlying values to be assigned.

Value

list of new_data, binned data and indecies. Optionally the bin definition may also be included

See Also

Other iterative quantile binning functions: iqbin_stretch, iqbin

Examples

1
2
3
4
5
withhold_index <- c(1,2,51,52,101,102)
iq_def <- iqbin(data=iris[-withhold_index,],
                bin_cols=c("Sepal.Length","Sepal.Width","Petal.Width"),
                nbins=c(3,2,2), output="definition")
iqbin_assign(bin_def=iq_def, new_data=iris[withhold_index,], output="data")

kmaurer/iqbin documentation built on Jan. 1, 2020, 6:48 p.m.