AutoIntClassifier<T>
Models & Types · AiDotNet.NeuralNetworks.Tabular
AutoInt implementation for classification tasks.
Inheritance: AutoIntBase<T> → AutoIntClassifier<T>
For Beginners
Use AutoInt for classification when:
- Feature interactions matter (e.g., age + product_category)
- You don’t want to manually engineer feature crosses
- You want interpretable interaction patterns
Example:
How It Works
AutoIntClassifier uses multi-head self-attention to automatically learn feature interactions for classification on tabular data.
Constructors
| Constructor | Summary |
|---|---|
AutoIntClassifier(int numNumericalFeatures, int numClasses, AutoIntOptions<T> options) |
Initializes a new instance of the AutoIntClassifier 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. |