feature.boruta.fixNA: Remove 'NA' Containing Observations

Description Usage Arguments Details Value Examples

View source: R/feature.boruta.R

Description

Filter all observations from the target and predictors variable that contain NA values to obtain a NA dataset usable by the Boruta classifiers.

Usage

1
feature.boruta.fixNA(target, predictors)

Arguments

target

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

predictors

data.frame with predictors.

Details

The method first carries out a reduced parameter check via feature.boruta.checkInputParams. Afterwards both target and predictors are combined to a unified data.frame. This data.frame is then cleaned from NAs by the na.omit function. Before splitting the data.frame into a target and a predictor variable again, it is checked that at least one observation prevailed. If that is not the case, the method is aborted with an error.

Value

The NA-cleaned data.frame will be returned with two additional parameters:

target

Containing the NA-cleaned target variable.

predictors

Containing the NA-cleaned predictors.

Examples

1
2
3
 KaggleHouse:::feature.boruta.fixNA(
   target = data_train_na$SalePrice, predictors = data_train_na[-81]
)

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