thinFeatures {SAiVE}R Documentation

Remove irrelevant predictor variables

Description

Uses VSURF::VSURF() to build random forests and remove irrelevant predictor variables from a data.frame containing an outcome variable and 2 or more predictor variables.

Usage

thinFeatures(data, outcome_col, n.cores = NULL)

Arguments

data

A data.frame containing a column for the outcome variable and n columns for predictor variables.

outcome_col

The name of the outcome variable column.

n.cores

The maximum number of cores to use. Leave NULL to use all cores minus 1.

Value

A list of two data.frames: the outcome of the VSURF algorithm and the data after applying the VSURF results (rows removed if applicable)

Examples



# thinFeatures on 'permafrost' data set

data(permafrost)
res <- thinFeatures(permafrost, "Type", n.cores = 2)

# Results will vary due to inherent randomness of random forests!


[Package SAiVE version 1.0.6 Index]