gluonts.model.forecast_generator module#
- class gluonts.model.forecast_generator.ForecastGenerator[source]#
Bases:
object
Classes used to bring the output of a network into a class.
- gluonts.model.forecast_generator.make_distribution_forecast(distr, *args, **kwargs) gluonts.model.forecast.Forecast [source]#
- gluonts.model.forecast_generator.recursively_zip_arrays(x) Iterator [source]#
Helper function to recursively zip nested collections of arrays.
This defines the fallback implementation, which one can specialized for specific types using by doing
@recursively_zip_arrays.register
on the type. Implementations for lists, tuples, and NumPy arrays are provided.For an array a (e.g. a numpy array)
_extract_instances(a) -> [a[0], a[1], …]
For (nested) tuples of arrays (a, (b, c))
- _extract_instances((a, (b, c)) -> [(a[0], (b[0], c[0])), (a[1], (b
[1], c[1])), …]