SAINTRegression<T>
Models & Types · AiDotNet.NeuralNetworks.Tabular
SAINT implementation for regression tasks.
Inheritance: SAINTBase<T> → SAINTRegression<T>
For Beginners
Use SAINT for regression when:
- You have tabular data with mixed numerical and categorical features
- You believe similar samples in your data share useful patterns
- You want state-of-the-art performance on tabular regression
Example:
How It Works
SAINTRegression applies both column attention (over features) and row attention (over samples in a batch) for predicting continuous values on tabular data.
Constructors
| Constructor | Summary |
|---|---|
SAINTRegression(int numNumericalFeatures, int outputDimension, SAINTOptions<T> options) |
Initializes a new instance of the SAINTRegression 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. |