| bsnsing.default {bsnsing} | R Documentation |
Learn a Classification Tree with Boolean Sensing
Description
This is the default method for bsnsing and handles binary classification only. bsnsing.formula, which calls bsnsing.default as the basic tree builder, can handle multiclass classification problems. Missing values in numeric variables are imputed as the median of the non-missing ones, and missing values in factor variables are treated as a separate level named 'NA'.
Usage
## Default S3 method:
bsnsing(x, y, controls = bscontrol(), ...)
Arguments
x |
a data frame containing independent variables. Columns can be of numeric, integer, factor and logical types. The column names must be proper identifiers (e.g., must start with a letter, cannot contain special characters and spaces, etc.). |
y |
a vector of the response variable. The response variable can be of an integer, numeric, logical or factor type, but must have only two unique values. Typical coding of a binary response variable is 0 (for negative case) and 1 (for positive cases). |
controls |
an object of class |
... |
further argument to be passed to bsnsing.default. |
Value
an object of class bsnsing.
Examples
y <- ifelse(iris$Species == 'setosa', 1L, 0L)
x <- iris[, c('Sepal.Length', 'Sepal.Width', 'Petal.Length', 'Petal.Width')]
bs <- bsnsing(x, y, verbose = TRUE)
summary(bs)