-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Allow ensemble filters to include multiple base filters of the… #2693
Conversation
Pass the base methods and the arguments to them as named lists, where the names are identifiers to identify the method used.
…/mlr into ens_filter_duplicates
I'll come to this after #2698 is done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
We should wait until the PRs fixing the bugs are merged before merging a feature PR. Meanwhile, you can address the comments but maybe it makes sense to wait until the other PRs are merged to prevent multiple merging efforts.
Also please make sure to apply the mlr-style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After resolving the merge conflicts and the two formatting related comments, I'd say we're ready to merge.
If you want, feel free to add yourself as an author to the package DESCRIPTION.
Sorry, I am really not sure what is going on here. I resolved the conflicts, did and git pull and a git push and the tests failed. I tried to fix things by doing a reset and starting over, but I may have made things worse. I am not sure what to do now. Can you advise please. Thanks. |
R/generateFilterValues.R
Outdated
out = melt(out, value.name = "value", measure.vars = colnames(fval), | ||
variable.name = "method") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@annette987 This change caused the test failures. It probably slipped while solving the merge conflicts in master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually that change was deliberate and was there before the merge. The reason for it is that method can now have duplicate filter names, which will cause the melt to fail. So I used colnames(fval) because that is set to names(method) if not null and method otherwise. In fact I could have used index_names, which is set to teh same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be that this change is still needed then. However, in one of the latest PRs there was the change to variable.name = "filter"
which definitely needs to come into this PR here.
(The column name listing all the methods used is no longer called "method" but "filter" now to avoid name clashes in other places.)
If tests fail you should then know why and be able to solve the issue quickly :)
If tests still pass despite your concern with the duplicate filter names, it might be good to add a test to verify the correct behavior of this edge case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All OK now. It was just the change to variable.name = "filter" as you suggested. I think the test I already added should be sufficient: https://github.com/annette987/mlr/blob/21c3b8b768baa0b1d7fcad5faf1bb38d157d7fbc/tests/testthat/test_featsel_filters.R#L149
Thanks for your patience with a Github newbie! :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience - we know how hard it is to make PRs to packages to comply with everything and especially in mlr 😄
It seems that you need to update man/
again, just run `devtools::document()´ or press CTRL+Shift+D in case you are using RStudio.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks OK now.I did run devtools::document() but it updated what looked like all of the documentation files and I was reluctant to push these. So I have just resolved the conflicts instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd assume that you are not running the latest version of roxygen?
When developing pkgs, it is important to always have the most recent versions of pkgs - we usually update every few days :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh OK. I will do that from now on. Thanks.
Thanks @annette987 for all your contributions! |
My pleasure. I have learnt a lot along the way. Thanks for all your help. |
…org#2693) * Allow ensemble filters to have duplicates of the same base method. Pass the base methods and the arguments to them as named lists, where the names are identifiers to identify the method used. * Fixed problem with 'melt' - column names of fval were incorrect. * Added unit test and news. * Fixed call to mapply so that it cannot e called with a null argument. * Fixed issues requested by reviewer - indentation and spaces around =. * Changes requested in PR * Changes requested in PR 2693 * Styling changes and authorship * Did a reset (not hard) to try and fix problems * whitespace > tabs * format and fix test failures * Changed melt to use filter, not method * fix news * fix filterWrapper doc
PR for Issue #2688
The base methods of ensemble filters currently have to be unique, which limits the types of ensembles that can be created. This PR removes that restriction by: