class_docstr: Computes a scaling factor as the weighted average absolute value along
  dimension ``dim``, and scales the data accordingly.
  
  Parameters
  ----------
  dim
      dimension along which to compute the scale
  keepdim
      controls whether to retain dimension ``dim`` (of length 1) in the
      scale tensor, or suppress it.
  default_scale
      default scale that is used for elements that are constantly zero
  minimum_scale
      minimum possible scale that is used for any item.
class_docstr_tok: ["Computes","a","scaling","factor","as","the","weighted","average","absolute","value","along","dimension","``","dim","``",",","and","scales","the","data","accordingly",".","Parameters","--","--","--","--","--","dim","dimension","along","which","to","compute","the","scale","keepdim","controls","whether","to","retain","dimension","``","dim","``","(","of","length","1",")","in","the","scale","tensor",",","or","suppress","it",".","default_scale","default","scale","that","is","used","for","elements","that","are","constantly","zero","minimum_scale","minimum","possible","scale","that","is","used","for","any","item","."]
code: def __init__(
      self,
      dim: int = -1,
      keepdim: bool = False,
      default_scale: Optional[float] = None,
      minimum_scale: float = 1e-10,
  ) -> None:
      self.dim = dim
      self.keepdim = keepdim
      self.default_scale = default_scale
      self.minimum_scale = minimum_scale
  
file_path: gluonts/src/gluonts/torch/scaler.py
imports: from __future__ import annotations
  from typing import Optional
  import torch
  from gluonts.core.component import validated
label_desc: Use image node_id 1 to create a new MeanScaler object from inherited base classes: Scaler with example: obj = MeanScaler(dim, keepdim, default_scale, minimum_scale)