Skip to content

Commit

Permalink
Fix doc rendering in statistics.py (#2044)
Browse files Browse the repository at this point in the history
* Fix doc rendering in statistics.py

* fix other things in statistics docs

---------

Co-authored-by: dennisbader <[email protected]>
  • Loading branch information
felixdivo and dennisbader authored Nov 1, 2023
1 parent ae5caa6 commit f6e994e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions darts/utils/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -304,10 +306,12 @@ 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'.
References
-------
.. [1] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.seasonal_decompose.html
Expand Down Expand Up @@ -354,6 +358,7 @@ def remove_trend(
Defaults to "naive"
kwargs
Other keyword arguments are passed down to the decomposition method.
Returns
-------
TimeSeries
Expand Down Expand Up @@ -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
----------
Expand Down Expand Up @@ -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
----------
Expand Down Expand Up @@ -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.
"""
Expand Down

0 comments on commit f6e994e

Please sign in to comment.