Skip to content
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

Add StandardScaler to ElasticNet pipelines. #1065

Merged
merged 3 commits into from Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/release_notes.rst
Expand Up @@ -11,6 +11,7 @@ Release Notes
* Fixes
* Updated TextFeaturizer component to no longer require an internet connection to run :pr:`1022`
* Fixed non-deterministic element of TextFeaturizer transformations :pr:`1022`
* Added a StandardScaler to all ElasticNet pipelines :pr:`1065`
* Changes
* Added `needs_fitting` property to ComponentBase :pr:`1044`
* Updated references to data types to use datatype lists defined in `evalml.utils.gen_utils` :pr:`1039`
Expand Down
5 changes: 2 additions & 3 deletions evalml/pipelines/utils.py
Expand Up @@ -6,14 +6,13 @@
)
from .regression_pipeline import RegressionPipeline

from evalml.model_family import ModelFamily
from evalml.pipelines.components import (
CatBoostClassifier,
CatBoostRegressor,
DateTimeFeaturizer,
DropNullColumns,
Imputer,
LinearRegressor,
LogisticRegressionClassifier,
OneHotEncoder,
StandardScaler
)
Expand Down Expand Up @@ -56,7 +55,7 @@ def _get_preprocessing_components(X, y, problem_type, estimator_class):
if (add_datetime_featurizer or len(categorical_cols.columns) > 0) and estimator_class not in {CatBoostClassifier, CatBoostRegressor}:
pp_components.append(OneHotEncoder)

if estimator_class in {LinearRegressor, LogisticRegressionClassifier}:
if estimator_class.model_family == ModelFamily.LINEAR_MODEL:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Could we add a test (testing test_make_pipeline) to make sure :d

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly!

pp_components.append(StandardScaler)
return pp_components

Expand Down