Learn R Programming

FSinR (version 2.0.5)

selectSlope: Select slope

Description

Generates a direct search function that selects features (in descending order from the best evaluation measure to the lowest) until the slope to the next feature is over a threshold (The features evaluation is individual). The slope is calculated as: (s.threshold) / (number of features). This function is called internally within the directSearchAlgorithm function.

Usage

selectSlope(s.threshold = 1.5)

Arguments

s.threshold
  • Number between 0 and 1

Value

Returns a direct search function that is used in the feature selection process.

Examples

Run this code
# NOT RUN {
## The direct application of this function is an advanced use that consists of using this 
# function directly and performing a direct search process
## Classification problem


# Generates the filter evaluation function
filter_evaluator <- filterEvaluator('determinationCoefficient')

# Generates the direct search function with slope
ss_direct_search <- selectSlope()
# Performs the direct search process directly (parameters: dataset, target variable and evaluator)
ss_direct_search(iris, 'Species', filter_evaluator)
# }

Run the code above in your browser using DataLab