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: Generate dataset with different underlying data but same variable encoders and scalers, etc.
  
  Args:
      parameters (Dict[str, Any]): dataset parameters which to use for the new dataset
      data (pd.DataFrame): data from which new dataset will be generated
      stop_randomization (bool, optional): If to stop randomizing encoder and decoder lengths,
          e.g. useful for validation set. Defaults to False.
      predict (bool, optional): If to predict the decoder length on the last entries in the
          time index (i.e. one prediction per group only). Defaults to False.
      **kwargs: keyword arguments overriding parameters
  
  Returns:
      TimeSeriesDataSet: new dataset
code: def from_parameters(
      cls,
      parameters: Dict[str, Any],
      data: pd.DataFrame,
      stop_randomization: bool = None,
      predict: bool = False,
      **update_kwargs,
  ):
      """
      Generate dataset with different underlying data but same variable encoders and scalers, etc.
  
      Args:
          parameters (Dict[str, Any]): dataset parameters which to use for the new dataset
          data (pd.DataFrame): data from which new dataset will be generated
          stop_randomization (bool, optional): If to stop randomizing encoder and decoder lengths,
              e.g. useful for validation set. Defaults to False.
          predict (bool, optional): If to predict the decoder length on the last entries in the
              time index (i.e. one prediction per group only). Defaults to False.
          **kwargs: keyword arguments overriding parameters
  
      Returns:
          TimeSeriesDataSet: new dataset
      """
      parameters = deepcopy(parameters)
      if predict:
          if stop_randomization is None:
              stop_randomization = True
          elif not stop_randomization:
              warnings.warn(
                  "If predicting, no randomization should be possible - setting stop_randomization=True",
                  UserWarning,
              )
              stop_randomization = True
          parameters["min_prediction_length"] = parameters[
              "max_prediction_length"
          ]
          parameters["predict_mode"] = True
      elif stop_randomization is None:
          stop_randomization = False
  
      if stop_randomization:
          parameters["randomize_length"] = None
      parameters.update(update_kwargs)
  
      new = cls(data, **parameters)
      return new
  
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 27 for calling the TimeSeriesDataSet obj's underlying member method code with example usage: obj.from_parameters(cls, parameters, data, stop_randomization, predict) and returns: new