Skip to content

Commit df74010

Browse files
rcap107lisaleemcbjeromedockes
authored
DOC - various improvements to the documentation (#2190)
Co-authored-by: Lisa <lisaleemcb@gmail.com> Co-authored-by: Jérôme Dockès <jerome@dockes.org>
1 parent 48fc035 commit df74010

15 files changed

Lines changed: 436 additions & 29 deletions

File tree

doc/guides/table_report/02_exporting.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
.. |column_associations| replace:: :func:`~skrub.column_associations`
44

55
.. _user_guide_table_report_sharing:
6-
How to export and share the |TableReport|
7-
-----------------------------------------
6+
How to export and share the |TableReport| for use by other tools
7+
----------------------------------------------------------------
88

99
The |TableReport| is generated as a standalone HTML file that includes the report
1010
data, the plots, and the Javascript necessary to provide interactivity.
@@ -31,7 +31,8 @@ respectively.
3131

3232
The report can be exported in JSON format, which allows structured
3333
access to the data and statistics used to build the report with
34-
:func:`~skrub.TableReport.json`.
34+
:func:`~skrub.TableReport.json`. The schema of the JSON data is reported in
35+
:ref:`table_report_json_schema`.
3536

3637
.. code-block::
3738

doc/modules/data_ops/basics/control_flow.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Finally, there are other situations where using :func:`deferred` can be helpful:
170170

171171
- See :ref:`sphx_glr_auto_examples_data_ops_1111_data_ops_quick_tour.py` for an introductory
172172
example on how to use skrub DataOps on a single dataframe.
173-
- See :ref:`sphx_glr_auto_examples_data_ops_1120_multiple_tables.py` for an example
173+
- See :ref:`sphx_glr_auto_examples_02_data_ops_1120_multiple_tables.py` for an example
174174
of how skrub DataOps can be used to process multiple tables using dataframe APIs.
175-
- See :ref:`sphx_glr_auto_examples_data_ops_1130_choices.py` for an example of
175+
- See :ref:`sphx_glr_auto_examples_02_data_ops_1130_choices.py` for an example of
176176
hyper-parameter tuning using skrub DataOps.

doc/modules/data_ops/ml_pipeline/applying_different_transformers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,4 @@ to obtain the final result:
150150

151151
More info on advanced column selection and manipulation be found in
152152
:ref:`user_guide_selectors` and example
153-
:ref:`sphx_glr_auto_examples_0090_apply_to_cols.py`.
153+
:ref:`sphx_glr_auto_examples_0010_apply_to_cols.py`.

doc/modules/data_ops/ml_pipeline/subsampling_data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ set to ``True`` to force using the subsampling when we call them. Note that
2626
even if we set ``keep_subsampling=True``, subsampling is not applied when using
2727
``predict``.
2828

29-
See more details in a :ref:`full example <sphx_glr_auto_examples_data_ops_1140_subsampling.py>`.
29+
See more details in a :ref:`full example <sphx_glr_auto_examples_02_data_ops_1140_subsampling.py>`.

doc/modules/data_ops/validation/exporting_data_ops.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ or in a different environment:
6262
>>> loaded_learner.fit({"orders": new_orders_df})
6363
SkrubLearner(data_op=<Apply TableVectorizer>)
6464

65-
See :ref:`sphx_glr_auto_examples_data_ops_1150_use_case.py` for an example of how
65+
See :ref:`sphx_glr_auto_examples_02_data_ops_1150_use_case.py` for an example of how
6666
to use the learner in a microservice.

doc/modules/data_ops/validation/hyperparameter_tuning.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ search respectively), or with the ``choose`` parameter of
162162
:meth:`.skb.make_learner() <DataOp.skb.make_learner>`.
163163

164164
A full example of how to use hyperparameter search is available in
165-
:ref:`sphx_glr_auto_examples_data_ops_1130_choices.py`, and a full example using
165+
:ref:`sphx_glr_auto_examples_02_data_ops_1130_choices.py`, and a full example using
166166
Optuna is in :ref:`example_optuna_choices`.
167167

168168
|

doc/modules/default_wrangling/apply_to_cols.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ to apply the proper transformers to different datatypes, using it may not be an
2525
option in all cases. In scikit-learn pipelines, the column selection operation can
2626
be done with the :class:`~sklearn.compose.ColumnTransformer`.
2727

28-
Skrub provides the |ApplyToCols| transformer to achieve the same results with
29-
a larger degree of control over which columns are being transformed.
28+
Skrub provides the |ApplyToCols| transformer and the
29+
:ref:`selectors<user_guide_selectors>` to achieve the same results with a larger
30+
degree of control over which columns are being transformed.
3031
|ApplyToCols| maps a transformer to columns in a dataframe, so that all
31-
columns that satisfy a certain condition are transformed, while the others are
32-
left untouched.
32+
columns that satisfy the condition given by the user are transformed, while the
33+
others are left untouched.
3334

3435
.. tip::
3536

3637
If a skrub transformer has a ``cols`` parameter to specify a column list,
3738
that can be a selector as well. Selectors give more control over which columns
38-
are being transformed: they are discussed at length in the
39-
:ref:`selectors user guide<user_guide_selectors>`.
39+
are being transformed.
4040

4141

4242
|ApplyToCols| can be used to transform a subset of columns in a dataframe, while

doc/modules/joining_tables/assembling.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,22 @@ requires including as much information as possible, often from different sources
99
Skrub allows you to join tables on keys of different types (string, numerical,
1010
datetime) with imprecise correspondence.
1111

12+
.. warning::
1213

14+
To be considered when using one of the joiners:
15+
16+
**Joiners are designed for small-to-medium datasets.**
17+
18+
- **Memory**: The auxiliary table is stored in the transformer state.
19+
For tables > 1 million rows, consider using :ref:`skrub Data Ops
20+
<user_guide_data_ops_index>` with pandas/polars joins instead.
21+
22+
- **Computational Cost**: Fuzzy joining requires vectorizing columns
23+
and nearest-neighbor search. Test on samples first for large datasets.
24+
25+
- **Dynamic Data**: If your auxiliary table changes after fitting,
26+
you must refit the transformer. Joiners are not suitable for continuously
27+
updated tables.
1328

1429
Joining external tables for machine learning
1530
--------------------------------------------
@@ -58,4 +73,4 @@ in the right table (the table to be added). This is done by estimating the value
5873
that the missing rows would have by training a machine learning model on the data
5974
we have access to.
6075

61-
This transformer is explored in more detail in :ref:`this example <sphx_glr_auto_examples_0080_interpolation_join.py>`.
76+
This transformer is explored in more detail in :ref:`this example <sphx_glr_auto_examples_03_joining_0080_interpolation_join.py>`.

doc/reference/index.rst.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ classes and functions may not be enough to give full guidelines on their use.
1717
{% for module, _ in API_REFERENCE %}
1818
{{ module }} <{{ module }}>
1919
{%- endfor %}
20+
TableReport JSON schema <table_report_json_schema>
2021
{%- if DEPRECATED_API_REFERENCE %}
2122
deprecated
2223
{%- endif %}

0 commit comments

Comments
 (0)