gluonts.nursery.spliced_binned_pareto.data_functions module#
- gluonts.nursery.spliced_binned_pareto.data_functions.add_spikes(ts: torch.Tensor, only_upper_spikes: bool = False)[source]#
Adds spikes to 15% of the time series in the form of heavy-tailed (Generalized Pareto) realizations.
- Parameters
ts – time series
only_upper_spikes – boolean to indicate upper-tailed or two-tailed spikes
- gluonts.nursery.spliced_binned_pareto.data_functions.add_spikes_asymmetric(ts: torch.Tensor, xi: List[float] = [0.02, 0.04])[source]#
Adds spikes to 15% of the time series in the form of heavy-tailed (Generalized Pareto) realizations.
- Parameters
ts – time series
xi – [float, float], GenPareto heaviness parameter for [lower, upper] noise respectively
- gluonts.nursery.spliced_binned_pareto.data_functions.create_ds(num_points: int, t_dof: int = 10, noise_mult: float = 0.25, points_per_sinusoid: int = 100, magnitude_sin: float = 1)[source]#
Creates noisy sinusoid. (Noise distributed as student t with degrees of freedom = t_dof.) Returns tensor of shape (1, 1, num_points).
- Parameters
num_points – int, number of points in the dataset.
t_dof – int, degrees of freedom for student t distribution.
noise_mult – float, standard deviation.
points_per_sinusoid – int, datapoints per sine period
magnitude_sin – float, magnitude of sine amplitude
- gluonts.nursery.spliced_binned_pareto.data_functions.create_ds_asymmetric(num_points: int, t_dof: List[float] = [10, 10], noise_mult: List[float] = [0.25, 0.25], xi: List[float] = [0.02, 0.04], points_per_sinusoid: int = 100, magnitude_sin: float = 1)[source]#
Creates noisy sinusoid. (Noise distributed as student t with degrees of freedom = t_dof.) Returns tensor of shape (1, 1, num_points).
- Parameters
num_points – int, number of points in the dataset.
t_dof – [int, int], degrees of freedom for Students’-t distribution for [lower, upper] noise respectively.
noise_mult – [float, float], standard deviation for [lower, upper] noise respectively.
points_per_sinusoid – int, datapoints per sine period
magnitude_sin – float, magnitude of sine amplitude