TabPFNOptions<T>

Options & Configuration · AiDotNet.Models.Options

Configuration options for TabPFN (Prior-Fitted Networks for Tabular Data).

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

For Beginners

TabPFN is unique because it learns from synthetic data:

  • Meta-learning: Trained on millions of synthetic classification tasks
  • In-context learning: Given training data as input, predicts test labels
  • No fine-tuning: Works zero-shot on new datasets
  • Fast inference: No training loop needed for new tasks

Example:

How It Works

TabPFN is a transformer model trained on synthetic data that can perform in-context learning on tabular classification tasks. It approximates Bayesian inference through attention mechanisms.

Reference: “TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Second” (2022)

Constructors

Constructor Summary
TabPFNOptions() Initializes a new instance with default values.
TabPFNOptions(TabPFNOptions<T> other) Initializes a new instance by copying every property from another instance.

Properties

Property Summary
IActivationFunction<T> HiddenActivation { get; set; } Gets or sets the hidden layer activation function.
IVectorActivationFunction<T> HiddenVectorActivation { get; set; } Gets or sets the hidden layer vector activation function (alternative to scalar activation).
bool UseEnsemble { get; set; } Gets or sets whether to use ensemble predictions.
bool UsePositionalEncoding { get; set; } Gets or sets whether to use positional encoding.
bool UsePreNorm { get; set; } Gets or sets whether to use pre-norm (norm before attention).
double DropoutRate { get; set; } Gets or sets the dropout rate.
double InitScale { get; set; } Gets or sets the initialization scale.
double LearningRate { get; set; } Gets or sets the Adam learning rate.
int EmbeddingDimension { get; set; } Gets or sets the embedding dimension.
int FeedForwardDimension { get; } Gets the feed-forward dimension.
int FeedForwardMultiplier { get; set; } Gets or sets the feed-forward dimension multiplier.
int MaxClasses { get; set; } Gets or sets the maximum number of classes supported.
int MaxContextSamples { get; set; } Gets or sets the maximum number of training samples in context.
int NumHeads { get; set; } Gets or sets the number of attention heads.
int NumLayers { get; set; } Gets or sets the number of transformer layers.
int[] CategoricalCardinalities { get; set; } Gets or sets the cardinalities of categorical features.
int[] OutputHeadDimensions { get; set; } Gets or sets the hidden dimensions for the output head.