Skip to contents

Filters out all features that display a prevalence below a given threshold provided as a number of observations or percentage. This for the total dataset or by class.

Usage

filterFeaturesByPrevalence(
  X,
  y = NULL,
  nb.prevalence = NULL,
  perc.prevalence = NULL,
  by.class = TRUE
)

Arguments

X:

the dataset X

y:

the class vector (default:NULL)

nb.prevalence:

the minimum number of non zero observations (default: 10)

perc.prevalence:

the percentage of non zero observations (default: NULL)

by.class:

wether the filter should be applied by class (default: TRUE)

Value

the filtered dataset, without the features that do not pass the filter.