class_docstr: Abstract class for all outlier detection algorithms.
  
  .. warning::
  pyod would stop supporting Python 2 in the future. Consider move to
  Python 3.5+.
  
  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.
  
  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: ["Abstract","class","for","all","outlier","detection","algorithms",".","..","warning",":",":","pyod","would","stop","supporting","Python","2","in","the","future",".","Consider","move","to","Python","3.5+",".","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",".","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: Predict if a particular sample is an outlier or not.
  
  Parameters
  ----------
  X : numpy array of shape (n_samples, n_features)
      The input samples.
  
  return_confidence : boolean, optional(default=False)
      If True, also return the confidence of prediction.
  
  Returns
  -------
  outlier_labels : numpy array of shape (n_samples,)
      For each observation, tells whether
      it should be considered as an outlier according to the
      fitted model. 0 stands for inliers and 1 for outliers.
  confidence : numpy array of shape (n_samples,).
      Only if return_confidence is set to True.
docstr_tok: ["Predict","if","a","particular","sample","is","an","outlier","or","not",".","Parameters","--","--","--","--","--","X",":","numpy","array","of","shape","(","n_samples",",","n_features",")","The","input","samples",".","return_confidence",":","boolean",",","optional","(","default=False",")","If","True",",","also","return","the","confidence","of","prediction",".","Returns","--","--","--","-","outlier_labels",":","numpy","array","of","shape","(","n_samples",",",")","For","each","observation",",","tells","whether","it","should","be","considered","as","an","outlier","according","to","the","fitted","model",".","0","stands","for","inliers","and","1","for","outliers",".","confidence",":","numpy","array","of","shape","(","n_samples",",",")",".","Only","if","return_confidence","is","set","to","True","."]
code: def predict(self, X, return_confidence=False):
      """Predict if a particular sample is an outlier or not.
  
      Parameters
      ----------
      X : numpy array of shape (n_samples, n_features)
          The input samples.
  
      return_confidence : boolean, optional(default=False)
          If True, also return the confidence of prediction.
  
      Returns
      -------
      outlier_labels : numpy array of shape (n_samples,)
          For each observation, tells whether
          it should be considered as an outlier according to the
          fitted model. 0 stands for inliers and 1 for outliers.
      confidence : numpy array of shape (n_samples,).
          Only if return_confidence is set to True.
      """
  
      check_is_fitted(
          self, ["decision_scores_", "threshold_", "labels_"]
      )
      pred_score = self.decision_function(X)
  
      if isinstance(self.contamination, (float, int)):
          prediction = (
              (pred_score > self.threshold_).astype("int").ravel()
          )
  
      # if this is a PyThresh object
      else:
          prediction = self.contamination.eval(pred_score)
  
      if return_confidence:
          confidence = self.predict_confidence(X)
          return prediction, confidence
  
      return prediction
  
imports: from __future__ import division
  from __future__ import print_function
  import abc
  import warnings
  from collections import defaultdict
  from inspect import signature
  import numpy
  import six
  from numpy import percentile
  from scipy.special import erf
  from scipy.stats import binom
  from sklearn.metrics import roc_auc_score
  from sklearn.preprocessing import MinMaxScaler
  from sklearn.utils import deprecated
  from sklearn.utils.multiclass import check_classification_targets
  from sklearn.utils.validation import check_is_fitted
  from .sklearn_base import _pprint
  from ..utils.utility import precision_n_scores
label_desc: Use image node_id 5 for calling the BaseDetector obj's underlying member method code with example usage: obj.predict(X, return_confidence) and returns: prediction, prediction,  confidence