From 722c4484d164e2520d706eec9bdccb29f3010167 Mon Sep 17 00:00:00 2001 From: Deepyaman Datta Date: Fri, 19 Jul 2024 11:06:47 -0600 Subject: [PATCH] docs(website): generalize name to "Data splitting" (#128) --- docs/_quarto.yml | 10 +++++----- ibis_ml/__init__.py | 2 +- ibis_ml/utils/{_train_test_split.py => _split.py} | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) rename ibis_ml/utils/{_train_test_split.py => _split.py} (96%) diff --git a/docs/_quarto.yml b/docs/_quarto.yml index c143bf7..a9df3b8 100644 --- a/docs/_quarto.yml +++ b/docs/_quarto.yml @@ -86,7 +86,7 @@ website: - section: Utilities contents: - - reference/utils-train-test-split.qmd + - reference/utils-data-splitting.qmd format: html: @@ -204,7 +204,7 @@ quartodoc: path: steps-outlier-handling summary: name: Outlier handling - desc: Handle outliers + desc: Outlier detection and handling contents: - HandleUnivariateOutliers @@ -234,9 +234,9 @@ quartodoc: package: ibis_ml contents: - kind: page - path: utils-train-test-split + path: utils-data-splitting summary: - name: Train-test split - desc: Randomly split Ibis table + name: Data splitting + desc: Segregating data into training, testing, and validation sets contents: - train_test_split diff --git a/ibis_ml/__init__.py b/ibis_ml/__init__.py index d3ff248..efccc82 100644 --- a/ibis_ml/__init__.py +++ b/ibis_ml/__init__.py @@ -28,7 +28,7 @@ ) from ibis_ml.steps import * from ibis_ml.utils._pprint import _pprint_recipe, _pprint_step, _safe_repr -from ibis_ml.utils._train_test_split import train_test_split +from ibis_ml.utils._split import train_test_split # Add support for `Recipe`s and `Step`s to the built-in `PrettyPrinter`. pprint.PrettyPrinter._dispatch[Recipe.__repr__] = _pprint_recipe # noqa: SLF001 diff --git a/ibis_ml/utils/_train_test_split.py b/ibis_ml/utils/_split.py similarity index 96% rename from ibis_ml/utils/_train_test_split.py rename to ibis_ml/utils/_split.py index 3cbf7b2..7edc577 100644 --- a/ibis_ml/utils/_train_test_split.py +++ b/ibis_ml/utils/_split.py @@ -62,11 +62,11 @@ def train_test_split( >>> table = ibis.memtable({"key1": range(100)}) >>> train_table, test_table = ml.train_test_split( - table, - unique_key="key1", - test_size=0.2, - random_seed=0, - ) + ... table, + ... unique_key="key1", + ... test_size=0.2, + ... random_seed=0, + ... ) """ if not (0 < test_size < 1): raise ValueError("test size should be a float between 0 and 1.")