TabNetOptions<T>

Options & Configuration · AiDotNet.Models.Options

Configuration options for TabNet, an attention-based interpretable deep learning model for tabular data.

Inheritance: ModelOptions → NeuralNetworkOptions → ModelHyperparameterOptions → FinancialNeuralNetworkOptions → RiskModelOptions<T> → TabNetOptions<T>

For Beginners

TabNet is a neural network specifically designed for tables of data (like spreadsheets or databases). Unlike traditional neural networks that use all features at once, TabNet learns to focus on the most important features for each prediction.

Key advantages of TabNet:

  • Interpretable: You can see which features the model uses for each prediction
  • Feature Selection: Automatically selects relevant features at each step
  • No Preprocessing: Works directly with numerical and categorical data
  • Competitive Performance: Often matches or beats gradient boosting methods

Example usage:

How It Works

TabNet uses sequential attention to choose which features to reason from at each decision step, enabling interpretable feature selection while achieving performance competitive with gradient boosting.

Reference: “TabNet: Attentive Interpretable Tabular Learning” (Arik & Pfister, AAAI 2021)

Constructors

Constructor Summary
TabNetOptions() Initializes a new instance with TabNet’s published defaults.

Properties

Property Summary
bool EnablePreTraining { get; set; } Gets or sets whether to use pre-training (encoder-decoder) mode.
double BatchNormalizationMomentum { get; set; } Gets or sets the momentum for batch normalization.
double DropoutRate { get; set; } Gets or sets the dropout rate.
double Epsilon { get; set; } Gets or sets the epsilon value for numerical stability in batch normalization.
double LearningRate { get; set; } Gets or sets the Adam learning rate used when no optimizer is supplied.
double LearningRateDecayRate { get; set; } Gets or sets the factor the learning rate is multiplied by every LearningRateDecaySteps steps.
double PreTrainingMaskingRatio { get; set; } Gets or sets the masking ratio for pre-training.
double RelaxationFactor { get; set; } Gets or sets the relaxation factor (gamma) for attention mask reuse.
double SparsityCoefficient { get; set; } Gets or sets the sparsity coefficient for the attention masks.
int FeatureDimension { get; set; } Gets or sets the dimension of the feature transformation (also known as HiddenDimension).
int HiddenDimension { get; set; } Alias for FeatureDimension for backward compatibility.
int LearningRateDecaySteps { get; set; } Gets or sets how many optimizer steps pass between learning-rate decays.
int NumDecisionSteps { get; set; } Gets or sets the number of sequential decision steps.
int NumSharedLayers { get; set; } Gets or sets the number of shared layers in the feature transformer.
int NumStepSpecificLayers { get; set; } Gets or sets the number of decision-step-specific layers.
int OutputDimension { get; set; } Gets or sets the dimension of the output at each decision step.
int VirtualBatchSize { get; set; } Gets or sets the virtual batch size for Ghost Batch Normalization.

Methods

Method Summary
TabNetOptions<T> Clone() Creates a copy of the options.