Skip to content

n.show argument in plotFilterValues ignored #2689

Closed
@albersonmiranda

Description

@albersonmiranda

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions