gluonts.dataset.artificial.recipe module

class gluonts.dataset.artificial.recipe.ARp(phi: Union[Any, Callable], sigma: Union[Any, Callable], xhist: Union[Any, Callable] = None, c: Union[Any, Callable] = 0.0, noise: Union[Any, Callable] = None)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Add(inputs: List[Union[Any, Callable]])[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.BinaryHolidays(dates: List[pandas._libs.tslibs.timestamps.Timestamp], holidays: List[Any])[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.BinaryMarkovChain(one_to_zero: Union[Any, Callable], zero_to_one: Union[Any, Callable])[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Choose(options: Union[Any, Callable], selector: Union[Any, Callable])[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Concatenate(inputs: List[Union[Any, Callable]], axis: int = 0)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Constant(constant)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.ConstantVec(constant: Union[Any, Callable])[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Convolve(input: Union[Any, Callable], filter: Union[Any, Callable])[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Debug(print_global=False)[source]

Bases: object

class gluonts.dataset.artificial.recipe.Dilated(source: Callable, dilation: int)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Eval(expr: str)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.EvalRecipe(recipe: Union[Callable, List[Callable], List[Tuple[str, Callable]], Dict[str, Callable]], op: Union[Any, Callable, None] = None)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.ForEachCat(fun, cat_field='cat', cat_idx=0)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Lag(input: Union[Any, Callable], lag: Union[Any, Callable] = 0, pad_const: int = 0)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Length(l: Union[Any, Callable] = None)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Lifted[source]

Bases: object

num_outputs: int = 1
class gluonts.dataset.artificial.recipe.LinearTrend(slope: Union[Any, Callable] = 1.0)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Mul(inputs)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.NanWhere(source: Union[Any, Callable], nan_indicator: Union[Any, Callable])[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.NormalizeMax(input)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.NumpyFunc(func: str, func_args: Tuple[Any, ...], func_kwargs: Dict[str, Any])[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.OneMinus(source: Union[Any, Callable])[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.OnesLike(other)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.RandomBinary(prob: Union[Any, Callable] = 0.1)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.RandomCat(cardinalities: List[int], prob_fun: Callable = gluonts.dataset.artificial.recipe.RandomSymmetricDirichlet(alpha=1.0, shape=(0,)))[source]

Bases: object

class gluonts.dataset.artificial.recipe.RandomChangepoints(max_num_changepoints: Union[Any, Callable])[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.RandomGaussian(stddev: Union[Any, Callable] = 1.0, shape: Sequence[int] = (0, ))[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.RandomInteger(low: Union[Any, Callable], high: Union[Any, Callable], shape: Optional[Sequence[int]] = (0,))[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.RandomSymmetricDirichlet(alpha: Union[Any, Callable] = 1.0, shape: Sequence[int] = (0, ))[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.RandomUniform(low: Union[Any, Callable] = 0.0, high: Union[Any, Callable] = 1.0, shape=(0, ))[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Ref(field_name: str)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Repeated(pattern: Union[Any, Callable])[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.SmoothSeasonality(period: Union[Any, Callable], phase: Union[Any, Callable])[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.Stack(inputs: List[Union[Any, Callable]])[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

class gluonts.dataset.artificial.recipe.StackPrefix(prefix: str)[source]

Bases: gluonts.dataset.artificial.recipe.Lifted

gluonts.dataset.artificial.recipe.evaluate(recipe: Union[Callable, List[Callable], List[Tuple[str, Callable]], Dict[str, Callable]], length: Union[Any, Callable], *args, global_state: dict = None, **kwargs) → Any[source]
gluonts.dataset.artificial.recipe.expand_shape(s, length)[source]
gluonts.dataset.artificial.recipe.generate(length: int, recipe: Union[Callable, List[Callable], List[Tuple[str, Callable]], Dict[str, Callable]], start: pandas._libs.tslibs.timestamps.Timestamp, global_state: Optional[dict] = None, seed: int = 0, item_id_prefix: str = '') → Iterator[Dict[str, Any]][source]
gluonts.dataset.artificial.recipe.lift(input: Union[int, Callable])[source]

Use this decorator to lift a function.

@lift def f(x, y, length=None)

or if your function returns more results

@lift(2) def f(x, y, length=None)

You can then use your function as part of a recipe. The function is called with all all arguments being already resolved.

Note that you cannot serialize recipes that use the lift decorated functions.

gluonts.dataset.artificial.recipe.make_func(length: int, recipe: Union[Callable, List[Callable], List[Tuple[str, Callable]], Dict[str, Callable]], global_state=None) → Callable[[int, Dict[str, Any]], Dict[str, Any]][source]
gluonts.dataset.artificial.recipe.normalized_ar1(tau, x0=None, norm='minmax', sigma=1.0)[source]

Returns an ar1 process with an auto correlation time of tau.

norm can be None -> no normalization ‘minmax’ -> min_max_scaled ‘standard’ -> 0 mean, unit variance

gluonts.dataset.artificial.recipe.resolve(val_or_callable: Union[Any, Callable], context: Dict[str, Any], *args, **kwargs)[source]
gluonts.dataset.artificial.recipe.take_as_list(iterator, num)[source]