DAGMMDetector<T>
Models & Types · AiDotNet.AnomalyDetection.NeuralNetwork
Implements DAGMM (Deep Autoencoding Gaussian Mixture Model) for anomaly detection.
Inheritance: ModelBase<T, Matrix<T>, Vector<T>> → AnomalyDetectorBase<T> → DAGMMDetector<T>
Implements: IGeneratedParameterRegistrar<T>
For Beginners
DAGMM combines an autoencoder with a Gaussian Mixture Model in an end-to-end trainable architecture. The autoencoder learns compressed representations, and the GMM learns the density of normal data in the latent space.
How It Works
The algorithm works by:
- Compression network (autoencoder) learns latent representation
- Estimation network predicts GMM membership probabilities
- GMM models the distribution of latent codes + reconstruction features
- Anomaly score is the negative log-likelihood under the GMM
When to use:
- Complex multivariate data
- When you want to model multiple modes of normal behavior
- When reconstruction error alone is insufficient
Industry Standard Defaults:
- Latent dimensions: 4
- Hidden dimensions: 64
- Number of mixtures: 4
- Epochs: 100
- Contamination: 0.1 (10%)
Reference: Zong, B., et al. (2018). “Deep Autoencoding Gaussian Mixture Model for Unsupervised Anomaly Detection.” ICLR.
Constructors
| Constructor | Summary |
|---|---|
DAGMMDetector(int latentDim, int hiddenDim, int numMixtures, int epochs, double learningRate, double contamination, int randomSeed) |
Creates a new DAGMM anomaly detector. |
Properties
| Property | Summary |
|---|---|
int LatentDim { get; } |
Gets the latent dimensions. |
int NumMixtures { get; } |
Gets the number of GMM components. |
Methods
| Method | Summary |
|---|---|
Vector<T> ScoreAnomalies(Matrix<T> X) |
|
void Fit(Matrix<T> X) |