class_docstr: Anomaly Detection with Generative Adversarial Networks  (AnoGAN).
  See the original paper "Unsupervised anomaly detection with generative
  adversarial networks to guide marker discovery".
  
  See :cite:`schlegl2017unsupervised` for details.
  
  Parameters
  ----------
  
  output_activation : str, optional (default=None)
      Activation function to use for output layer.
      See https://keras.io/activations/
  
  
  activation_hidden : str, optional (default='tanh')
      Activation function to use for output layer.
      See https://keras.io/activations/
  
  epochs : int, optional (default=500)
      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.
  
  G_layers : list, optional (default=[20,10,3,10,20])
      List that indicates the number of nodes per hidden layer for the
      generator. Thus, [10,10] indicates 2 hidden layers having each 10 nodes.
  
  D_layers : list, optional (default=[20,10,5])
      List that indicates the number of nodes per hidden layer for the
      discriminator. Thus, [10,10] indicates 2 hidden layers having each 10
      nodes.
  
  
  learning_rate: float in (0., 1), optional (default=0.001)
      learning rate of training the network
  
  index_D_layer_for_recon_error: int, optional (default = 1)
      This is the index of the hidden layer in the discriminator for which
      the reconstruction error will be determined between query sample and
      the sample created from the latent space.
  
  learning_rate_query: float in (0., 1), optional (default=0.001)
      learning rate for the backpropagation steps needed to find a point in
      the latent space of the generator that approximate the query sample
  
  
  epochs_query: int, optional (default=20) 
      Number of epochs to approximate the query sample in the latent space
      of the generator
  
  preprocessing : bool, optional (default=True)
      If True, apply standardization on the data.
  
  verbose : int, optional (default=1)
      Verbosity mode.
      - 0 = silent
      - 1 = progress bar
  
  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
  ----------
  
  decision_scores_ : numpy array of shape (n_samples,)
      The outlier scores of the training data [0,1].
      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_``.
class_docstr_tok: ["Anomaly","Detection","with","Generative","Adversarial","Networks","(","AnoGAN",")",".","See","the","original","paper","``","Unsupervised","anomaly","detection","with","generative","adversarial","networks","to","guide","marker","discovery","''",".","See",":","cite",":","`","schlegl2017unsupervised","`","for","details",".","Parameters","--","--","--","--","--","output_activation",":","str",",","optional","(","default=None",")","Activation","function","to","use","for","output","layer",".","See","https",":","\/\/keras.io\/activations\/","activation_hidden",":","str",",","optional","(","default='tanh","'",")","Activation","function","to","use","for","output","layer",".","See","https",":","\/\/keras.io\/activations\/","epochs",":","int",",","optional","(","default=500",")","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",".","G_layers",":","list",",","optional","(","default=","[","20,10,3,10,20","]",")","List","that","indicates","the","number","of","nodes","per","hidden","layer","for","the","generator",".","Thus",",","[","10,10","]","indicates","2","hidden","layers","having","each","10","nodes",".","D_layers",":","list",",","optional","(","default=","[","20,10,5","]",")","List","that","indicates","the","number","of","nodes","per","hidden","layer","for","the","discriminator",".","Thus",",","[","10,10","]","indicates","2","hidden","layers","having","each","10","nodes",".","learning_rate",":","float","in","(","0.",",","1",")",",","optional","(","default=0.001",")","learning","rate","of","training","the","network","index_D_layer_for_recon_error",":","int",",","optional","(","default","=","1",")","This","is","the","index","of","the","hidden","layer","in","the","discriminator","for","which","the","reconstruction","error","will","be","determined","between","query","sample","and","the","sample","created","from","the","latent","space",".","learning_rate_query",":","float","in","(","0.",",","1",")",",","optional","(","default=0.001",")","learning","rate","for","the","backpropagation","steps","needed","to","find","a","point","in","the","latent","space","of","the","generator","that","approximate","the","query","sample","epochs_query",":","int",",","optional","(","default=20",")","Number","of","epochs","to","approximate","the","query","sample","in","the","latent","space","of","the","generator","preprocessing",":","bool",",","optional","(","default=True",")","If","True",",","apply","standardization","on","the","data",".","verbose",":","int",",","optional","(","default=1",")","Verbosity","mode",".","-","0","=","silent","-","1","=","progress","bar","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","--","--","--","--","--","decision_scores_",":","numpy","array","of","shape","(","n_samples",",",")","The","outlier","scores","of","the","training","data","[","0,1","]",".","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 plot_learning_curves(
      self, start_ind=0, window_smoothening=10
  ):  # pragma: no cover
      fig = plt.figure(figsize=(12, 5))
  
      l_gen = (
          pd.Series(self.hist_loss_generator[start_ind:])
          .rolling(window_smoothening)
          .mean()
      )
      l_disc = (
          pd.Series(self.hist_loss_discriminator[start_ind:])
          .rolling(window_smoothening)
          .mean()
      )
  
      ax = fig.add_subplot(1, 2, 1)
      ax.plot(
          range(len(l_gen)),
          l_gen,
      )
      ax.set_title("Generator")
      ax.set_ylabel("Loss")
      ax.set_xlabel("Iter")
  
      ax = fig.add_subplot(1, 2, 2)
      ax.plot(range(len(l_disc)), l_disc)
      ax.set_title("Discriminator")
      ax.set_ylabel("Loss")
      ax.set_xlabel("Iter")
  
      plt.show()
  
file_path: pyod/pyod/models/anogan.py
imports: import matplotlib.pyplot
  import numpy
  import pandas
  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 3 for calling the AnoGAN obj's underlying member method code with example usage: obj.plot_learning_curves(start_ind, window_smoothening) without return types