MambularClassifier<T>

Models & Types ยท AiDotNet.NeuralNetworks.Tabular

Mambular implementation for classification tasks.

Inheritance: MambularBase<T> โ†’ MambularClassifier<T>

For Beginners

Use Mambular for classification when:

  • You have many features and need efficient processing
  • You want an alternative to transformer-based models
  • Feature order/sequence matters for your task

Example:

How It Works

MambularClassifier applies State Space Models (Mamba architecture) to tabular data for multi-class classification.

Constructors

Constructor Summary
MambularClassifier(int numNumericalFeatures, int numClasses, MambularOptions<T> options) Initializes a new instance of the MambularClassifier class.

Properties

Property Summary
int NumClasses { get; } Gets the number of output classes.

Methods

Method Summary
T ComputeAccuracy(Tensor<T> numericalFeatures, Vector<int> targets, Matrix<int> categoricalIndices) Computes classification accuracy.
T ComputeCrossEntropyLoss(Tensor<T> probabilities, Vector<int> targets) Computes the cross-entropy loss.
T TrainStep(Tensor<T> numericalFeatures, Vector<int> targets, T learningRate, Matrix<int> categoricalIndices) Performs a single training step.
Tensor<T> Forward(Tensor<T> numericalFeatures, Matrix<int> categoricalIndices) Performs the forward pass to get class logits.
Tensor<T> PredictProbabilities(Tensor<T> numericalFeatures, Matrix<int> categoricalIndices) Predicts class probabilities using softmax.
Vector<int> Predict(Tensor<T> numericalFeatures, Matrix<int> categoricalIndices) Predicts the most likely class for each sample.
void ResetState() Resets internal state.
void UpdateParameters(T learningRate) Updates all parameters.