etna.analysis.acf_plot#
- acf_plot(ts: TSDataset, n_segments: int = 10, lags: int = 21, partial: bool = False, columns_num: int = 2, segments: List[str] | None = None, figsize: Tuple[int, int] = (10, 5))[source]#
- Autocorrelation and partial autocorrelation plot for multiple timeseries. - Notes - Definition of autocorrelation. - Definition of partial autocorrelation. - If - partial=Falsefunction works with NaNs at any place of the time-series.
- if - partial=Truefunction works only with NaNs at the edges of the time-series and fails if there are NaNs inside it.
 - Parameters:
- ts (TSDataset) – TSDataset with timeseries data 
- n_segments (int) – number of random segments to plot 
- lags (int) – number of timeseries shifts for cross-correlation 
- partial (bool) – plot autocorrelation or partial autocorrelation 
- columns_num (int) – number of columns in subplots 
- figsize (Tuple[int, int]) – size of the figure per subplot with one segment in inches 
 
- Raises:
- ValueError: – If - partial=Trueand there is a NaN in the middle of the time series