class_docstr: Deep One-Class Classifier with AutoEncoder (AE) is a type of neural
  networks for learning useful data representations in an unsupervised way.
  DeepSVDD trains a neural network while minimizing the volume of a
  hypersphere that encloses the network representations of the data,
  forcing the network to extract the common factors of variation.
  Similar to PCA, DeepSVDD could be used to detect outlying objects in the
  data by calculating the distance from center
  See :cite:`ruff2018deepsvdd` for details.
  
  Parameters
  ----------
  c: float, optional (default='forwad_nn_pass')
      Deep SVDD center, the default will be calculated based on network
      initialization first forward pass. To get repeated results set
      random_state if c is set to None.
  
  use_ae: bool, optional (default=False)
      The AutoEncoder type of DeepSVDD it reverse neurons from hidden_neurons
      if set to True.
  
  hidden_neurons : list, optional (default=[64, 32])
      The number of neurons per hidden layers. if use_ae is True, neurons
      will be reversed eg. [64, 32] -> [64, 32, 32, 64, n_features]
  
  hidden_activation : str, optional (default='relu')
      Activation function to use for hidden layers.
      All hidden layers are forced to use the same type of activation.
      See https://keras.io/activations/
  
  output_activation : str, optional (default='sigmoid')
      Activation function to use for output layer.
      See https://keras.io/activations/
  
  optimizer : str, optional (default='adam')
      String (name of optimizer) or optimizer instance.
      See https://keras.io/optimizers/
  
  epochs : int, optional (default=100)
      Number of epochs to train the model.
  
  batch_size : int, optional (default=32)
      Number of samples per gradient update.
  
  dropout_rate : float in (0., 1), optional (default=0.2)
      The dropout to be used across all layers.
  
  l2_regularizer : float in (0., 1), optional (default=0.1)
      The regularization strength of activity_regularizer
      applied on each layer. By default, l2 regularizer is used. See
      https://keras.io/regularizers/
  
  validation_size : float in (0., 1), optional (default=0.1)
      The percentage of data to be used for validation.
  
  preprocessing : bool, optional (default=True)
      If True, apply standardization on the data.
  
  verbose : int, optional (default=1)
      Verbosity mode.
  
      - 0 = silent
      - 1 = progress bar
      - 2 = one line per epoch.
  
      For verbose >= 1, model summary may be printed.
  
  random_state : random_state: int, RandomState instance or None, optional
      (default=None)
      If int, random_state is the seed used by the random
      number generator; If RandomState instance, random_state is the random
      number generator; If None, the random number generator is the
      RandomState instance used by `np.random`.
  
  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. When fitting this is used
      to define the threshold on the decision function.
  
  Attributes
  ----------
  model_ : Keras Object
      The underlying DeppSVDD in Keras.
  
  history_: Keras Object
      The AutoEncoder training history.
  
  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 raw anomaly score of X using the fitted detector.
  
  The anomaly score of an input sample is computed based on different
  detector algorithms. For consistency, outliers are assigned with
  larger anomaly scores.
  
  Parameters
  ----------
  X : numpy array of shape (n_samples, n_features)
      The training input samples. Sparse matrices are accepted only
      if they are supported by the base estimator.
  
  Returns
  -------
  anomaly_scores : numpy array of shape (n_samples,)
      The anomaly score of the input samples.
docstr_tok: ["Predict","raw","anomaly","score","of","X","using","the","fitted","detector",".","The","anomaly","score","of","an","input","sample","is","computed","based","on","different","detector","algorithms",".","For","consistency",",","outliers","are","assigned","with","larger","anomaly","scores",".","Parameters","--","--","--","--","--","X",":","numpy","array","of","shape","(","n_samples",",","n_features",")","The","training","input","samples",".","Sparse","matrices","are","accepted","only","if","they","are","supported","by","the","base","estimator",".","Returns","--","--","--","-","anomaly_scores",":","numpy","array","of","shape","(","n_samples",",",")","The","anomaly","score","of","the","input","samples","."]
code: def decision_function(self, X):
      """Predict raw anomaly score of X using the fitted detector.
  
      The anomaly score of an input sample is computed based on different
      detector algorithms. For consistency, outliers are assigned with
      larger anomaly scores.
  
      Parameters
      ----------
      X : numpy array of shape (n_samples, n_features)
          The training input samples. Sparse matrices are accepted only
          if they are supported by the base estimator.
  
      Returns
      -------
      anomaly_scores : numpy array of shape (n_samples,)
          The anomaly score of the input samples.
      """
      check_is_fitted(self, ["model_", "history_"])
      X = check_array(X)
  
      if self.preprocessing:
          X_norm = self.scaler_.transform(X)
      else:
          X_norm = np.copy(X)
  
      # Predict on X and return the reconstruction errors
      pred_scores = self.model_.predict(X_norm)
      return pred_scores
  
file_path: pyod/pyod/models/deep_svdd.py
imports: from __future__ import division
  from __future__ import print_function
  import numpy
  from sklearn.preprocessing import StandardScaler
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_is_fitted
  from .base import BaseDetector
  from .base_dl import _get_tensorflow_version
  from ..utils.utility import check_parameter
label_desc: Use image node_id 5 for calling the DeepSVDD obj's underlying member method code with example usage: obj.decision_function(X) and returns: pred_scores