class_docstr: PyTorch Dataset for fitting timeseries models.
  
  The dataset automates common tasks such as
  
  * scaling and encoding of variables
  * normalizing the target variable
  * efficiently converting timeseries in pandas dataframes to torch tensors
  * holding information about static and time-varying variables known and unknown in the future
  * holiding information about related categories (such as holidays)
  * downsampling for data augmentation
  * generating inference, validation and test datasets
  * etc.
class_docstr_tok: ["PyTorch","Dataset","for","fitting","timeseries","models",".","The","dataset","automates","common","tasks","such","as","*","scaling","and","encoding","of","variables","*","normalizing","the","target","variable","*","efficiently","converting","timeseries","in","pandas","dataframes","to","torch","tensors","*","holding","information","about","static","and","time-varying","variables","known","and","unknown","in","the","future","*","holiding","information","about","related","categories","(","such","as","holidays",")","*","downsampling","for","data","augmentation","*","generating","inference",",","validation","and","test","datasets","*","etc","."]
docstr: Get interpretable version of index.
  
  DataFrame contains
  - group_id columns in original encoding
  - time_idx_first column: first time index of subsequence
  - time_idx_last columns: last time index of subsequence
  - time_idx_first_prediction columns: first time index which is in decoder
  
  Returns:
      pd.DataFrame: index that can be understood in terms of original data
code: def decoded_index(self) -> pd.DataFrame:
      """
      Get interpretable version of index.
  
      DataFrame contains
      - group_id columns in original encoding
      - time_idx_first column: first time index of subsequence
      - time_idx_last columns: last time index of subsequence
      - time_idx_first_prediction columns: first time index which is in decoder
  
      Returns:
          pd.DataFrame: index that can be understood in terms of original data
      """
      # get dataframe to filter
      index_start = self.index["index_start"].to_numpy()
      index_last = self.index["index_end"].to_numpy()
      index = (
          # get group ids in order of index
          pd.DataFrame(
              self.data["groups"][index_start].numpy(),
              columns=self.group_ids,
          )
          # to original values
          .apply(
              lambda x: self.transform_values(
                  name=x.name, values=x, group_id=True, inverse=True
              )
          )
          # add time index
          .assign(
              time_idx_first=self.data["time"][index_start].numpy(),
              time_idx_last=self.data["time"][index_last].numpy(),
              # prediction index is last time index - decoder length + 1
              time_idx_first_prediction=lambda x: x.time_idx_last
              - self.calculate_decoder_length(
                  time_last=x.time_idx_last,
                  sequence_length=x.time_idx_last
                  - x.time_idx_first
                  + 1,
              )
              + 1,
          )
      )
      return index
  
imports: from copy import copy, deepcopy
  from functools import lru_cache
  import inspect
  from typing import Any, Callable, Dict, List, Tuple, Union
  import warnings
  import matplotlib.pyplot
  import numpy
  import pandas
  from sklearn.exceptions import NotFittedError
  from sklearn.preprocessing import RobustScaler, StandardScaler
  from sklearn.utils.validation import check_is_fitted
  import torch
  from torch.distributions import Beta
  from torch.nn.utils import rnn
  from torch.utils.data import DataLoader, Dataset
  from torch.utils.data.sampler import Sampler, SequentialSampler
  from pytorch_forecasting.data.encoders import EncoderNormalizer, GroupNormalizer, MultiNormalizer, NaNLabelEncoder, TorchNormalizer
  from pytorch_forecasting.data.samplers import TimeSynchronizedBatchSampler
  from pytorch_forecasting.utils import repr_class
label_desc: Use image node_id 30 for calling the TimeSeriesDataSet obj's underlying member method code with example usage: obj.decoded_index() and returns: index