class_docstr: Median Absolute Deviation (MAD).
  
  The median absolute deviation is the median of the absolute differences between each data point
  and the data's overall median. In an online setting, the median of the data is unknown
  beforehand. Therefore, both the median of the data and the median of the differences of the
  data with respect to the latter are updated online. To be precise, the median of the data is
  updated before the median of the differences. As a consequence, this online version of the MAD
  does not coincide exactly with its batch counterpart.
  
  Examples
  --------
  
  >>> from river import stats
  
  >>> X = [4, 2, 5, 3, 0, 4]
  
  >>> mad = stats.MAD()
  >>> for x in X:
  ...     mad.update(x)
  ...     print(mad.get())
  0.0
  2.0
  1.0
  1.0
  1.0
  1.0
  
  Attributes
  ----------
  median : stats.Median
      The median of the data.
  
  References
  ----------
  [^1]: [Median absolute deviation article on Wikipedia](https://www.wikiwand.com/en/Median_absolute_deviation)
class_docstr_tok: ["Median","Absolute","Deviation","(","MAD",")",".","The","median","absolute","deviation","is","the","median","of","the","absolute","differences","between","each","data","point","and","the","data","'s","overall","median",".","In","an","online","setting",",","the","median","of","the","data","is","unknown","beforehand",".","Therefore",",","both","the","median","of","the","data","and","the","median","of","the","differences","of","the","data","with","respect","to","the","latter","are","updated","online",".","To","be","precise",",","the","median","of","the","data","is","updated","before","the","median","of","the","differences",".","As","a","consequence",",","this","online","version","of","the","MAD","does","not","coincide","exactly","with","its","batch","counterpart",".","Examples","--","--","--","--",">",">",">","from","river","import","stats",">",">",">","X","=","[","4",",","2",",","5",",","3",",","0",",","4","]",">",">",">","mad","=","stats.MAD","(",")",">",">",">","for","x","in","X",":","...","mad.update","(","x",")","...","print","(","mad.get","(",")",")","0.0","2.0","1.0","1.0","1.0","1.0","Attributes","--","--","--","--","--","median",":","stats.Median","The","median","of","the","data",".","References","--","--","--","--","--","[","^1","]",":","[","Median","absolute","deviation","article","on","Wikipedia","]","(","https",":","\/\/www.wikiwand.com\/en\/Median_absolute_deviation",")"]
code: def __init__(self):
      super().__init__(q=0.5)
      self.median = quantile.Quantile(q=0.5)
  
imports: from __future__ import annotations
  from .None import quantile
label_desc: Use image node_id 1 to create a new MAD object from inherited base classes: quantile with example: obj = MAD()