module utilsforecast.data

Utilies for generating time series datasets

Global Variables

  • pl

function generate_series

generate_series(
    n_series: int,
    freq: str = 'D',
    min_length: int = 50,
    max_length: int = 500,
    n_static_features: int = 0,
    equal_ends: bool = False,
    with_trend: bool = False,
    static_as_categorical: bool = True,
    n_models: int = 0,
    level: Optional[List[float]] = None,
    engine: Literal['pandas', 'polars'] = 'pandas',
    seed: int = 0
) → Union[DataFrame, pl_DataFrame]
Generate Synthetic Panel Series. Args:
  • n_series (int): Number of series for synthetic panel.
  • freq (str, optional): Frequency of the data (pandas alias). Seasonalities are implemented for hourly, daily and monthly. Defaults to ‘D’.
  • min_length (int, optional): Minimum length of synthetic panel’s series. Defaults to 50.
  • max_length (int, optional): Maximum length of synthetic panel’s series. Defaults to 500.
  • n_static_features (int, optional): Number of static exogenous variables for synthetic panel’s series. Defaults to 0.
  • equal_ends (bool, optional): Series should end in the same timestamp. Defaults to False.
  • with_trend (bool, optional): Series should have a (positive) trend. Defaults to False.
  • static_as_categorical (bool, optional): Static features should have a categorical data type. Defaults to True.
  • n_models (int, optional): Number of models predictions to simulate. Defaults to 0.
  • level (list of float, optional): Confidence level for intervals to simulate for each model. Defaults to None.
  • engine (str, optional): Output Dataframe type. Defaults to ‘pandas’.
  • seed (int, optional): Random seed used for generating the data. Defaults to 0.
Returns:
  • pandas or polars DataFrame: Synthetic panel with columns [unique_id, ds, y] and exogenous features.

This file was automatically generated via lazydocs.