class_docstr: A class representing a global relative binning approach. This binning first
  rescales all input series by their respective mean (relative) and then
  performs one binning across all series (global).
  
  Parameters
  ----------
  num_bins
      The number of discrete bins/buckets that we want values to be mapped
      to.
      (default: 1024)
  is_quantile
      Whether the binning is quantile or linear. Quantile binning allocated
      bins based on the cumulative distribution function, while linear
      binning allocates evenly spaced bins.
      (default: True, i.e. quantile binning)
  
  linear_scaling_limit
      The linear scaling limit. Values which are larger than
      linear_scaling_limit times the mean will be capped at
      linear_scaling_limit.
      (default: 10)
  quantile_scaling_limit
      The quantile scaling limit. Values which are larger than the quantile
      evaluated at quantile_scaling_limit will be capped at the quantile
      evaluated at quantile_scaling_limit.
      (default: 0.99)
code: def initialize_from_dataset(
      self,
      input_dataset: Dataset,
      ctx: mx.Context = get_mxnet_context(),
  ):
      # Rescale all time series in training set.
      train_target_sequence: np.ndarray = np.array([])
      for train_entry in input_dataset:
          train_entry_target = train_entry["target"]
          train_tar_mean = np.mean(train_entry_target)
          train_entry_target /= train_tar_mean
          train_target_sequence = np.concatenate(
              [train_target_sequence, train_entry_target]
          )
      self.initialize_from_array(train_target_sequence, ctx)
  
file_path: gluonts/src/gluonts/mx/representation/global_relative_binning.py
imports: from typing import List, Optional, Tuple
  import mxnet
  import numpy
  from gluonts.core.component import validated
  from gluonts.dataset.common import Dataset
  from gluonts.mx import Tensor
  from gluonts.mx.context import get_mxnet_context
  from .binning_helpers import bin_edges_from_bin_centers, ensure_binning_monotonicity
  from .representation import Representation
label_desc: Use image node_id 2 for calling the GlobalRelativeBinning obj's underlying member method code with example usage: obj.initialize_from_dataset(input_dataset, ctx) without return types