8000 DOC Fix minor issues in bike sharing example (#21127) · samronsin/scikit-learn@b50c558 · GitHub
[go: up one dir, main page]

Skip to content

Commit b50c558

Browse files
lestevesamronsin
authored andcommitted
DOC Fix minor issues in bike sharing example (scikit-learn#21127)
1 parent 8871ac0 commit b50c558

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/applications/plot_cyclical_feature_engineering.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
# a hourly basis:
5151
df["count"].max()
5252

53-
# %% [markdown]
53+
# %%
5454
#
5555
# Let us rescale the target variable (number of hourly bike rentals) to predict
5656
# a relative demand so that the mean absolute error is more easily interpreted
@@ -67,7 +67,7 @@
6767
# intuitive than the (root) mean squared error. Note, however, that the
6868
# best models for one metric are also the best for the other in this
6969
# study.
70-
y = df["count"] / 1000
70+
y = df["count"] / df["count"].max()
7171

7272
# %%
7373
fig, ax = plt.subplots(figsize=(12, 4))
@@ -671,7 +671,7 @@ def periodic_spline_transformer(period, n_splines=None, degree=3):
671671
# %%
672672
#
673673
# We observe that this model can almost rival the performance of the gradient
674-
# boosted trees with an average error around 6% of the maximum demand.
674+
# boosted trees with an average error around 5% of the maximum demand.
675675
#
676676
# Note that while the final step of this pipeline is a linear regression model,
677677
# the intermediate steps such as the spline feature extraction and the Nyström

0 commit comments

Comments
 (0)
0