Skip to content

Commit 1d7dae4

Browse files
authored
DOC - various fixes for the documentation (#1987)
1 parent 2de9508 commit 1d7dae4

File tree

12 files changed

+29
-40
lines changed

12 files changed

+29
-40
lines changed

CHANGES.rst

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ New Features
2222
- The reports produced by :meth:`DataOp.skb.full_report` and
2323
:meth:`SkrubLearner.report` now also display the values provided in the
2424
environment. :pr:`1920` by :user:`Jérôme Dockès <jeromedockes>`.
25-
- :class:`SkrubLearner`, :class:`ParamSearch` and :class:`OptunaSearch` expose
25+
- :class:`SkrubLearner`, :class:`ParamSearch` and :class:`OptunaParamSearch` expose
2626
some more attributes for inspection by scikit-learn: ``__sklearn_tags__``,
2727
``classes_``, ``_estimator_type``. :pr:`1931` by :user:`Jérôme Dockès
2828
<jeromedockes>`.
@@ -54,10 +54,12 @@ Changes
5454
The default ``skrub_data`` folder can now be set in the skrub configuration and by setting
5555
the ``SKB_DATA_DIRECTORY`` environment variable. The environment variable ``SKRUB_DATA_DIRECTORY``
5656
is deprecated and will be removed in a future version of skrub.
57-
:pr:`1852` by :user:`Riccardo Cappuzzo<rcap107>`.
58-
- :class:`core.SingleColumnTransformer` and associated exception :class:`core.RejectColumn` (used
59-
internally by many skrub estimators) have been added to the public API, in the newly-created
60-
:package:`skrub.core` module. :pr:`1851` by :user:`Eloi Massoulié <emassoulie>`.
57+
:pr:`1852` by :user:`Riccardo Cappuzzo<rcap107>`. Examples in the gallery have
58+
been updated accordingly in :pr:`1940` and :pr:`1964` by :user:`MuditAtrey <MuditAtrey>`.
59+
- :class:`~skrub.core.SingleColumnTransformer` and associated exception
60+
:class:`~skrub.core.RejectColumn` (used internally by many skrub estimators) have
61+
been added to the public API, in the newly-created ``skrub.core`` module.
62+
:pr:`1851` by :user:`Eloi Massoulié <emassoulie>`.
6163
- Added the strings ``"None"`` and ``"none"`` to the list of null string values in
6264
:class:`Cleaner`. Also, exposed the list of null string values that will be set
6365
to null by the :class:`Cleaner` as the parameter ``null_strings``.
@@ -72,7 +74,7 @@ Changes
7274
or an instance of the :class:`Selector`.
7375
:pr:`1976` by :user:`Lisa McBride <lisaleemcb>`.
7476
- The overplotting of the counts atop the vertical histogram bars in the
75-
:class:'TableReport' has been removed due to formatting issues.
77+
:class:`TableReport` has been removed due to formatting issues.
7678
:pr:`1984` by :user:`Lisa McBride<lisaleemcb>`.
7779

7880
Bug Fixes
@@ -87,18 +89,10 @@ Bug Fixes
8789
``return_indices=True``. Now it returns the train and test indices of each
8890
fold in the ``train_indices`` and ``test_indices`` columns of the result
8991
dataframe. :pr:`1953` by :user:`Jérôme Dockès <jeromedockes>`.
90-
- :class:`CheckInputDataFrame` no longer collects Polars LazyFrames automatically;
91-
a ``TypeError`` is now raised instead, consistent with the rest of the library.
92+
- Polars LazyFrames are no longer collected automatically anywhere in the library;
93+
a ``TypeError`` is now raised instead.
9294
:pr:`1941` by :user:`Mudit Atrey <MuditAtrey>`.
93-
- :func:`fetch_employee_salaries` now correctly writes the train and test
94-
split CSV files to their respective paths when ``split`` is specified.
95-
:pr:`1964` by :user:`MuditAtrey <MuditAtrey>`.
9695

97-
Documentation
98-
-------------
99-
- Updated gallery examples to load datasets from their file paths using
100-
``pd.read_csv()``, following the pattern established in :pr:`1852`.
101-
:pr:`1940` and :pr:`1964` by :user:`MuditAtrey <MuditAtrey>`.
10296

10397
Release 0.7.2
10498
=============

doc/modules/column_level_featurizing/advanced_columnwise_operations.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.. |ApplyToCols| replace:: :class:`ApplyToCols`
44
.. |RejectColumn| replace:: :class:`core.RejectColumn`
55
.. |SingleColumnTranformer| replace:: :class:`core.SingleColumnTranformer`
6+
.. |ToDatetime| replace:: :class:`ToDatetime`
67

78
.. _user_guide_single_column_transformer:
89

doc/modules/configuration_and_utils/customizing_configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ These are the parameters currently available in the global configuration:
5959
* - ``table_report_verbosity``
6060
- ``1``
6161
- ``SKB_TABLE_REPORT_VERBOSITY``
62-
- Set the verbosity of the :clas:`~skrub.TableReport`. If ``1``, print on screen the progress by column, if ``0`` print nothing.
62+
- Set the verbosity of the :class:`~skrub.TableReport`. If ``1``, print on screen the progress by column, if ``0`` print nothing.
6363
* - ``max_plot_columns``
6464
- 30
6565
- ``SKB_MAX_PLOT_COLUMNS``

doc/modules/default_wrangling/apply_to_cols.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
.. |SingleColumnTransformer| replace:: :class:`~skrub.core.SingleColumnTransformer`
1010
.. |StandardScaler| replace:: :class:`~sklearn.preprocessing.StandardScaler`
1111
.. |OneHotEncoder| replace:: :class:`~sklearn.preprocessing.OneHotEncoder`
12+
.. |OrdinalEncoder| replace:: :class:`~sklearn.preprocessing.OrdinalEncoder`
1213
.. |make_pipeline| replace:: :class:`~sklearn.pipeline.make_pipeline`
1314

1415
.. _user_guide_multiple_columns:

doc/modules/multi_column_operations/advanced_selectors.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.. currentmodule:: skrub.selectors
22

3-
.. |ApplyToEachCol| replace:: :class:`~skrub.ApplyToEachCol`
43
.. |StandardScaler| replace:: :class:`~sklearn.preprocessing.StandardScaler`
54
.. |filter| replace:: :func:`filter`
65
.. |filter_names| replace:: :func:`filter_names`
@@ -125,7 +124,3 @@ Select columns with at least 25% missing values:
125124
5 NaN ...
126125
6 NaN ...
127126
7 150.0 ...
128-
129-
Example: Dropping columns with :func:`DropUninformative`
130-
..........................................................
131-
:ref:`user_guide_drop_uninformative`

examples/0000_getting_started.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
.. |Joiner| replace:: :class:`~skrub.Joiner`
1919
.. |SquashingScaler| replace:: :class:`~skrub.SquashingScaler`
2020
.. |DatetimeEncoder| replace:: :class:`~skrub.DatetimeEncoder`
21-
.. |ApplyToEachCol| replace:: :class:`~skrub.ApplyToEachCol`
21+
.. |ApplyToCols| replace:: :class:`~skrub.ApplyToCols`
2222
.. |StringEncoder| replace:: :class:`~skrub.StringEncoder`
2323
.. |TextEncoder| replace:: :class:`~skrub.TextEncoder`
2424
"""
@@ -158,7 +158,7 @@
158158
TableReport(data)
159159
# %%
160160
# Skrub transformers are applied column-by-column, but it's possible to use
161-
# the |ApplyToEachCol| meta-transformer to apply a transformer to
161+
# the |ApplyToCols| meta-transformer to apply a transformer to
162162
# multiple columns at once. Complex column selection is possible using
163163
# :ref:`skrub's column selectors <user_guide_selectors>`.
164164

examples/0090_apply_to_cols.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
and transforming dataframe columns using arbitrary logic.
1010
1111
.. |ApplyToCols| replace:: :class:`~skrub.ApplyToCols`
12-
.. |ApplyToEachCol| replace:: :class:`~skrub.ApplyToEachCol`
13-
.. |ApplyToSubFrame| replace:: :class:`~skrub.ApplyToSubFrame`
1412
.. |StringEncoder| replace:: :class:`~skrub.StringEncoder`
1513
.. |SelectCols| replace:: :class:`~skrub.SelectCols`
1614
.. |DropCols| replace:: :class:`~skrub.DropCols`
@@ -106,7 +104,7 @@
106104
# .. admonition:: Under the hood of |ApplyToCols|
107105
# :collapsible: closed
108106
#
109-
# |ApplyToCols| is implemented using the |ApplyToEachCol| and |ApplyToSubFrame|
107+
# |ApplyToCols| is implemented using the ``ApplyToEachCol`` and ``ApplyToSubFrame``
110108
# classes.
111109
# The former applies a transformer to each column independently, while the latter
112110
# applies a transformer to a sub-dataframe.

skrub/_data_ops/_estimator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@ def find_fitted_estimator(self, name):
311311
-------
312312
scikit-learn estimator
313313
The fitted estimator. Depending on the nature of the estimator it
314-
may be wrapped in a ``skrub.ApplyToEachCol`` or ``skrub.ApplyToSubFrame``,
314+
may be wrapped in a ``skrub._apply_to_each_col.ApplyToEachCol``
315+
or ``skrub._apply_to_sub_frame.ApplyToSubFrame``,
315316
see examples below.
316317
317318
See also

skrub/_data_ops/_skrub_namespace.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def apply(
205205
how : "auto", "cols", "frame" or "no_wrap", optional
206206
How the estimator is applied. In most cases the default "auto"
207207
is appropriate.
208+
208209
- "cols" means `estimator` is wrapped in a :class:`ApplyToEachCol`
209210
transformer, which fits a separate clone of `estimator` each
210211
column in `cols`. `estimator` must be a transformer (have a
@@ -275,11 +276,8 @@ def apply(
275276
--------
276277
skrub.DataOp.skb.make_learner :
277278
Get a skrub learner for this DataOp.
278-
skrub.ApplyToEachCol :
279-
Transformer that applies a given transformer separately to each
280-
selected column.
281-
skrub.ApplyToSubFrame:
282-
Transformer that applies a given transformer to part of a
279+
skrub.ApplyToCols :
280+
Transformer that applies a given estimator to selected columns of a
283281
dataframe.
284282
285283
Examples

skrub/_similarity_encoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class SimilarityEncoder(OneHotEncoder):
177177
column. The passed categories must be sorted and should not mix
178178
strings and numeric values.
179179
180-
The categories used can be found in the SimilarityEncoder.categories_
180+
The categories used can be found in the :attr:`~skrub.SimilarityEncoder.categories_`
181181
attribute.
182182
dtype : number type, default=float64
183183
Desired dtype of output.

0 commit comments

Comments
 (0)