Closed
Description
I'm working on a data set with several features and just noticed plotFilterValues
is ignoring n.show
argument. Code inspected, couldn't find how it should work.
I ran something like
importance = generateFilterValuesData(train.task, method = "FSelectorRcpp_information.gain") plotFilterValues(importance, n.show = 10)
and got all features, instead of 10.
Changed line 188 on the file for
data = fvalues$data %>% arrange(desc(value)) %>% slice(1:n.show)
and it seems to do the trick.
Could you guys check it?
Edit by @pat-s: Reprex added
library(mlr)
#> Loading required package: ParamHelpers
importance = generateFilterValuesData(spam.task, method = "FSelectorRcpp_information.gain")
plotFilterValues(importance, n.show = 10)
Created on 2019-12-03 by the reprex package (v0.3.0)