feature.boruta.checkInputParams: Check Boruta Feature Selection Input Parameters

Description Usage Arguments Details Examples

View source: R/feature.boruta.R

Description

The method ensures that the parameters of the feature.boruta function are valid.

Usage

1
2
feature.boruta.checkInputParams(target, predictors, checkNA = F,
  verbose = F)

Arguments

target

Response vector; factor for classification, numeric vector for regression.

predictors

data.frame with predictors.

checkNA

boolean switch that decides whether the method will conduct a check for NA values or not. Default is FALSE.

verbose

boolean switch that decides whether the error output will provide more verbose information. Default is FALSE.

Details

This method analyses the target and predictors input variables of the feature.boruta function. It conducts two mandatory checks and one optional check. The first of the two mandatory checks evaluates whether the correct data types are used. So the target variable should be a vector while the predictors variable is supposed to be a data.frame. As a second check it is ensured that both variables have the same number of rows, which implies that the number of considered observation is equal for both. If one of the checks fail, execution will be aborted with an error explaining the reasons. The optional check evaluates the presence of NA values as these are not useable for many of the Boruta classifiers. In case either target and/or predictors contain only one NA a warning is issued. If the verbose switch is TRUE, the error will provide a list of predictors columns which contain NA values.

Examples

1
2
3
4
 KaggleHouse:::feature.boruta.checkInputParams(
   target = data_train_na$SalePrice, predictors = data_train_na[-81],
   checkNA = T, verbose = T
 )

MarcoNiemann/kaggle_house documentation built on May 7, 2019, 2:50 p.m.