filter_feature_selection: Perform selection by filter

Description Usage Arguments Value Examples

View source: R/feature_selection.R

Description

Perform selection by filter using univariate filters, from caret's package.

Usage

1
2
filter_feature_selection(datamat, samples.class, 
functions = caret::rfSBF, method = "cv", repeats = 5)

Arguments

datamat

data matrix from dataset.

samples.class

string or index indicating what metadata to use.

functions

a list of functions for model fitting, prediction and variable filtering.

method

the external resampling method: boot, cv, LOOCV or LGOCV (for repeated training/test splits.

repeats

for repeated k-fold cross-validation only: the number of complete sets of folds to compute.

Value

A caret's sbf object with the result of selection by filter.

Examples

1
2
3
4
5
6
7
  ## Example of selection by filter
  library(caret)
  library(specmine.datasets)
  data(cachexia)
  rfe.result = filter_feature_selection(cachexia$data, 
	       cachexia$metadata$Muscle.loss, functions = caret::rfSBF, 
	       method = "cv")

specmine documentation built on Sept. 21, 2021, 5:06 p.m.