Description Usage Arguments Value Examples
New observations selected from the same population as the data used to build bin definitions may fall just outside the bins. If we wish to include nearby values we can either allow outer bins to be extended (this function) or to leave the outer bins unbounded.
1 | bin_by_iq_def(bin_def, new_data, output = "data", strict = FALSE)
|
new_data |
Data frame with column names matching the binned columns from bin-training data |
output |
Matches format of iterative_quant_bin 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. |
iq_def |
Iterative quantile binning definition list |
updated binning definition with bins extended by tolerance values
1 2 3 4 | withhold_index <- c(1,2,51,52,101,102)
iq_def <- iterative_quant_bin(data=iris[-withhold_index,], bin_cols=c("Sepal.Length","Sepal.Width","Petal.Width"),
nbins=c(3,2,2), output="definition")
bin_by_iq_def(bin_def=iq_def, new_data=iris[withhold_index,], output="data")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.