class_docstr: Median Absolute Deviation: for measuring the distances between
  data points and the median in terms of median distance.
  See :cite:`iglewicz1993detect` for details.
  
  Parameters
  ----------
  threshold : float, optional (default=3.5)
     The modified z-score to use as a threshold. Observations with
     a modified z-score (based on the median absolute deviation) greater
     than this value will be classified as outliers.
  
  Attributes
  ----------
  decision_scores_ : numpy array of shape (n_samples,)
      The outlier scores of the training data.
      The higher, the more abnormal. Outliers tend to have higher
      scores. This value is available once the detector is
      fitted.
  
  threshold_ : float
     The modified z-score to use as a threshold. Observations with
     a modified z-score (based on the median absolute deviation) greater
     than this value will be classified as outliers.
  
  labels_ : int, either 0 or 1
      The binary labels of the training data. 0 stands for inliers
      and 1 for outliers/anomalies. It is generated by applying
      ``threshold_`` on ``decision_scores_``.
class_docstr_tok: ["Median","Absolute","Deviation",":","for","measuring","the","distances","between","data","points","and","the","median","in","terms","of","median","distance",".","See",":","cite",":","`","iglewicz1993detect","`","for","details",".","Parameters","--","--","--","--","--","threshold",":","float",",","optional","(","default=3.5",")","The","modified","z-score","to","use","as","a","threshold",".","Observations","with","a","modified","z-score","(","based","on","the","median","absolute","deviation",")","greater","than","this","value","will","be","classified","as","outliers",".","Attributes","--","--","--","--","--","decision_scores_",":","numpy","array","of","shape","(","n_samples",",",")","The","outlier","scores","of","the","training","data",".","The","higher",",","the","more","abnormal",".","Outliers","tend","to","have","higher","scores",".","This","value","is","available","once","the","detector","is","fitted",".","threshold_",":","float","The","modified","z-score","to","use","as","a","threshold",".","Observations","with","a","modified","z-score","(","based","on","the","median","absolute","deviation",")","greater","than","this","value","will","be","classified","as","outliers",".","labels_",":","int",",","either","0","or","1","The","binary","labels","of","the","training","data",".","0","stands","for","inliers","and","1","for","outliers\/anomalies",".","It","is","generated","by","applying","``","threshold_","``","on","``","decision_scores_","``","."]
docstr: Fit detector. y is ignored in unsupervised methods.
  
  Parameters
  ----------
  X : numpy array of shape (n_samples, n_features)
      The input samples. Note that `n_features` must equal 1.
  
  y : Ignored
      Not used, present for API consistency by convention.
  
  Returns
  -------
  self : object
      Fitted estimator.
docstr_tok: ["Fit","detector",".","y","is","ignored","in","unsupervised","methods",".","Parameters","--","--","--","--","--","X",":","numpy","array","of","shape","(","n_samples",",","n_features",")","The","input","samples",".","Note","that","`","n_features","`","must","equal","1.","y",":","Ignored","Not","used",",","present","for","API","consistency","by","convention",".","Returns","--","--","--","-","self",":","object","Fitted","estimator","."]
code: def fit(self, X, y=None):
      """Fit detector. y is ignored in unsupervised methods.
  
      Parameters
      ----------
      X : numpy array of shape (n_samples, n_features)
          The input samples. Note that `n_features` must equal 1.
  
      y : Ignored
          Not used, present for API consistency by convention.
  
      Returns
      -------
      self : object
          Fitted estimator.
      """
      X = check_array(X, ensure_2d=False, force_all_finite=False)
      _check_dim(X)
      self._set_n_classes(y)
      self.threshold_ = self.threshold
      self.median_ = None  # reset median after each call
      self.median_diff_ = None  # reset median_diff after each call
      self.decision_scores_ = self.decision_function(X)
      self._process_decision_scores()
  
      return self
  
file_path: pyod/pyod/models/mad.py
imports: from __future__ import division
  from __future__ import print_function
  import numpy
  from sklearn.utils import check_array
  from .base import BaseDetector
label_desc: Use image node_id 2 for calling the MAD obj's underlying member method code with example usage: obj.fit(X, y) and returns: self