class_docstr: Scale features using statistics that are robust to outliers.
  
  This Scaler removes the median and scales the data according to the
  interquantile range.
  
  Parameters
  ----------
  with_centering
      Whether to centre the data before scaling.
  with_scaling
      Whether to scale data to IQR.
  q_inf
      Desired inferior quantile, must be between 0 and 1.
  q_sup
      Desired superior quantile, must be between 0 and 1.
  
  Attributes
  ----------
  median : dict
      Mapping between features and instances of `stats.Quantile(0.5)`.
  iqr : dict
      Mapping between features and instances of `stats.IQR`.
  
  Examples
  --------
  
  >>> from pprint import pprint
  >>> import random
  >>> from river import preprocessing
  
  >>> random.seed(42)
  >>> X = [{'x': random.uniform(8, 12)} for _ in range(5)]
  >>> pprint(X)
  [{'x': 10.557707},
      {'x': 8.100043},
      {'x': 9.100117},
      {'x': 8.892842},
      {'x': 10.945884}]
  
  >>> scaler = preprocessing.RobustScaler()
  
  >>> for x in X:
  ...     scaler.learn_one(x)
  ...     print(scaler.transform_one(x))
      {'x': 0.0}
      {'x': -1.0}
      {'x': 0.0}
      {'x': -0.12449923287875722}
      {'x': 1.1086595155704708}
class_docstr_tok: ["Scale","features","using","statistics","that","are","robust","to","outliers",".","This","Scaler","removes","the","median","and","scales","the","data","according","to","the","interquantile","range",".","Parameters","--","--","--","--","--","with_centering","Whether","to","centre","the","data","before","scaling",".","with_scaling","Whether","to","scale","data","to","IQR",".","q_inf","Desired","inferior","quantile",",","must","be","between","0","and","1.","q_sup","Desired","superior","quantile",",","must","be","between","0","and","1",".","Attributes","--","--","--","--","--","median",":","dict","Mapping","between","features","and","instances","of","`","stats.Quantile","(","0.5",")","`",".","iqr",":","dict","Mapping","between","features","and","instances","of","`","stats.IQR","`",".","Examples","--","--","--","--",">",">",">","from","pprint","import","pprint",">",">",">","import","random",">",">",">","from","river","import","preprocessing",">",">",">","random.seed","(","42",")",">",">",">","X","=","[","{","'","x","'",":","random.uniform","(","8",",","12",")","}","for","_","in","range","(","5",")","]",">",">",">","pprint","(","X",")","[","{","'","x","'",":","10.557707","}",",","{","'","x","'",":","8.100043","}",",","{","'","x","'",":","9.100117","}",",","{","'","x","'",":","8.892842","}",",","{","'","x","'",":","10.945884","}","]",">",">",">","scaler","=","preprocessing.RobustScaler","(",")",">",">",">","for","x","in","X",":","...","scaler.learn_one","(","x",")","...","print","(","scaler.transform_one","(","x",")",")","{","'","x","'",":","0.0","}","{","'","x","'",":","-1.0","}","{","'","x","'",":","0.0","}","{","'","x","'",":","-0.12449923287875722","}","{","'","x","'",":","1.1086595155704708","}"]
code: def __init__(
      self,
      with_centering=True,
      with_scaling=True,
      q_inf=0.25,
      q_sup=0.75,
  ):
      self.with_centering = with_centering
      self.with_scaling = with_scaling
      self.q_inf = q_inf
      self.q_sup = q_sup
      self.median = collections.defaultdict(
          functools.partial(stats.Quantile, 0.5)
      )
      self.iqr = collections.defaultdict(
          functools.partial(stats.IQR, self.q_inf, self.q_sup)
      )
  
imports: from __future__ import annotations
  import collections
  import functools
  import itertools
  import numbers
  import numpy
  import pandas
  from river import base, stats, utils
label_desc: Use image node_id 1 to create a new RobustScaler object from inherited base classes: base with example: obj = RobustScaler(with_centering, with_scaling, q_inf, q_sup)