Skip to content

[MRG] Move RandomTreesEmbedding criterion & max_features to be class attributes#12324

Merged
amueller merged 2 commits intoscikit-learn:masterfrom
rohan-varma:move-criterion-max-features
Oct 10, 2018
Merged

[MRG] Move RandomTreesEmbedding criterion & max_features to be class attributes#12324
amueller merged 2 commits intoscikit-learn:masterfrom
rohan-varma:move-criterion-max-features

Conversation

@rohan-varma
Copy link
Copy Markdown
Contributor

@rohan-varma rohan-varma commented Oct 8, 2018

Reference Issues/PRs

Fixes #12290.

What does this implement/fix? Explain your changes.

As per the discussion in #12290, the __init__ function in the RandomTreesEmbedding class sets self.criterion and self.max_features even though they are not input parameters into the class. Instead of doing this, we'd like to move these properties to be class attributes instead, set outside of the __init__ method, per a suggestion given by @jnothman .

@jnothman
Copy link
Copy Markdown
Member

jnothman commented Oct 8, 2018

The docstring must come first

@rohan-varma rohan-varma changed the title [WIP] Move RandomTreesEmbedding criterion & max_features to be class attributes [MRG] Move RandomTreesEmbedding criterion & max_features to be class attributes Oct 8, 2018
Copy link
Copy Markdown
Member

@jnothman jnothman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amueller can you run your tests on this

@amueller
Copy link
Copy Markdown
Member

it does. Looks good.

@amueller amueller merged commit 39bd736 into scikit-learn:master Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RandomTreesEmbedding __init__ doesn't satisfy API

3 participants