From b17e57ee6e76cb58a3b24dddf42b614755d22eb9 Mon Sep 17 00:00:00 2001 From: Felix Divo <4403130+felixdivo@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:06:43 +0100 Subject: [PATCH 1/2] Fix doc rendering in statistics.py --- darts/utils/statistics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/darts/utils/statistics.py b/darts/utils/statistics.py index 7b6ca47799..a6fc55c215 100644 --- a/darts/utils/statistics.py +++ b/darts/utils/statistics.py @@ -304,7 +304,7 @@ def remove_seasonality( Defaults to "naive" kwargs Other keyword arguments are passed down to the decomposition method. - Returns + Returns ------- TimeSeries A new TimeSeries instance that corresponds to the seasonality-adjusted 'ts'. From dfa351fcf0580cbb3ba82dc84632620862c41197 Mon Sep 17 00:00:00 2001 From: dennisbader Date: Wed, 1 Nov 2023 15:24:00 +0100 Subject: [PATCH 2/2] fix other things in statistics docs --- darts/utils/statistics.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/darts/utils/statistics.py b/darts/utils/statistics.py index a6fc55c215..7b1fbdf601 100644 --- a/darts/utils/statistics.py +++ b/darts/utils/statistics.py @@ -150,13 +150,14 @@ def extract_trend_and_seasonality( Only compatible with ``ADDITIVE`` model type. kwargs Other keyword arguments are passed down to the decomposition method. + Returns ------- Tuple[TimeSeries, TimeSeries] A tuple of (trend, seasonal) time series. References - ------- + ---------- .. [1] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.seasonal_decompose.html .. [2] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.STL.html .. [3] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.MSTL.html @@ -248,6 +249,7 @@ def remove_from_series( Must be ``from darts.utils.utils import ModelMode, SeasonalityMode`` Enums member. Either ``MULTIPLICATIVE`` or ``ADDITIVE``. Defaults ``ModelMode.MULTIPLICATIVE``. + Returns ------- TimeSeries @@ -304,10 +306,12 @@ def remove_seasonality( Defaults to "naive" kwargs Other keyword arguments are passed down to the decomposition method. + Returns ------- TimeSeries A new TimeSeries instance that corresponds to the seasonality-adjusted 'ts'. + References ------- .. [1] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.seasonal_decompose.html @@ -354,6 +358,7 @@ def remove_trend( Defaults to "naive" kwargs Other keyword arguments are passed down to the decomposition method. + Returns ------- TimeSeries @@ -618,7 +623,7 @@ def plot_acf( axis Optionally, an axis object to plot the ACF on. default_formatting - Whether or not to use the darts default scheme. + Whether to use the darts default scheme. References ---------- @@ -722,7 +727,7 @@ def plot_pacf( axis Optionally, an axis object to plot the ACF on. default_formatting - Whether or not to use the darts default scheme. + Whether to use the darts default scheme. References ---------- @@ -889,7 +894,7 @@ def plot_residuals_analysis( fill_nan A boolean value indicating whether NaN values should be filled in the residuals. default_formatting - Whether or not to use the darts default scheme. + Whether to use the darts default scheme. acf_max_lag The maximum lag to be displayed in the ACF plot. Must be less than residuals length. """