Data ==== .. admonition:: **Try the API v2 pre-release!** | You are viewing Documentation of v1 Data Pipeline. A New API version 2 is in development. | Try it out before release: :doc:`v2 Data Pipeline ` | :doc:`v2 API Reference ` | **Caution: v2 is WIP and unstable. Not yet production-ready.** .. currentmodule:: pytorch_forecasting.data Loading data for timeseries forecasting is not trivial - in particular if covariates are included and values are missing. PyTorch Forecasting provides the :py:class:`~timeseries.TimeSeriesDataSet` which comes with a :py:meth:`~timeseries.TimeSeriesDataSet.to_dataloader` method to convert it to a dataloader and a :py:meth:`~timeseries.TimeSeriesDataSet.from_dataset` method to create, e.g. a validation or test dataset from a training dataset using the same label encoders and data normalization. Further, timeseries have to be (almost always) normalized for a neural network to learn efficiently. PyTorch Forecasting provides multiple such target normalizers (some of which can also be used for normalizing covariates). Time series data set --------------------- The time series dataset is the central data-holding object in PyTorch Forecasting. It primarily takes a pandas DataFrame along with some metadata. See the :ref:`tutorial on passing data to models ` to learn more it is coupled to models. .. autoclass:: pytorch_forecasting.data.timeseries.TimeSeriesDataSet :noindex: :members: __init__ Details -------- See the API documentation for further details on available data encoders and the :py:class:`~timeseries.TimeSeriesDataSet`: .. currentmodule:: pytorch_forecasting .. autosummary:: :toctree: api data.encoders.EncoderNormalizer data.encoders.GroupNormalizer data.encoders.MultiNormalizer data.encoders.NaNLabelEncoder data.encoders.TorchNormalizer data.samplers.TimeSynchronizedBatchSampler data.samplers.GroupedSampler data.timeseries.TimeSeriesDataSet