Skip to content

Commit 0f7a516

Browse files
authored
Merge branch 'master' into fix/TFTModel_flask
2 parents bc5317d + 334b0d8 commit 0f7a516

File tree

2 files changed

+32
-24
lines changed

2 files changed

+32
-24
lines changed

darts/utils/statistics.py

+25-17
Original file line numberDiff line numberDiff line change
@@ -502,28 +502,32 @@ def plot_acf(
502502
) -> None:
503503
"""
504504
Plots the ACF of `ts`, highlighting it at lag `m`, with corresponding significance interval.
505-
This function uses the `Statsmodels module <https://github.com/statsmodels/statsmodels>`_.
505+
Uses :func:`statsmodels.tsa.stattools.acf` [1]_
506506
507507
Parameters
508508
----------
509-
ts : TimeSeries
509+
ts
510510
The TimeSeries whose ACF should be plotted.
511-
m : int, optional
511+
m
512512
Optionally, a time lag to highlight on the plot.
513-
max_lag : int, default: 24
513+
max_lag
514514
The maximal lag order to consider.
515-
alpha : float, default: 0.05
515+
alpha
516516
The confidence interval to display.
517-
bartlett_confint : bool, default: True
517+
bartlett_confint
518518
The boolean value indicating whether the confidence interval should be
519519
calculated using Bartlett's formula. If set to True, the confidence interval
520520
can be used in the model identification stage for fitting ARIMA models.
521521
If set to False, the confidence interval can be used to test for randomness
522522
(i.e. there is no time dependence in the data) of the data.
523-
fig_size : tuple of int, default: (10, 5)
523+
fig_size
524524
The size of the figure to be displayed.
525-
axis : plt.axis, optional
525+
axis
526526
Optionally, an axis object to plot the ACF on.
527+
528+
References
529+
----------
530+
.. [1] https://www.statsmodels.org/dev/generated/statsmodels.tsa.stattools.acf.html
527531
"""
528532

529533
ts._assert_univariate()
@@ -584,17 +588,17 @@ def plot_pacf(
584588
) -> None:
585589
"""
586590
Plots the Partial ACF of `ts`, highlighting it at lag `m`, with corresponding significance interval.
587-
This function uses the `Statsmodels module <https://github.com/statsmodels/statsmodels>`_.
591+
Uses :func:`statsmodels.tsa.stattools.pacf` [1]_
588592
589593
Parameters
590594
----------
591-
ts : TimeSeries
595+
ts
592596
The TimeSeries whose ACF should be plotted.
593-
m : int, optional
597+
m
594598
Optionally, a time lag to highlight on the plot.
595-
max_lag : int, default: 24
599+
max_lag
596600
The maximal lag order to consider.
597-
method : str, default: "ywadjusted"
601+
method
598602
The method to be used for the PACF calculation.
599603
- | "yw" or "ywadjusted" : Yule-Walker with sample-size adjustment in
600604
| denominator for acovf. Default.
@@ -608,12 +612,16 @@ def plot_pacf(
608612
correction.
609613
- "ldb" or "ldbiased" : Levinson-Durbin recursion without bias
610614
correction.
611-
alpha : float, default: 0.05
615+
alpha
612616
The confidence interval to display.
613-
fig_size : tuple of int, default: (10, 5)
617+
fig_size
614618
The size of the figure to be displayed.
615-
axis : plt.axis, optional
619+
axis
616620
Optionally, an axis object to plot the ACF on.
621+
622+
References
623+
----------
624+
.. [1] https://www.statsmodels.org/dev/generated/statsmodels.tsa.stattools.pacf.html
617625
"""
618626

619627
ts._assert_univariate()
@@ -759,7 +767,7 @@ def plot_residuals_analysis(
759767
Univariate TimeSeries instance representing residuals.
760768
num_bins
761769
Optionally, an integer value determining the number of bins in the histogram.
762-
fill_nan:
770+
fill_nan
763771
A boolean value indicating whether NaN values should be filled in the residuals.
764772
"""
765773

darts/utils/timeseries_generation.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -378,26 +378,26 @@ def autoregressive_timeseries(
378378
379379
Parameters
380380
----------
381-
coef : list of float
381+
coef
382382
The autoregressive coefficients used for calculating the next time step.
383383
series[t] = coef[-1] * series[t-1] + coef[-2] * series[t-2] + ... + coef[0] * series[t-len(coef)]
384-
start_values : list of float, default: np.ones(len(coef))
384+
start_values
385385
The starting values used for calculating the first few values for which no lags exist yet.
386386
series[0] = coef[-1] * starting_values[-1] + coef[-2] * starting_values[-2] + ... + coef[0] * starting_values[0]
387-
start : pd.Timestamp or int, default: pd.Timestamp('2000-01-01')
387+
start
388388
The start of the returned TimeSeries' index. If a pandas Timestamp is passed, the TimeSeries will have a pandas
389389
DatetimeIndex. If an integer is passed, the TimeSeries will have a pandas Int64Index index. Works only with
390390
either `length` or `end`.
391-
end : pd.Timestamp or int, optional
391+
end
392392
Optionally, the end of the returned index. Works only with either `start` or `length`. If `start` is
393393
set, `end` must be of same type as `start`. Else, it can be either a pandas Timestamp or an integer.
394-
length : int, optional
394+
length
395395
Optionally, the length of the returned index. Works only with either `start` or `end`.
396-
freq : str, default: 'D'
396+
freq
397397
The time difference between two adjacent entries in the returned TimeSeries. Only effective if `start` is a
398398
pandas Timestamp. A DateOffset alias is expected; see
399399
`docs <https://pandas.pydata.org/pandas-docs/stable/user_guide/TimeSeries.html#dateoffset-objects>`_.
400-
column_name : str, default: 'autoregressive'
400+
column_name
401401
Optionally, the name of the value column for the returned TimeSeries
402402
403403
Returns

0 commit comments

Comments
 (0)