gluonts.zebras.schema module#
- class gluonts.zebras.schema.Array(*, required: bool = True, internal: bool = False, default: ~typing.Any = None, preprocess: ~typing.Optional[~typing.Callable] = None, ndim: ~typing.Optional[int] = None, shape: ~typing.Optional[tuple] = None, dtype: ~typing.Type = <class 'numpy.float32'>)[source]#
Bases:
Field
- dtype: Type#
- ndim: Optional[int]#
- shape: Optional[tuple]#
- class gluonts.zebras.schema.Field(*, required: bool = True, internal: bool = False, default: Any = None, preprocess: Optional[Callable] = None)[source]#
Bases:
BaseModel
Specification for user provided input data.
- default: Any#
- internal: bool#
- preprocess: Optional[Callable]#
- required: bool#
- class gluonts.zebras.schema.Metadata(*, required: bool = False, internal: bool = False, default: Any = None, preprocess: Optional[Callable] = None)[source]#
Bases:
Field
- required: bool#
- type#
alias of
Any
- class gluonts.zebras.schema.Scalar(*, required: bool = True, internal: bool = False, default: Any = None, preprocess: Optional[Callable] = None, type: Type)[source]#
Bases:
Field
- type: Type#
- class gluonts.zebras.schema.Schema(fields=None, **kwargs)[source]#
Bases:
object
- load_splitframe(data: Dict[str, Any], future_length: int, start: Optional[Union[Period, str]] = None, freq: Optional[Union[Freq, str]] = None) SplitFrame [source]#
- class gluonts.zebras.schema.TimeSeries(*, required: bool = True, internal: bool = False, default: ~typing.Any = None, preprocess: ~typing.Optional[~typing.Callable] = None, ndim: ~typing.Optional[int] = None, dtype: ~typing.Type = <class 'numpy.float32'>, tdim: int = -1, past_only: bool = True)[source]#
Bases:
Field
Specification for user provided input data.
- Parameters:
ndim – The expected number of dimensions of the input data. If provided, it is ensured that the input array has the expected number of dimensions.
optional – The expected number of dimensions of the input data. If provided, it is ensured that the input array has the expected number of dimensions.
tdim – Mark an array as a time series and specifies which axis is the time dimension. When this value is
None
the array is classified as"static
”.optional – Mark an array as a time series and specifies which axis is the time dimension. When this value is
None
the array is classified as"static
”.dtype (Type) – The data type, passed to
numpy.array
.past_only (bool) – If the value is a time series, this marks if data is only expected for the past range when loading
zebras.SplitFrame
. The value is ignored for static fields.required – When set to true, the field has to be in the user data. Otherwise
default
is used as a fallback value.internal – Allows to ignore user provided data when set, and instead
default
is always used as the value.default – The default value to use when either
required
orinternal
is set to true.preprocess – This function is called on the value before validating the value. For example, one can set
preprocess = np.atleast_2d
to also allow one dimensional arrays as input even whenndim = 2
.optional – This function is called on the value before validating the value. For example, one can set
preprocess = np.atleast_2d
to also allow one dimensional arrays as input even whenndim = 2
.
- dtype: Type#
- ndim: Optional[int]#
- past_only: bool#
- tdim: int#