autoBin.binary {CASMI} | R Documentation |
Auto Binning for Quantitative Variables - Binary
Description
Automatically suggest an optimal cutting point for categorizing a quantitative variable before using the CASMI-based functions. This function does binary cutting, that is, to convert the quantitative variable into a categorical variable with two levels/categories.
Usage
autoBin.binary(data, index)
Arguments
data |
data frame (features as columns and observations as rows). An outcome variable is required. The outcome variable (Y) MUST be the last column. |
index |
index or a vector of indices of the quantitative variables that need to be automatically categorized. |
Value
'autoBin.binary()' returns the entire data frame after automatic binary categorization for the selected quantitative variable(s).
Examples
## Use the "iris" dataset embedded in R
data("iris")
newData <- autoBin.binary(iris, c(1,2,3,4))
newData
[Package CASMI version 1.2.2 Index]