From b9e6d8b021dfb343fabf38fd1e44735b047ad113 Mon Sep 17 00:00:00 2001 From: Thomas Kientz <60552083+thomktz@users.noreply.github.com> Date: Mon, 26 Feb 2024 15:21:57 +0100 Subject: [PATCH] Change default `gridsearch` kwarg value (#2243) * Change default kwarg * Update CHANGELOG.md --------- Co-authored-by: Dennis Bader --- CHANGELOG.md | 2 ++ darts/models/forecasting/forecasting_model.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96220d59f5..fa30447c28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ but cannot always guarantee backwards compatibility. Changes that may **break co - Added support for additional lr scheduler configuration parameters for more control ("interval", "frequency", "monitor", "strict", "name"). [#2218](https://github.com/unit8co/darts/pull/2218) by [Dennis Bader](https://github.com/dennisbader). - Improvements to `WindowTransformer` and `window_transform`: - Added argument `keep_names` to indicate whether the original component names should be kept. [#2207](https://github.com/unit8co/darts/pull/2207)by [Antoine Madrona](https://github.com/madtoinou). +- Other improvements: + - 🔴 Changed the default `start` value in `ForecastingModel.gridsearch()` from `0.5` to `None`, to make it consistent with `historical_forecasts` and other methods. [#2243](https://github.com/unit8co/darts/pull/2243) by [Thomas Kientz](https://github.com/thomktz). **Fixed** - Fixed a bug when calling `window_transform` on a `TimeSeries` with a hierarchy. The hierarchy is now only preseved for single transformations applied to all components, or removed otherwise. [#2207](https://github.com/unit8co/darts/pull/2207)by [Antoine Madrona](https://github.com/madtoinou). diff --git a/darts/models/forecasting/forecasting_model.py b/darts/models/forecasting/forecasting_model.py index e75016490b..feb609de8c 100644 --- a/darts/models/forecasting/forecasting_model.py +++ b/darts/models/forecasting/forecasting_model.py @@ -1344,7 +1344,7 @@ def gridsearch( future_covariates: Optional[TimeSeries] = None, forecast_horizon: Optional[int] = None, stride: int = 1, - start: Union[pd.Timestamp, float, int] = 0.5, + start: Optional[Union[pd.Timestamp, float, int]] = None, start_format: Literal["position", "value"] = "value", last_points_only: bool = False, show_warnings: bool = True,