class_docstr: Deep autoencoding Gaussian mixture model for anomaly detection (DAGMM).
  DAGMM combines an autoencoder with a Gaussian mixture model to model the distribution
  of the reconstruction errors. DAGMM jointly optimizes the parameters of the deep autoencoder
  and the mixture model simultaneously in an end-to-end fashion.
  
  - paper: `Bo Zong, Qi Song, Martin Renqiang Min, Wei Cheng, Cristian Lumezanu, Daeki Cho and Haifeng Chen.
    Deep Autoencoding Gaussian Mixture Model for Unsupervised Anomaly Detection. 2018.
    <https://openreview.net/forum?id=BJJLHbb0->`_.
code: def __init__(self, config: DAGMMConfig):
      super().__init__(config)
      self.gmm_k = config.gmm_k
      self.hidden_size = config.hidden_size
      self.sequence_length = config.sequence_len
      self.lambda_energy = config.lambda_energy
      self.lambda_cov_diag = config.lambda_cov_diag
  
      self.lr = config.lr
      self.batch_size = config.batch_size
      self.num_epochs = config.num_epochs
  
      self.device = "cuda" if torch.cuda.is_available() else "cpu"
      self.data_dim = -1
      self.dagmm, self.optimizer = None, None
      self.train_energy, self._threshold = None, None
  
imports: import copy
  import random
  from typing import List
  import numpy
  import pandas
  from merlion.utils import TimeSeries
  from merlion.models.base import NormalizingConfig
  from merlion.models.anomaly.base import DetectorBase, DetectorConfig, MultipleTimeseriesDetectorMixin
  from merlion.post_process.threshold import AggregateAlarms
  from merlion.utils.misc import ProgressBar, initializer
  from merlion.models.utils.rolling_window_dataset import RollingWindowDataset
label_desc: Use image node_id 1 to create a new DAGMM object from inherited base classes: DetectorBase, MultipleTimeseriesDetectorMixin with example: obj = DAGMM(config)