View source: R/filterFeatures.R
filterFeatures | R Documentation |
First, calls generateFilterValuesData.
Features are then selected via select
and val
.
filterFeatures(
task,
method = "FSelectorRcpp_information.gain",
fval = NULL,
perc = NULL,
abs = NULL,
threshold = NULL,
fun = NULL,
fun.args = NULL,
mandatory.feat = NULL,
select.method = NULL,
base.methods = NULL,
cache = FALSE,
...
)
task |
(Task) |
method |
( |
fval |
(FilterValues) |
perc |
( |
abs |
( |
threshold |
( |
fun |
( |
fun.args |
(any) |
mandatory.feat |
(character) |
select.method |
If multiple methods are supplied in argument |
base.methods |
If |
cache |
( |
... |
(any) |
Task.
If cache = TRUE
, the default mlr cache directory is used to cache
filter values. The directory is operating system dependent and can be
checked with getCacheDir()
.
The default cache can be cleared with deleteCacheDir()
.
Alternatively, a custom directory can be passed to store the cache.
Note that caching is not thread safe. It will work for parallel computation on many systems, but there is no guarantee.
Besides passing (multiple) simple filter methods you can also pass an
ensemble filter method (in a list). The ensemble method will use the simple
methods to calculate its ranking. See listFilterEnsembleMethods()
for
available ensemble methods.
Other filter:
generateFilterValuesData()
,
getFilteredFeatures()
,
listFilterEnsembleMethods()
,
listFilterMethods()
,
makeFilterEnsemble()
,
makeFilterWrapper()
,
makeFilter()
,
plotFilterValues()
# simple filter
filterFeatures(iris.task, method = "FSelectorRcpp_gain.ratio", abs = 2)
# ensemble filter
filterFeatures(iris.task, method = "E-min",
base.methods = c("FSelectorRcpp_gain.ratio",
"FSelectorRcpp_information.gain"), abs = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.