Skip to content

Commit e8c43d7

Browse files
committed
update te max_absolute_value of the Squashingscaler to 5
1 parent f9bbd90 commit e8c43d7

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

doc/modules/default_wrangling/tabular_pipeline.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If the estimator is a linear model (e.g., ``Ridge``, ``LogisticRegression``),
2626
Pipeline(steps=[('tablevectorizer',
2727
TableVectorizer(datetime=DatetimeEncoder(periodic_encoding='spline'))),
2828
('simpleimputer', SimpleImputer(add_indicator=True)),
29-
('squashingscaler', SquashingScaler(max_absolute_value=10)),
29+
('squashingscaler', SquashingScaler(max_absolute_value=5)),
3030
('linearregression', LinearRegression())])
3131

3232
It is also possible to call the function with the name of the task that must be

skrub/_tabular_pipeline.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def tabular_pipeline(estimator, *, n_jobs=None):
101101
:class:`~skrub.MinHashEncoder` to :class:`~skrub.StringEncoder`.
102102
103103
.. versionchanged:: 0.7.0
104-
The :class:`~skrub.SquashingScaler` with `max_absolute_value=10` is now used instead of
104+
The :class:`~skrub.SquashingScaler` with `max_absolute_value=5` is now used instead of
105105
:class:`~sklearn.preprocessing.StandardScaler` for centering and scaling
106106
numerical features when using linear models.
107107
@@ -221,7 +221,7 @@ def tabular_pipeline(estimator, *, n_jobs=None):
221221
Pipeline(steps=[('tablevectorizer',
222222
TableVectorizer(datetime=DatetimeEncoder(periodic_encoding='spline'))),
223223
('simpleimputer', SimpleImputer(add_indicator=True)),
224-
('squashingscaler', SquashingScaler(max_absolute_value=10)),
224+
('squashingscaler', SquashingScaler(max_absolute_value=5)),
225225
('logisticregression', LogisticRegression())])
226226
227227
By applying only the first pipeline step we can see the transformed data that is
@@ -253,7 +253,7 @@ def tabular_pipeline(estimator, *, n_jobs=None):
253253
- A :obj:`~sklearn.impute.SimpleImputer`, as the
254254
:obj:`~sklearn.linear_model.LogisticRegression` cannot handle missing values.
255255
256-
- A :obj:`~skrub.SquashingScaler` for centering and standard scaling
256+
- A :obj:`~skrub.SquashingScaler` for centering and scaling
257257
numerical features.
258258
259259
On the other hand, For the :obj:`~sklearn.ensemble.HistGradientBoostingClassifier`
@@ -337,6 +337,6 @@ def tabular_pipeline(estimator, *, n_jobs=None):
337337
if not get_tags(estimator).input_tags.allow_nan:
338338
steps.append(SimpleImputer(add_indicator=True))
339339
if not isinstance(estimator, _TREE_ENSEMBLE_CLASSES):
340-
steps.append(SquashingScaler(max_absolute_value=10))
340+
steps.append(SquashingScaler(max_absolute_value=5))
341341
steps.append(estimator)
342342
return make_pipeline(*steps)

0 commit comments

Comments
 (0)