DOC Cleaning parameter spec in docstrings for ensemble m…#16330
DOC Cleaning parameter spec in docstrings for ensemble m…#16330rth merged 4 commits intoscikit-learn:masterfrom
Conversation
13aa55f to
b3d850d
Compare
b3d850d to
0b9d966
Compare
| - If "log2", then `max_features=log2(n_features)`. | ||
| - If 'auto', then `max_features=sqrt(n_features)`. | ||
| - If 'sqrt', then `max_features=sqrt(n_features)`. | ||
| - If 'log2', then `max_features=log2(n_features)`. |
There was a problem hiding this comment.
Yes, perhaps I am overzealous here.
The story of this change was so:
First, I changed the max_features type from str to the set of allowed parameters. The contributing guide uses single ticks, so the default set was {'auto', 'sqrt', 'log2'}.
Second, I changed the parameter description for consistency to single ticks.
Shall I revert this? Just let me know.
There was a problem hiding this comment.
The contributing guide uses single ticks, so the default set was {'auto', 'sqrt', 'log2'}.
I'm not sure there is a reason for it though. For instance, black will format with double tick in code. We can keep it as is here, but best to avoid such changes in future PRs.
There was a problem hiding this comment.
@rth I will, thanks for pointing this out!
Does sciki-learn use black for formatting code (even optionally)?
I am a great fan of the tool, so if this was the case I would definitely blackify my further contribution (if any).
|
@rth, great! Reviewing this patches is tedious. I appreciate it. I believe it makes the amazing documentation of Thank you! |
|
Thanks for working on this @lopusz ! |
Reference Issues/PRs
#15761
What does this implement/fix? Explain your changes.
Cleans up parameter spec in ensemble, so it follows the convention outlined in the Contributing Guide
Only changes in docstrings.