TabDPTClassifier<T>
Models & Types ยท AiDotNet.NeuralNetworks.Tabular
TabDPT implementation for classification tasks.
Inheritance: TabDPTBase<T> โ TabDPTClassifier<T>
For Beginners
Use TabDPT for classification when:
- You have a standard tabular classification problem
- You want to leverage foundation model capabilities
- Your data has complex feature interactions
Example:
How It Works
TabDPTClassifier applies foundation model concepts to tabular classification, leveraging pre-trained representations for multi-class prediction.
Constructors
| Constructor | Summary |
|---|---|
TabDPTClassifier(int numNumericalFeatures, int numClasses, TabDPTOptions<T> options) |
Initializes a new instance of the TabDPTClassifier 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. |