-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DOC use diagram and simplify pipeline in stacking example #18830
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
Conversation
for cat in categories: | ||
cat[cat == None] = 'missing' # noqa | ||
tree_preprocessor = make_column_transformer( | ||
(num_tree_processor, num_cols), |
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.
why not cat_selector and num_selector here?
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 illustrated l.90 that it gives the columns name and reuse the columns then.
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.
fair, but it would also be nice to show off the callable option which I don't think many people know about... I could go either way on this one though.
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 am okay either way.
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.
Overall, this is a nice update to this example.
for cat in categories: | ||
cat[cat == None] = 'missing' # noqa | ||
tree_preprocessor = make_column_transformer( | ||
(num_tree_processor, num_cols), |
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 am okay either way.
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
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.
Minor comments, otherwise LGTM
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
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 it's indeed much clearer with diagrams. Will fix the minor typo below.
…rn#18830) Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com> Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com> Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Improve the stacking example by showing the different pipelines with diagrams.
In addition, we do not list the categories beforehand in the
OrdinalEncoder
to use the new feature of a rare category.Besides, we let the encoder treat
np.nan
as a separate category without imputing a new string.