GaussianMixtureClassifierLayer<T>

Layers · AiDotNet.NeuralNetworks.Layers

A Gaussian mixture classifier: one diagonal-covariance Gaussian mixture per class, emitting each class’s log-likelihood log p(x | class). Under equal class priors a softmax over the output is the Bayes posterior.

Inheritance: LayerBase<T> → GaussianMixtureClassifierLayer<T>

Implements: IShapeContract

For Beginners

Each class gets a few “clouds” of points describing where its examples usually lie. A new example is scored by how well it fits each class’s clouds, and the best-fitting class wins.

How It Works

This is the statistical pattern recognition classifier of Tzanetakis and Cook 2002 (section IV): a mixture of components Gaussians with diagonal covariance per class, initialized with K-means and fitted with EM (Fit). One component is their “simple Gaussian” classifier. The parameters are also differentiable, so the layer can be trained discriminatively.

Constructors

Constructor Summary
GaussianMixtureClassifierLayer(int classes, int components, int features) Creates the layer with unit-variance components at the origin and equal weights.

Properties

Property Summary
bool SupportsTraining { get; }

Methods

Method Summary
Dictionary<string, string> GetParameterRoles() Returns parameter roles for per-role optimizer configuration (e.g., weight decay exemption for biases).
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank)
IReadOnlyList<Tensor<T>> GetTrainableParameters() Returns all trainable parameter tensors marked with [TrainableParameter].
void ResetState()
void SetTrainableParameters(IReadOnlyList<Tensor<T>> parameters) Replaces trainable parameter tensors (e.g., with ParameterBuffer views).
void ZeroGrad() Clears all gradient fields discovered by convention ({paramName}Gradient).