-
-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
n.show argument in plotFilterValues
ignored
#2689
Comments
Ah, yes, that is a bug. Fixing this will be trickier than the code you're proposing though as there's also an argument that allows to specify the order. This is only used to reorder values in the plot though, not to actually sort the data. The documentation doesn't specify what values are selected... I think it probably makes most sense here to sort the values, select the top n, and then plot in that order (and change the documentation accordingly). Other opinions @pat-s ? |
@larskotthoff when you say 'sort the values', you mean that There could even be both |
I mean sort the data. That would make most sense here I think -- reordering it just for the plot doesn't make it as obvious what's happening. |
@albersonmiranda Thanks. For an unknown reason, |
I'm working on a data set with several features and just noticed
plotFilterValues
is ignoringn.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
Created on 2019-12-03 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: