Skip to content

Commit

Permalink
Iter on suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturoAmorQ committed Oct 26, 2023
1 parent cdfc229 commit f7a1cde
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,10 @@ def plot_decision_boundary(model, title=None):
# %%
from sklearn.preprocessing import KBinsDiscretizer

classifier = make_pipeline(KBinsDiscretizer(n_bins=5), LogisticRegression())
classifier = make_pipeline(
KBinsDiscretizer(n_bins=5, encode="onehot"), # already the default params
LogisticRegression(),
)
classifier

# %%
Expand Down Expand Up @@ -290,8 +293,8 @@ def plot_decision_boundary(model, title=None):
#
# ```{note}
# Notice that `KBinsDiscretizer(encode="onehot")` and `SplineTransformer` do not
# require additional scaling. Indeed, they can replace the scaling step for numerical
# features: they both create features with values in the [0, 1] range.
# require additional scaling. Indeed, they can replace the scaling step for
# numerical features: they both create features with values in the [0, 1] range.
# ```

# %% [markdown]
Expand Down

0 comments on commit f7a1cde

Please sign in to comment.