Exponential
timecave.data_generation.time_series_functions.exponential_ts(number_samples, max_interval_size, decay_rate=1, initial_value=1)
Generates a time series based on a exponential function.
This function creates a time series array of given length where the values decay exponentially over time based on the specified decay rate and initial value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
number_samples |
int
|
The total number of samples in the time series array. |
required |
max_interval_size |
float
|
The maximum interval size for generating the time series array. |
required |
decay_rate |
float
|
The rate at which the values decay over time. |
1
|
initial_value |
float
|
The initial value of the time series array. |
1
|
Returns:
| Type | Description |
|---|---|
ndarray
|
An exponential decay time series array where values decay exponentially over time based on the specified decay rate and initial value. |
Examples:
>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> from timecave.data_generation.time_series_functions import exponential_ts
>>> ts = exponential_ts(1000, 10, initial_value=10);
>>> _ = plt.plot(np.arange(0, ts.shape[0]), ts);
>>> plt.show();
