MambularRegression<T>
Models & Types · AiDotNet.NeuralNetworks.Tabular
Mambular implementation for regression tasks.
Inheritance: MambularBase<T> → MambularRegression<T>
For Beginners
Use Mambular for regression 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
MambularRegression applies State Space Models (Mamba architecture) to tabular data for predicting continuous values.
Constructors
| Constructor | Summary |
|---|---|
MambularRegression(int numNumericalFeatures, int outputDimension, MambularOptions<T> options) |
Initializes a new instance of the MambularRegression class. |
Properties
| Property | Summary |
|---|---|
int OutputDimension { get; } |
Gets the output dimension. |
Methods
| Method | Summary |
|---|---|
T ComputeMAELoss(Tensor<T> predictions, Tensor<T> targets) |
Computes the Mean Absolute Error loss. |
T ComputeMSELoss(Tensor<T> predictions, Tensor<T> targets) |
Computes the Mean Squared Error loss. |
T ComputeR2Score(Tensor<T> numericalFeatures, Tensor<T> targets, Matrix<int> categoricalIndices) |
Computes the R² score (coefficient of determination). |
T ComputeRMSE(Tensor<T> numericalFeatures, Tensor<T> targets, Matrix<int> categoricalIndices) |
Computes the Root Mean Squared Error. |
T TrainStep(Tensor<T> numericalFeatures, Tensor<T> 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 predictions. |
Tensor<T> Predict(Tensor<T> numericalFeatures, Matrix<int> categoricalIndices) |
Makes predictions (alias for Forward). |
void ResetState() |
Resets internal state. |
void UpdateParameters(T learningRate) |
Updates all parameters. |