class_docstr: Auto Encoder (AE) is a type of neural networks for learning useful data
  representations unsupervisedly. Similar to PCA, AE could be used to
  detect outlying objects in the data by calculating the reconstruction
  errors. See :cite:`aggarwal2015outlier` Chapter 3 for details.
  
  Parameters
  ----------
  hidden_neurons : list, optional (default=[64, 32, 32, 64])
      The number of neurons per hidden layers.
  
  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/
  
  loss : str or obj, optional (default=keras.losses.mean_squared_error)
      String (name of objective function) or objective function.
      See https://keras.io/losses/
  
  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
  ----------
  encoding_dim_ : int
      The number of neurons in the encoding layer.
  
  compression_rate_ : float
      The ratio between the original feature and
      the number of neurons in the encoding layer.
  
  model_ : Keras Object
      The underlying AutoEncoder 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 pairwise_distances_no_broadcast(X_norm, pred_scores)
  
file_path: pyod/pyod/models/auto_encoder.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.stat_models import pairwise_distances_no_broadcast
  from ..utils.utility import check_parameter
label_desc: Use image node_id 4 for calling the AutoEncoder obj's underlying member method code with example usage: obj.decision_function(X) and returns: pairwise_distances_no_broadcast