class_docstr: Subspace outlier detection (SOD) schema aims to detect outlier in
  varying subspaces of a high dimensional feature space. For each data
  object, SOD explores the axis-parallel subspace spanned by the data
  object's neighbors and determines how much the object deviates from the
  neighbors in this subspace.
  
  See :cite:`kriegel2009outlier` for details.
  
  Parameters
  ----------
  n_neighbors : int, optional (default=20)
      Number of neighbors to use by default for k neighbors queries.
  
  ref_set: int, optional (default=10)
      specifies the number of shared nearest neighbors to create the
      reference set. Note that ref_set must be smaller than n_neighbors.
  
  alpha: float in (0., 1.), optional (default=0.8)
         specifies the lower limit for selecting subspace.
         0.8 is set as default as suggested in the original paper.
  
  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_``.
code: def __init__(
      self, contamination=0.1, n_neighbors=20, ref_set=10, alpha=0.8
  ):
      super(SOD, self).__init__(contamination=contamination)
      if isinstance(n_neighbors, int):
          check_parameter(n_neighbors, low=1, param_name="n_neighbors")
      else:
          raise ValueError(
              "n_neighbors should be int. Got %s" % type(n_neighbors)
          )
  
      if isinstance(ref_set, int):
          check_parameter(
              ref_set, low=1, high=n_neighbors, param_name="ref_set"
          )
      else:
          raise ValueError(
              "ref_set should be int. Got %s" % type(ref_set)
          )
  
      if isinstance(alpha, float):
          check_parameter(alpha, low=0.0, high=1.0, param_name="alpha")
      else:
          raise ValueError(
              "alpha should be float. Got %s" % type(alpha)
          )
  
      self.n_neighbors = n_neighbors
      self.ref_set = ref_set
      self.alpha = alpha
  
file_path: pyod/pyod/models/sod.py
imports: import numba
  import numpy
  from sklearn.neighbors import NearestNeighbors
  from sklearn.utils import check_array
  from .base import BaseDetector
  from ..utils.utility import check_parameter
label_desc: Use image node_id 1 to create a new SOD object from inherited base classes: BaseDetector with example: obj = SOD(contamination, n_neighbors, ref_set, alpha)