DaMiR.FBest: Select best predictors to build Classification Model

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Feature_Selection.R

Description

This function allows the user to select a subset of predictors; the number of predictors can be defined by user or selected automatically.

Usage

1
2
3
4
5
6
7
DaMiR.FBest(
  data,
  ranking,
  autoselect = c("no", "yes"),
  n.pred = 10,
  th.zscore = 2
)

Arguments

data

A transposed data frame of expression data. Rows and Cols should be, respectively, observations and features

ranking

A data frame with importance score for each feature, generated by DaMiR.FSort

autoselect

A flag to specify how to select predictors:

  • "no" (default) - Manually: users can specify the number of best predictors, setting n.pred argument

  • "yes" - Automatically: users have to specify the importance threshold defined by the th.zscore argument; features will be accordingly selected

n.pred

If autoselect="no" then the user have to specify the number of predictors; default is 10

th.zscore

Threshold of scaled importance score (Z-score); default value is 2

Value

A list containing:

Author(s)

Mattia Chiesa, Luca Piacentini

See Also

DaMiR.FSort

Examples

1
2
3
4
5
6
7
8
# use example data:
data(data_reduced)
data(data_relief)
# select the first 8 predictors rankad by imporatance:
selected_features <- DaMiR.FBest(data_reduced, data_relief, n.pred = 8)
# select predictors by importance but automatically:
selected_features <- DaMiR.FBest(data_reduced, data_relief,
autoselect = "yes", th.zscore = 1.5)

BioinfoMonzino/DaMiRseq documentation built on Aug. 22, 2021, 3:11 p.m.