incline.generate_time_series

incline.generate_time_series(trend_function, n_points=100, x_range=(0.0, 10.0), noise_type='white', noise_std=0.1, irregular_spacing=False, missing_data_prob=0.0, random_state=None, **noise_kwargs)[source]

Simulate a series from a known trend.

Parameters:
  • trend_function (TrendFunction) – The true trend.

  • n_points (int) – Number of observations.

  • x_range (tuple[float, float]) – Span of x values.

  • noise_type (str) – 'white', 'ar1' or 'seasonal'.

  • noise_std (float) – Marginal standard deviation of the noise, whichever type.

  • irregular_spacing (bool) – Draw x uniformly rather than on a grid. The result then carries a numeric time column instead of a DatetimeIndex.

  • missing_data_prob (float) – Fraction of values blanked to NaN.

  • random_state (int | Generator | None) – Seed or Generator.

  • **noise_kwargs (Any) – Extra arguments for the noise process, such as phi for AR(1) or period for seasonal.

Returns:

Tuple of (frame with value/true_value/noise, true first derivative at each point).

Raises:

ValueError – If the noise type is unknown.

Return type:

tuple[DataFrame, NDArray[float64]]