class_docstr: SUOD (Scalable Unsupervised Outlier Detection) is an acceleration
  framework for large scale unsupervised outlier detector training and
  prediction. The corresponding paper is under review in KDD 2020.
  
  Parameters
  ----------
  base_estimators: list, length must be greater than 1
          A list of base estimators. Certain methods must be present, e.g.,
          `fit` and `predict`.
  
  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
          the number of jobs that can actually run in parallel.
  
  rp_clf_list : list, optional (default=None)
          The list of outlier detection models to use random projection. The
          detector name should be consistent with PyOD.
  
  rp_ng_clf_list : list, optional (default=None)
          The list of outlier detection models NOT to use random projection. The
          detector name should be consistent with PyOD.
  
  rp_flag_global : bool, optional (default=True)
          If set to False, random projection is turned off for all base models.
  
  target_dim_frac : float in (0., 1), optional (default=0.5)
          The target compression ratio.
  
  jl_method : string, optional (default = 'basic')
          The JL projection method:
  
          - "basic": each component of the transformation matrix is taken at
            random in N(0,1).
          - "discrete", each component of the transformation matrix is taken at
            random in {-1,1}.
          - "circulant": the first row of the transformation matrix is taken at
            random in N(0,1), and each row is obtained from the previous one
            by a one-left shift.
          - "toeplitz": the first row and column of the transformation matrix
            is taken at random in N(0,1), and each diagonal has a constant value
            taken from these first vector.
  
  bps_flag : bool, optional (default=True)
          If set to False, balanced parallel scheduling is turned off.
  
  approx_clf_list : list, optional (default=None)
          The list of outlier detection models to use pseudo-supervised
          approximation. The detector name should be consistent with PyOD.
  
  approx_ng_clf_list : list, optional (default=None)
          The list of outlier detection models NOT to use pseudo-supervised
          approximation. The detector name should be consistent with PyOD.
  
  approx_flag_global : bool, optional (default=True)
          If set to False, pseudo-supervised approximation is turned off.
  
  approx_clf : object, optional (default: sklearn RandomForestRegressor)
          The supervised model used to approximate unsupervised models.
  
  cost_forecast_loc_fit : str, optional
          The location of the pretrained cost prediction forecast for training.
  
  cost_forecast_loc_pred : str, optional
          The location of the pretrained cost prediction forecast for prediction.
  
  verbose : bool, optional (default=False)
          Controls the verbosity of the building process.
docstr: Predict the probability of a sample being outlier. Two approaches
  are possible:
  
  1. simply use Min-max conversion to linearly transform the outlier
     scores into the range of [0,1]. The model must be
     fitted first.
  2. use unifying scores, see :cite:`kriegel2011interpreting`.
  
  Parameters
  ----------
  X : numpy array of shape (n_samples, n_features)
          The input samples.
  
  Returns
  -------
  outlier_probability : numpy array of shape (n_samples,)
          For each observation, tells whether or not
          it should be considered as an outlier according to the
          fitted model. Return the outlier probability, ranging
          in [0,1].
docstr_tok: ["Predict","the","probability","of","a","sample","being","outlier",".","Two","approaches","are","possible",":","1.","simply","use","Min-max","conversion","to","linearly","transform","the","outlier","scores","into","the","range","of","[","0,1","]",".","The","model","must","be","fitted","first",".","2.","use","unifying","scores",",","see",":","cite",":","`","kriegel2011interpreting","`",".","Parameters","--","--","--","--","--","X",":","numpy","array","of","shape","(","n_samples",",","n_features",")","The","input","samples",".","Returns","--","--","--","-","outlier_probability",":","numpy","array","of","shape","(","n_samples",",",")","For","each","observation",",","tells","whether","or","not","it","should","be","considered","as","an","outlier","according","to","the","fitted","model",".","Return","the","outlier","probability",",","ranging","in","[","0,1","]","."]
code: def predict_proba(self, X):
      """Predict the probability of a sample being outlier. Two approaches
      are possible:
  
      1. simply use Min-max conversion to linearly transform the outlier
         scores into the range of [0,1]. The model must be
         fitted first.
      2. use unifying scores, see :cite:`kriegel2011interpreting`.
  
      Parameters
      ----------
      X : numpy array of shape (n_samples, n_features)
              The input samples.
  
      Returns
      -------
      outlier_probability : numpy array of shape (n_samples,)
              For each observation, tells whether or not
              it should be considered as an outlier according to the
              fitted model. Return the outlier probability, ranging
              in [0,1].
      """
      X = check_array(X)
      n_samples, n_features = X.shape[0], X.shape[1]
  
      # decide whether bps is needed
      # it is turned off
      if self.bps_flag:
          # load the pre-trained cost predictor to forecast the train cost
          cost_predictor = load_predictor_prediction(
              self.cost_forecast_loc_pred
          )
  
          time_cost_pred = cost_forecast_meta(
              cost_predictor, X, self.base_estimator_names
          )
  
          n_estimators_list, starts, n_jobs = balanced_scheduling(
              time_cost_pred,
              self.n_estimators,
              self.n_jobs,
              self.verbose,
          )
      else:
          # use simple equal split by sklearn
          n_estimators_list, starts, n_jobs = _partition_estimators(
              self.n_estimators, self.n_jobs, verbose=self.verbose
          )
  
      # fit the base models
      if self.verbose:
          print("Parallel score prediction...")
          start = time.time()
  
      # TODO: code cleanup. There is an existing bug for joblib on Windows:
      # https://github.com/joblib/joblib/issues/806
      # max_nbytes can be dropped on other OS
      all_results_scores = Parallel(
          n_jobs=n_jobs, max_nbytes=None, verbose=True
      )(
          delayed(_parallel_predict_proba)(
              n_estimators_list[i],
              self.base_estimators[starts[i] : starts[i + 1]],
              self.approximators[starts[i] : starts[i + 1]],
              X,
              self.n_estimators,
              # self.rp_flags[starts[i]:starts[i + 1]],
              self.jl_transformers_[starts[i] : starts[i + 1]],
              self.approx_flags[starts[i] : starts[i + 1]],
              verbose=True,
          )
          for i in range(n_jobs)
      )
  
      # fit the base models
      if self.verbose:
          print(
              "Parallel Score Prediction without Approximators "
              "Total Time:",
              time.time() - start,
          )
  
      # unfold and generate the label matrix
      predicted_scores = np.zeros([n_samples, self.n_estimators])
      for i in range(n_jobs):
          predicted_scores[:, starts[i] : starts[i + 1]] = np.asarray(
              all_results_scores[i]
          ).T
  
      return predicted_scores
  
imports: import os
  import sys
  import time
  import numbers
  import numpy
  from sklearn.ensemble import RandomForestRegressor
  from sklearn.utils import check_array
  import joblib
  from joblib import Parallel, delayed, effective_n_jobs
  from joblib.externals.loky.backend.context import set_start_method
  from pyod.models.sklearn_base import _pprint
  from pyod.utils.utility import check_parameter
  from suod.models.parallel_processes import cost_forecast_meta
  from suod.models.parallel_processes import balanced_scheduling
  from suod.models.parallel_processes import _parallel_fit
  from suod.models.parallel_processes import _parallel_predict
  from suod.models.parallel_processes import _parallel_predict_proba
  from suod.models.parallel_processes import _parallel_decision_function
  from suod.models.parallel_processes import _partition_estimators
  from suod.models.parallel_processes import _parallel_approx_estimators
  from ..utils.utility import _unfold_parallel, build_codes, _get_sklearn_version
  import warnings
  from collections import defaultdict
  from inspect import signature
label_desc: Use image node_id 7 for calling the SUOD obj's underlying member method code with example usage: obj.predict_proba(X) and returns: predicted_scores