class_docstr: XGBOD class for outlier detection.
  It first uses the passed in unsupervised outlier detectors to extract
  richer representation of the data and then concatenates the newly
  generated features to the original feature for constructing the augmented
  feature space. An XGBoost classifier is then applied on this augmented
  feature space. Read more in the :cite:`zhao2018xgbod`.
  
  Parameters
  ----------
  estimator_list : list, optional (default=None)
      The list of pyod detectors passed in for unsupervised learning
  
  standardization_flag_list : list, optional (default=None)
      The list of boolean flags for indicating whether to perform
      standardization for each detector.
  
  max_depth : int
      Maximum tree depth for base learners.
  
  learning_rate : float
      Boosting learning rate (xgb's "eta")
  
  n_estimators : int
      Number of boosted trees to fit.
  
  silent : bool
      Whether to print messages while running boosting.
  
  objective : string or callable
      Specify the learning task and the corresponding learning objective or
      a custom objective function to be used (see note below).
  
  booster : string
      Specify which booster to use: gbtree, gblinear or dart.
  
  n_jobs : int
      Number of parallel threads used to run xgboost.  (replaces ``nthread``)
  
  gamma : float
      Minimum loss reduction required to make a further partition on a leaf
      node of the tree.
  
  min_child_weight : int
      Minimum sum of instance weight(hessian) needed in a child.
  
  max_delta_step : int
      Maximum delta step we allow each tree's weight estimation to be.
  
  subsample : float
      Subsample ratio of the training instance.
  
  colsample_bytree : float
      Subsample ratio of columns when constructing each tree.
  
  colsample_bylevel : float
      Subsample ratio of columns for each split, in each level.
  
  reg_alpha : float (xgb's alpha)
      L1 regularization term on weights.
  
  reg_lambda : float (xgb's lambda)
      L2 regularization term on weights.
  
  scale_pos_weight : float
      Balancing of positive and negative weights.
  
  base_score:
      The initial prediction score of all instances, global bias.
  
  random_state : int
      Random number seed.  (replaces seed)
  
  # missing : float, optional
  #     Value in the data which needs to be present as a missing value. If
  #     None, defaults to np.nan.
  
  importance_type: string, default "gain"
      The feature importance type for the ``feature_importances_``
      property: either "gain",
      "weight", "cover", "total_gain" or "total_cover".
  
  \*\*kwargs : dict, optional
      Keyword arguments for XGBoost Booster object.  Full documentation of
      parameters can be found here:
      https://github.com/dmlc/xgboost/blob/master/doc/parameter.rst.
      Attempting to set a parameter via the constructor args and \*\*kwargs
      dict simultaneously will result in a TypeError.
  
      Note: \*\*kwargs is unsupported by scikit-learn. We do not
      guarantee that parameters passed via this argument will interact
      properly with scikit-learn.
  
  Attributes
  ----------
  n_detector_ : int
      The number of unsupervised of detectors used.
  
  clf_ : object
      The XGBoost classifier.
  
  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.
  
  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: ["XGBOD","class","for","outlier","detection",".","It","first","uses","the","passed","in","unsupervised","outlier","detectors","to","extract","richer","representation","of","the","data","and","then","concatenates","the","newly","generated","features","to","the","original","feature","for","constructing","the","augmented","feature","space",".","An","XGBoost","classifier","is","then","applied","on","this","augmented","feature","space",".","Read","more","in","the",":","cite",":","`","zhao2018xgbod","`",".","Parameters","--","--","--","--","--","estimator_list",":","list",",","optional","(","default=None",")","The","list","of","pyod","detectors","passed","in","for","unsupervised","learning","standardization_flag_list",":","list",",","optional","(","default=None",")","The","list","of","boolean","flags","for","indicating","whether","to","perform","standardization","for","each","detector",".","max_depth",":","int","Maximum","tree","depth","for","base","learners",".","learning_rate",":","float","Boosting","learning","rate","(","xgb","'s","``","eta","''",")","n_estimators",":","int","Number","of","boosted","trees","to","fit",".","silent",":","bool","Whether","to","print","messages","while","running","boosting",".","objective",":","string","or","callable","Specify","the","learning","task","and","the","corresponding","learning","objective","or","a","custom","objective","function","to","be","used","(","see","note","below",")",".","booster",":","string","Specify","which","booster","to","use",":","gbtree",",","gblinear","or","dart",".","n_jobs",":","int","Number","of","parallel","threads","used","to","run","xgboost",".","(","replaces","``","nthread","``",")","gamma",":","float","Minimum","loss","reduction","required","to","make","a","further","partition","on","a","leaf","node","of","the","tree",".","min_child_weight",":","int","Minimum","sum","of","instance","weight","(","hessian",")","needed","in","a","child",".","max_delta_step",":","int","Maximum","delta","step","we","allow","each","tree","'s","weight","estimation","to","be",".","subsample",":","float","Subsample","ratio","of","the","training","instance",".","colsample_bytree",":","float","Subsample","ratio","of","columns","when","constructing","each","tree",".","colsample_bylevel",":","float","Subsample","ratio","of","columns","for","each","split",",","in","each","level",".","reg_alpha",":","float","(","xgb","'s","alpha",")","L1","regularization","term","on","weights",".","reg_lambda",":","float","(","xgb","'s","lambda",")","L2","regularization","term","on","weights",".","scale_pos_weight",":","float","Balancing","of","positive","and","negative","weights",".","base_score",":","The","initial","prediction","score","of","all","instances",",","global","bias",".","random_state",":","int","Random","number","seed",".","(","replaces","seed",")","#","missing",":","float",",","optional","#","Value","in","the","data","which","needs","to","be","present","as","a","missing","value",".","If","#","None",",","defaults","to","np.nan",".","importance_type",":","string",",","default","``","gain","''","The","feature","importance","type","for","the","``","feature_importances_","``","property",":","either","``","gain","''",",","``","weight","''",",","``","cover","''",",","``","total_gain","''","or","``","total_cover","''",".","\\","*","\\","*","kwargs",":","dict",",","optional","Keyword","arguments","for","XGBoost","Booster","object",".","Full","documentation","of","parameters","can","be","found","here",":","https",":","\/\/github.com\/dmlc\/xgboost\/blob\/master\/doc\/parameter.rst",".","Attempting","to","set","a","parameter","via","the","constructor","args","and","\\","*","\\","*","kwargs","dict","simultaneously","will","result","in","a","TypeError",".","Note",":","\\","*","\\","*","kwargs","is","unsupported","by","scikit-learn",".","We","do","not","guarantee","that","parameters","passed","via","this","argument","will","interact","properly","with","scikit-learn",".","Attributes","--","--","--","--","--","n_detector_",":","int","The","number","of","unsupervised","of","detectors","used",".","clf_",":","object","The","XGBoost","classifier",".","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",".","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 the detector, predict on samples, and evaluate the model by
  predefined metrics, e.g., ROC.
  
  Parameters
  ----------
  X : numpy array of shape (n_samples, n_features)
      The input samples.
  
  y : Ignored
      Not used, present for API consistency by convention.
  
  scoring : str, optional (default='roc_auc_score')
      Evaluation metric:
  
      - 'roc_auc_score': ROC score
      - 'prc_n_score': Precision @ rank n score
  
  Returns
  -------
  score : float
docstr_tok: ["Fit","the","detector",",","predict","on","samples",",","and","evaluate","the","model","by","predefined","metrics",",","e.g.",",","ROC",".","Parameters","--","--","--","--","--","X",":","numpy","array","of","shape","(","n_samples",",","n_features",")","The","input","samples",".","y",":","Ignored","Not","used",",","present","for","API","consistency","by","convention",".","scoring",":","str",",","optional","(","default='roc_auc_score","'",")","Evaluation","metric",":","-","'roc_auc_score","'",":","ROC","score","-","'prc_n_score","'",":","Precision","@","rank","n","score","Returns","--","--","--","-","score",":","float"]
code: def fit_predict_score(self, X, y, scoring="roc_auc_score"):
      """Fit the detector, predict on samples, and evaluate the model by
      predefined metrics, e.g., ROC.
  
      Parameters
      ----------
      X : numpy array of shape (n_samples, n_features)
          The input samples.
  
      y : Ignored
          Not used, present for API consistency by convention.
  
      scoring : str, optional (default='roc_auc_score')
          Evaluation metric:
  
          - 'roc_auc_score': ROC score
          - 'prc_n_score': Precision @ rank n score
  
      Returns
      -------
      score : float
      """
  
      self.fit(X, y)
  
      if scoring == "roc_auc_score":
          score = roc_auc_score(y, self.decision_scores_)
      elif scoring == "prc_n_score":
          score = precision_n_scores(y, self.decision_scores_)
      else:
          raise NotImplementedError(
              "PyOD built-in scoring only supports "
              "ROC and Precision @ rank n"
          )
  
      print("{metric}: {score}".format(metric=scoring, score=score))
  
      return score
  
imports: from __future__ import division
  from __future__ import print_function
  import numpy
  from sklearn.metrics import roc_auc_score
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_X_y
  from sklearn.utils.validation import check_is_fitted
  from xgboost.sklearn import XGBClassifier
  from .base import BaseDetector
  from .knn import KNN
  from .lof import LOF
  from .iforest import IForest
  from .hbos import HBOS
  from .ocsvm import OCSVM
  from ..utils.utility import check_parameter
  from ..utils.utility import check_detector
  from ..utils.utility import standardizer
  from ..utils.utility import precision_n_scores
label_desc: Use image node_id 10 for calling the XGBOD obj's underlying member method code with example usage: obj.fit_predict_score(X, y, scoring) and returns: score