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.
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
timecolumn instead of a DatetimeIndex.missing_data_prob (float) – Fraction of values blanked to NaN.
**noise_kwargs (Any) – Extra arguments for the noise process, such as
phifor AR(1) orperiodfor 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]]