source

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)

Generate Synthetic Panel Series.

TypeDefaultDetails
n_seriesintNumber of series for synthetic panel.
freqstrDFrequency of the data (pandas alias).
Seasonalities are implemented for ‘H’, ‘D’ and ‘M’.
min_lengthint50Minimum length of synthetic panel’s series.
max_lengthint500Maximum length of synthetic panel’s series.
n_static_featuresint0Number of static exogenous variables for synthetic panel’s series.
equal_endsboolFalseSeries should end in the same date stamp ds.
with_trendboolFalseSeries should have a (positive) trend.
static_as_categoricalboolTrueStatic features should have a categorical data type.
n_modelsint0Number of models predictions to simulate.
levelOptionalNoneConfidence level for intervals to simulate for each model.
engineLiteralpandasOutput Dataframe type.
seedint0Random seed used for generating the data.
ReturnsUnionSynthetic panel with columns [unique_id, ds, y] and exogenous features.
synthetic_panel = generate_series(n_series=2)
synthetic_panel.groupby('unique_id', observed=True).head(4)
unique_iddsy
002000-01-010.357595
102000-01-021.301382
202000-01-032.272442
302000-01-043.211827
22212000-01-015.399023
22312000-01-026.092818
22412000-01-030.476396
22512000-01-041.343744