class_docstr: ABOD class for Angle-base Outlier Detection.
  For an observation, the variance of its weighted cosine scores to all
  neighbors could be viewed as the outlying score.
  See :cite:`kriegel2008angle` for details.
  
  Two version of ABOD are supported:
  
  - Fast ABOD: use k nearest neighbors to approximate.
  - Original ABOD: consider all training points with high time complexity at
    O(n^3).
  
  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_neighbors : int, optional (default=10)
      Number of neighbors to use by default for k neighbors queries.
  
  method: str, optional (default='fast')
      Valid values for metric are:
  
      - 'fast': fast ABOD. Only consider n_neighbors of training points
      - 'default': original ABOD with all training points, which could be
        slow
  
  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: Fast ABOD method. Only use n_neighbors for angle calculation.
  Internal use only
docstr_tok: ["Fast","ABOD","method",".","Only","use","n_neighbors","for","angle","calculation",".","Internal","use","only"]
code: def _fit_fast(self):
      """Fast ABOD method. Only use n_neighbors for angle calculation.
      Internal use only
      """
  
      # make sure the n_neighbors is in the range
      if self.n_neighbors >= self.n_train_:
          self.n_neighbors = self.n_train_ - 1
          warnings.warn(
              "n_neighbors is set to the number of "
              "training points minus 1: {0}".format(self.n_train_)
          )
  
          check_parameter(
              self.n_neighbors,
              1,
              self.n_train_,
              include_left=True,
              include_right=True,
          )
  
      self.tree_ = KDTree(self.X_train_)
  
      neigh = NearestNeighbors(n_neighbors=self.n_neighbors)
      neigh.fit(self.X_train_)
      ind_arr = neigh.kneighbors(
          n_neighbors=self.n_neighbors, return_distance=False
      )
  
      for i in range(self.n_train_):
          curr_pt = self.X_train_[i, :]
          X_ind = ind_arr[i, :]
          self.decision_scores_[i, 0] = _calculate_wocs(
              curr_pt, self.X_train_, X_ind
          )
      return self
  
imports: from __future__ import division
  from __future__ import print_function
  import warnings
  from itertools import combinations
  import numpy
  from numba import njit
  from sklearn.neighbors import KDTree
  from sklearn.neighbors import NearestNeighbors
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_is_fitted
  from .base import BaseDetector
  from ..utils.utility import check_parameter
label_desc: Use image node_id 4 for calling the ABOD obj's underlying member method code with example usage: obj._fit_fast() and returns: self