parse_n_features: Parsing features

Description Usage Arguments Value

View source: R/utils.R

Description

Parse n_features for forward and backward selection. Handles two cases:

Usage

1
parse_n_features(n_features, total)

Arguments

n_features

A numeric value passed to forward or backward selection. Can be a float or integer.

total

Total features in the data (equivalent to number of columns in X)

Value

Number of features to select. If initial n_features lies on (0, total_features), it will be returned 'as is'. If n_feature is passed in as a proportion with range (0,1), it will be converted to an integer representing proportion with respect to the total number of features.


UBC-MDS/punisheR documentation built on May 25, 2019, 1:36 p.m.