feature_select: Feature selection function

Description Usage Arguments Value Examples

View source: R/feature_select.R

Description

Performs forward selection of features in the data by starting with an empty model, and iteratively adds features that improve the model's score. The algorithm stops once the decrease of the accuracy from an additional features is bigger than the threshold.

Usage

1
feature_select(X_train, y_train, threshold = 0.05)

Arguments

X_train

The training set of the data

y_train

The target of the training set data

threshold

user input threshold used for bounding features selected

Value

List of best features

Examples

1
2
3
4
5
6
library(MASS)
attach(Boston)
data <- Boston
X <- data [,0:13]
y <- data [,14]
feature_select(X, y, threshold=0.05)

UBC-MDS/easymlr documentation built on March 22, 2021, 1:46 p.m.