class_docstr: ECOD class for Unsupervised Outlier Detection Using Empirical
  Cumulative Distribution Functions (ECOD)
  ECOD is a parameter-free, highly interpretable outlier detection algorithm
  based on empirical CDF functions.
  See :cite:`Li2021ecod` for details.
  
  Parameters
  ----------
  contamination : float in (0., 0.5), optional (default=0.1)
      The amount of contamination of the data set, i.e.
      the proportion of outliers in the data set. Used when fitting to
      define the threshold on the decision function.
  
  n_jobs : optional (default=1)
      The number of jobs to run in parallel for both `fit` and
      `predict`. If -1, then the number of jobs is set to the
      number of cores.
  
  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 threshold is based on ``contamination``. It is the
      ``n_samples * contamination`` most abnormal samples in
      ``decision_scores_``. The threshold is calculated for generating
      binary outlier labels.
  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: ["ECOD","class","for","Unsupervised","Outlier","Detection","Using","Empirical","Cumulative","Distribution","Functions","(","ECOD",")","ECOD","is","a","parameter-free",",","highly","interpretable","outlier","detection","algorithm","based","on","empirical","CDF","functions",".","See",":","cite",":","`","Li2021ecod","`","for","details",".","Parameters","--","--","--","--","--","contamination",":","float","in","(","0.",",","0.5",")",",","optional","(","default=0.1",")","The","amount","of","contamination","of","the","data","set",",","i.e",".","the","proportion","of","outliers","in","the","data","set",".","Used","when","fitting","to","define","the","threshold","on","the","decision","function",".","n_jobs",":","optional","(","default=1",")","The","number","of","jobs","to","run","in","parallel","for","both","`","fit","`","and","`","predict","`",".","If","-1",",","then","the","number","of","jobs","is","set","to","the","number","of","cores",".","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","threshold","is","based","on","``","contamination","``",".","It","is","the","``","n_samples","*","contamination","``","most","abnormal","samples","in","``","decision_scores_","``",".","The","threshold","is","calculated","for","generating","binary","outlier","labels",".","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: Plot dimensional outlier graph for a given data point within
  the dataset.
  
  Parameters
  ----------
  ind : int
      The index of the data point one wishes to obtain
      a dimensional outlier graph for.
  
  columns : list
      Specify a list of features/dimensions for plotting. If not
      specified, use all features.
  
  cutoffs : list of floats in (0., 1), optional (default=[0.95, 0.99])
      The significance cutoff bands of the dimensional outlier graph.
  
  feature_names : list of strings
      The display names of all columns of the dataset,
      to show on the x-axis of the plot.
  
  file_name : string
      The name to save the figure
  
  file_type : string
      The file type to save the figure
  
  Returns
  -------
  Plot : matplotlib plot
      The dimensional outlier graph for data point with index ind.
docstr_tok: ["Plot","dimensional","outlier","graph","for","a","given","data","point","within","the","dataset",".","Parameters","--","--","--","--","--","ind",":","int","The","index","of","the","data","point","one","wishes","to","obtain","a","dimensional","outlier","graph","for",".","columns",":","list","Specify","a","list","of","features\/dimensions","for","plotting",".","If","not","specified",",","use","all","features",".","cutoffs",":","list","of","floats","in","(","0.",",","1",")",",","optional","(","default=","[","0.95",",","0.99","]",")","The","significance","cutoff","bands","of","the","dimensional","outlier","graph",".","feature_names",":","list","of","strings","The","display","names","of","all","columns","of","the","dataset",",","to","show","on","the","x-axis","of","the","plot",".","file_name",":","string","The","name","to","save","the","figure","file_type",":","string","The","file","type","to","save","the","figure","Returns","--","--","--","-","Plot",":","matplotlib","plot","The","dimensional","outlier","graph","for","data","point","with","index","ind","."]
code: def explain_outlier(
      self,
      ind,
      columns=None,
      cutoffs=None,
      feature_names=None,
      file_name=None,
      file_type=None,
  ):  # pragma: no cover
      """Plot dimensional outlier graph for a given data point within
      the dataset.
  
      Parameters
      ----------
      ind : int
          The index of the data point one wishes to obtain
          a dimensional outlier graph for.
  
      columns : list
          Specify a list of features/dimensions for plotting. If not
          specified, use all features.
  
      cutoffs : list of floats in (0., 1), optional (default=[0.95, 0.99])
          The significance cutoff bands of the dimensional outlier graph.
  
      feature_names : list of strings
          The display names of all columns of the dataset,
          to show on the x-axis of the plot.
  
      file_name : string
          The name to save the figure
  
      file_type : string
          The file type to save the figure
  
      Returns
      -------
      Plot : matplotlib plot
          The dimensional outlier graph for data point with index ind.
      """
      if columns is None:
          columns = list(range(self.O.shape[1]))
          column_range = range(1, self.O.shape[1] + 1)
      else:
          column_range = range(1, len(columns) + 1)
  
      cutoffs = (
          [1 - self.contamination, 0.99] if cutoffs is None else cutoffs
      )
  
      # plot outlier scores
      plt.scatter(
          column_range,
          self.O[ind, columns],
          marker="^",
          c="black",
          label="Outlier Score",
      )
  
      for i in cutoffs:
          plt.plot(
              column_range,
              np.quantile(self.O[:, columns], q=i, axis=0),
              "--",
              label="{percentile} Cutoff Band".format(percentile=i),
          )
      plt.xlim([1, max(column_range)])
      plt.ylim([0, int(self.O[:, columns].max().max()) + 1])
      plt.ylabel("Dimensional Outlier Score")
      plt.xlabel("Dimension")
  
      ticks = list(column_range)
      if feature_names is not None:
          assert len(feature_names) == len(
              ticks
          ), "Length of feature_names does not match dataset dimensions."
          plt.xticks(ticks, labels=feature_names)
      else:
          plt.xticks(ticks)
  
      plt.yticks(range(0, int(self.O[:, columns].max().max()) + 1))
      plt.xlim(0.95, ticks[-1] + 0.05)
      label = "Outlier" if self.labels_[ind] == 1 else "Inlier"
      plt.title(
          "Outlier score breakdown for sample #{index} ({label})".format(
              index=ind + 1, label=label
          )
      )
      plt.legend()
      plt.tight_layout()
  
      # save the file if specified
      if file_name is not None:
          if file_type is not None:
              plt.savefig(file_name + "." + file_type, dpi=300)
          # if not specified, save as png
          else:
              plt.savefig(file_name + "." + "png", dpi=300)
      plt.show()
  
file_path: pyod/pyod/models/ecod.py
imports: from __future__ import division
  from __future__ import print_function
  import warnings
  import matplotlib.pyplot
  import numpy
  from joblib import Parallel, delayed
  from scipy.stats import skew
  from sklearn.utils import check_array
  from .base import BaseDetector
  from .sklearn_base import _partition_estimators
  from ..utils.stat_models import column_ecdf
label_desc: Use image node_id 5 for calling the ECOD obj's underlying member method code with example usage: obj.explain_outlier(ind, columns, cutoffs, feature_names, file_name, file_type) without return types