module coreforecast.differences


function num_diffs

num_diffs(x: ndarray, max_d: int = 1)int

Find the optimal number of differences

Args:

  • x (np.ndarray): Array with the time series.
  • max_d (int, optional): Maximum number of differences to consider. Defaults to 1.

Returns:

  • int: Optimal number of differences.

function num_seas_diffs

num_seas_diffs(x: ndarray, season_length: int, max_d: int = 1)int

Find the optimal number of seasonal differences

Args:

  • x (np.ndarray): Array with the time series.
  • season_length (int): Length of the seasonal pattern.
  • max_d (int, optional): Maximum number of differences to consider. Defaults to 1.

Returns:

  • int: Optimal number of seasonal differences.

function diff

diff(x: ndarray, d: int) → ndarray

Subtract previous values of the series

Args:

  • x (np.ndarray): Array with the time series.
  • d (int): Lag to subtract

Returns:

  • np.ndarray: Differenced time series.

This file was automatically generated via lazydocs.