diff --git a/examples/applications/plot_cyclical_feature_engineering.py b/examples/applications/plot_cyclical_feature_engineering.py index 2d57c1a7b41b5..21349cd5336db 100644 --- a/examples/applications/plot_cyclical_feature_engineering.py +++ b/examples/applications/plot_cyclical_feature_engineering.py @@ -50,7 +50,7 @@ # a hourly basis: df["count"].max() -# %% [markdown] +# %% # # Let us rescale the target variable (number of hourly bike rentals) to predict # a relative demand so that the mean absolute error is more easily interpreted @@ -67,7 +67,7 @@ # intuitive than the (root) mean squared error. Note, however, that the # best models for one metric are also the best for the other in this # study. -y = df["count"] / 1000 +y = df["count"] / df["count"].max() # %% fig, ax = plt.subplots(figsize=(12, 4)) @@ -671,7 +671,7 @@ def periodic_spline_transformer(period, n_splines=None, degree=3): # %% # # We observe that this model can almost rival the performance of the gradient -# boosted trees with an average error around 6% of the maximum demand. +# boosted trees with an average error around 5% of the maximum demand. # # Note that while the final step of this pipeline is a linear regression model, # the intermediate steps such as the spline feature extraction and the Nyström