[WIP] Implemented SelectFromModel meta-transformer#3011
[WIP] Implemented SelectFromModel meta-transformer#3011maheshakya wants to merge 17 commits intoscikit-learn:masterfrom
Conversation
|
Thanks for tackling this. A number of points:
I'm changing this PR to a [WIP]. I hope that's alright with you. |
|
Also, the failing tests happen because this can't be constructed as it is. I think it should be included here: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/testing.py#L441. And although it does nothing at the moment, please inherit from |
|
I have separated out the section where Other issues are fixed. |
There was a problem hiding this comment.
Please move this method to right below the class docstring.
estimator=None is not useful. Leave it without a default.
|
Since When |
The correct way is to redefine |
|
I don't think it's a good idea to store |
There was a problem hiding this comment.
I don't think this belongs here. It's the base estimator's business.
|
Btw, it may be cleaner to implement this with the metaestimator not inheriting from the mixin. Please feel free to do it that way if you think it improves the code. |
|
I couldn't find a way to implement |
|
This should probably support |
|
@jnothman, I apologize for the inconvenience, Can you explain what exactly needs to be done in |
There was a problem hiding this comment.
This is deprecated in forests. You can remove this if-statement.
|
The only reason I say it's necessary is because it's a way the current mixin can be used. |
|
I have added BTW is there something wrong with Travis CI? It doesn't seem to be building my last two commits. |
It's highly non user-friendly, but this means that it can't automatically merge your work with master, which it does before testing. Could you please rebase on the current master and force-push the rebased branch? |
There was a problem hiding this comment.
That ( can't be there for this to be correct syntax in Python 3.
But I think it's fine if you don't explicitly check this case. The AttributeError produced by self.estimator_.partial_fit (e.g. ''LinearSVC' object has no attribute 'partial_fit'') is clear enough.
There was a problem hiding this comment.
Yes, I agree.
I removed the test case for that as well.
|
I'm not sure the tests are quite satisfactory yet (and I might not be around for the next few days to take another look), but I think we need to seek opinions as to whether a meta-estimator improves on the mixin. @glouppe, WDYT, and who else is likely to be opinionated on this? |
|
What are the tests that need to be improved. I can work on those. |
|
I'm not able to look in great detail at the tests right now, but in order On 2 April 2014 02:35, maheshakya [email protected] wrote:
|
|
Thanks. I will give it a shot. (for improved test cases, examples and documentation) |
|
I suppose we need to change every example that uses feature selection based on LearntSelectorMixin, right? |
|
Yes, unfortunately. |
|
It seems that there are unrelated changes. I'm not sure how adding a meta-transformer should affect travis.yml |
|
Closed in favor of #4242 . I rescued this PR from git hell! |
Fix for #2160
Implemented a meta-transformer to with
_LearntSelectorMixin. Test cases are included.Documentation(with examples) needs to be completed.