Skip to content

DOC make SLEP007 a more prominent #31037

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

Merged
merged 1 commit into from
Mar 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/whats_new/v1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ Changelog

- |API| All estimators store `feature_names_in_` when fitted on pandas Dataframes.
These feature names are compared to names seen in non-`fit` methods, e.g.
`transform` and will raise a `FutureWarning` if they are not consistent.
`transform` and will raise a `FutureWarning` if they are not consistent, see also
:ref:`sphx_glr_auto_examples_release_highlights_plot_release_highlights_1_0_0.py`.
These ``FutureWarning`` s will become ``ValueError`` s in 1.2. :pr:`18010` by
`Thomas Fan`_.

Expand Down
4 changes: 3 additions & 1 deletion examples/release_highlights/plot_release_highlights_1_0_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@
# When an estimator is passed a `pandas' dataframe
# <https://pandas.pydata.org/docs/user_guide/dsintro.html#dataframe>`_ during
# :term:`fit`, the estimator will set a `feature_names_in_` attribute
# containing the feature names. Note that feature names support is only enabled
# containing the feature names. This is a part of
# `SLEP007 <https://scikit-learn-enhancement-proposals.readthedocs.io/en/latest/slep007/proposal.html>`__.
# Note that feature names support is only enabled
# when the column names in the dataframe are all strings. `feature_names_in_`
# is used to check that the column names of the dataframe passed in
# non-:term:`fit`, such as :term:`predict`, are consistent with features in
Expand Down
8 changes: 5 additions & 3 deletions examples/release_highlights/plot_release_highlights_1_1_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@
# %%
# `get_feature_names_out` Available in all Transformers
# -----------------------------------------------------
# :term:`get_feature_names_out` is now available in all Transformers. This enables
# :class:`~pipeline.Pipeline` to construct the output feature names for more complex
# pipelines:
# :term:`get_feature_names_out` is now available in all transformers, thereby
# concluding the implementation of
# `SLEP007 <https://scikit-learn-enhancement-proposals.readthedocs.io/en/latest/slep007/proposal.html>`__.
# This enables :class:`~pipeline.Pipeline` to construct the output feature names for
# more complex pipelines:
from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import OneHotEncoder, StandardScaler
from sklearn.pipeline import make_pipeline
Expand Down