class_docstr: The DAGMM module used in the DAGMM detector.
  
  :meta private:
code: def compute_gmms(self, z, gamma):
      # weights
      sum_gamma = torch.sum(gamma, dim=0)
      phi = sum_gamma / gamma.shape[0]
      # means and covariances
      mu = torch.sum(
          gamma.unsqueeze(-1) * z.unsqueeze(1), dim=0
      ) / sum_gamma.unsqueeze(-1)
      z_mu = z.unsqueeze(1) - mu.unsqueeze(0)
      z_mu_outer = z_mu.unsqueeze(-1) * z_mu.unsqueeze(-2)
      cov = torch.sum(
          gamma.unsqueeze(-1).unsqueeze(-1) * z_mu_outer, dim=0
      ) / sum_gamma.unsqueeze(-1).unsqueeze(-1)
      # store these values for prediction
      self.phi, self.mu, self.cov = phi.data, mu.data, cov.data
      return phi, mu, cov
  
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 4 for calling the DAGMMModule obj's underlying member method code with example usage: obj.compute_gmms(z, gamma) and returns: phi,  mu,  cov