Configurations
- class deeptab.configs.DefaultMambularConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=64, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.SiLU, cat_encoding='int', n_layers=4, d_conv=4, dilation=1, expand_factor=2, bias=False, dropout=0.0, dt_rank='auto', d_state=128, dt_scale=1.0, dt_init='random', dt_max=0.1, dt_min=0.0001, dt_init_floor=0.0001, norm='RMSNorm', conv_bias=False, AD_weight_decay=True, BC_layer_norm=False, shuffle_embeddings=False, head_layer_sizes=<factory>, head_dropout=0.5, head_skip_layers=False, head_activation=torch.nn.SELU, head_use_batch_norm=False, pooling_method='avg', bidirectional=False, use_learnable_interaction=False, use_cls=False, use_pscan=False, mamba_version='mamba-torch')[source]
Configuration class for the Default Mambular model with predefined hyperparameters.
- Parameters:
d_model (
int) – Dimensionality of the model.n_layers (
int) – Number of layers in the model.expand_factor (
int) – Expansion factor for the feed-forward layers.bias (
bool) – Whether to use bias in the linear layers.dropout (
float) – Dropout rate for regularization.d_conv (
int) – Size of convolution over columns.dilation (
int) – Dilation factor for the convolution.dt_rank (
str) – Rank of the decision tree used in the model.d_state (
int) – Dimensionality of the state in recurrent layers.dt_scale (
float) – Scaling factor for decision tree parameters.dt_init (
str) – Initialization method for decision tree parameters.dt_max (
float) – Maximum value for decision tree initialization.dt_min (
float) – Minimum value for decision tree initialization.dt_init_floor (
float) – Floor value for decision tree initialization.norm (
str) – Type of normalization used (‘RMSNorm’, etc.).activation (
Callable) – Activation function for the model.shuffle_embeddings (
bool) – Whether to shuffle embeddings before being passed to Mamba layers.head_layer_sizes (
list) – Sizes of the layers in the model’s head.head_dropout (
float) – Dropout rate for the head layers.head_skip_layers (
bool) – Whether to skip layers in the head.head_activation (
Callable) – Activation function for the head layers.head_use_batch_norm (
bool) – Whether to use batch normalization in the head layers.pooling_method (
str) – Pooling method to use (‘avg’, ‘max’, etc.).bidirectional (
bool) – Whether to process data bidirectionally.use_learnable_interaction (
bool) – Whether to use learnable feature interactions before passing through Mamba blocks.use_cls (
bool) – Whether to append a CLS token to the input sequences.use_pscan (
bool) – Whether to use PSCAN for the state-space model.mamba_version (
str) – Version of the Mamba model to use (‘mamba-torch’, ‘mamba1’, ‘mamba2’).conv_bias (
bool) – Whether to use a bias in the 1D convolution before each mamba blockAD_weight_decay (
bool) – Whether to use weight decay als for the A and D matrices in MambaBC_layer_norm (
bool) – Whether to use layer norm on the B and C matrices
- class deeptab.configs.DefaultFTTransformerConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=128, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.SELU, cat_encoding='int', n_layers=4, n_heads=8, attn_dropout=0.2, ff_dropout=0.1, norm='LayerNorm', transformer_activation=torch.nn.Module, transformer_dim_feedforward=256, norm_first=False, bias=True, head_layer_sizes=<factory>, head_dropout=0.5, head_skip_layers=False, head_activation=torch.nn.SELU, head_use_batch_norm=False, pooling_method='avg', use_cls=False)[source]
Configuration class for the FT Transformer model with predefined hyperparameters.
- Parameters:
d_model (
int) – Dimensionality of the transformer model.n_layers (
int) – Number of transformer layers.n_heads (
int) – Number of attention heads in the transformer.attn_dropout (
float) – Dropout rate for the attention mechanism.ff_dropout (
float) – Dropout rate for the feed-forward layers.norm (
str) – Type of normalization to be used (‘LayerNorm’, ‘RMSNorm’, etc.).activation (
Callable) – Activation function for the transformer layers.transformer_activation (
Callable) – Activation function for the transformer feed-forward layers.transformer_dim_feedforward (
int) – Dimensionality of the feed-forward layers in the transformer.layer_norm_eps (
float) – Epsilon value for layer normalization to improve numerical stability.norm_first (
bool) – Whether to apply normalization before other operations in each transformer block.bias (
bool) – Whether to use bias in linear layers.head_layer_sizes (
list) – Sizes of the fully connected layers in the model’s head.head_dropout (
float) – Dropout rate for the head layers.head_skip_layers (
bool) – Whether to use skip connections in the head layers.head_activation (
Callable) – Activation function for the head layers.head_use_batch_norm (
bool) – Whether to use batch normalization in the head layers.pooling_method (
str) – Pooling method to be used (‘cls’, ‘avg’, etc.).use_cls (
bool) – Whether to use a CLS token for pooling.cat_encoding (
str) – Method for encoding categorical features (‘int’, ‘one-hot’, or ‘linear’).
- class deeptab.configs.DefaultResNetConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=32, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.SELU, cat_encoding='int', layer_sizes=<factory>, skip_layers=False, dropout=0.5, norm=False, use_glu=False, skip_connections=True, num_blocks=3, average_embeddings=True)[source]
Configuration class for the default ResNet model with predefined hyperparameters.
- Parameters:
layer_sizes (
list) – Sizes of the layers in the ResNet.activation (
Callable) – Activation function for the ResNet layers.skip_layers (
bool) – Whether to skip layers in the ResNet.dropout (
float) – Dropout rate for regularization.norm (
bool) – Whether to use normalization in the ResNet.use_glu (
bool) – Whether to use Gated Linear Units (GLU) in the ResNet.skip_connections (
bool) – Whether to use skip connections in the ResNet.num_blocks (
int) – Number of residual blocks in the ResNet.average_embeddings (
bool) – Whether to average embeddings during the forward pass.
- class deeptab.configs.DefaultMLPConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=32, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.ReLU, cat_encoding='int', layer_sizes=<factory>, skip_layers=False, dropout=0.2, use_glu=False, skip_connections=False)[source]
Configuration class for the default Multi-Layer Perceptron (MLP) model with predefined hyperparameters.
- Parameters:
layer_sizes (
list) – Sizes of the layers in the MLP.activation (
Callable) – Activation function for the MLP layers.skip_layers (
bool) – Whether to skip layers in the MLP.dropout (
float) – Dropout rate for regularization.use_glu (
bool) – Whether to use Gated Linear Units (GLU) in the MLP.skip_connections (
bool) – Whether to use skip connections in the MLP.
- class deeptab.configs.DefaultTabTransformerConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=128, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.SELU, cat_encoding='int', n_layers=4, n_heads=8, attn_dropout=0.2, ff_dropout=0.1, norm='LayerNorm', transformer_activation=torch.nn.Module, transformer_dim_feedforward=512, norm_first=True, bias=True, head_layer_sizes=<factory>, head_dropout=0.5, head_skip_layers=False, head_activation=torch.nn.SELU, head_use_batch_norm=False, pooling_method='avg')[source]
Configuration class for the default Tab Transformer model with predefined hyperparameters.
- Parameters:
n_layers (
int) – Number of layers in the transformer.n_heads (
int) – Number of attention heads in the transformer.d_model (
int) – Dimensionality of embeddings or model representations.attn_dropout (
float) – Dropout rate for the attention mechanism.ff_dropout (
float) – Dropout rate for the feed-forward layers.norm (
str) – Normalization method to be used.activation (
Callable) – Activation function for the transformer layers.transformer_activation (
Callable) – Activation function for the transformer layers.transformer_dim_feedforward (
int) – Dimensionality of the feed-forward layers in the transformer.norm_first (
bool) – Whether to apply normalization before other operations in each transformer block.bias (
bool) – Whether to use bias in the linear layers.head_layer_sizes (
list) – Sizes of the layers in the model’s head.head_dropout (
float) – Dropout rate for the head layers.head_skip_layers (
bool) – Whether to skip layers in the head.head_activation (
Callable) – Activation function for the head layers.head_use_batch_norm (
bool) – Whether to use batch normalization in the head layers.pooling_method (
str) – Pooling method to be used (‘cls’, ‘avg’, etc.).cat_encoding (
str) – Encoding method for categorical features (‘int’, ‘one-hot’, etc.).
- class deeptab.configs.DefaultMambaTabConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=64, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.ReLU, cat_encoding='int', n_layers=1, expand_factor=2, bias=False, d_conv=16, conv_bias=True, dropout=0.05, dt_rank='auto', d_state=128, dt_scale=1.0, dt_init='random', dt_max=0.1, dt_min=0.0001, dt_init_floor=0.0001, axis=1, head_layer_sizes=<factory>, head_dropout=0.0, head_skip_layers=False, head_activation=torch.nn.ReLU, head_use_batch_norm=False, norm='LayerNorm', use_pscan=False, mamba_version='mamba-torch', bidirectional=False)[source]
Configuration class for the Default MambaTab model with predefined hyperparameters.
- Parameters:
d_model (
int) – Dimensionality of the model.n_layers (
int) – Number of layers in the model.expand_factor (
int) – Expansion factor for the feed-forward layers.bias (
bool) – Whether to use bias in the linear layers.d_conv (
int) – Dimensionality of the convolutional layers.conv_bias (
bool) – Whether to use bias in the convolutional layers.dropout (
float) – Dropout rate for regularization.dt_rank (
str) – Rank of the decision tree used in the model.d_state (
int) – Dimensionality of the state in recurrent layers.dt_scale (
float) – Scaling factor for the decision tree.dt_init (
str) – Initialization method for the decision tree.dt_max (
float) – Maximum value for decision tree initialization.dt_min (
float) – Minimum value for decision tree initialization.dt_init_floor (
float) – Floor value for decision tree initialization.activation (
Callable) – Activation function for the model.axis (
int) – Axis along which operations are applied, if applicable.head_layer_sizes (
list) – Sizes of the fully connected layers in the model’s head.head_dropout (
float) – Dropout rate for the head layers.head_skip_layers (
bool) – Whether to skip layers in the head.head_activation (
Callable) – Activation function for the head layers.head_use_batch_norm (
bool) – Whether to use batch normalization in the head layers.norm (
str) – Type of normalization to be used (‘LayerNorm’, ‘RMSNorm’, etc.).use_pscan (
bool) – Whether to use PSCAN for the state-space model.mamba_version (
str) – Version of the Mamba model to use (‘mamba-torch’, ‘mamba1’, ‘mamba2’).bidirectional (
bool) – Whether to process data bidirectionally.
- class deeptab.configs.DefaultTabulaRNNConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=128, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.SELU, cat_encoding='int', model_type='RNN', n_layers=4, rnn_dropout=0.2, norm='RMSNorm', residuals=False, head_layer_sizes=<factory>, head_dropout=0.5, head_skip_layers=False, head_activation=torch.nn.SELU, head_use_batch_norm=False, pooling_method='avg', norm_first=False, bias=True, rnn_activation='relu', dim_feedforward=256, d_conv=4, dilation=1, conv_bias=True)[source]
Configuration class for the TabulaRNN model with predefined hyperparameters.
- Parameters:
model_type (
str) – Type of model, one of “RNN”, “LSTM”, “GRU”, “mLSTM”, “sLSTM”.n_layers (
int) – Number of layers in the RNN.rnn_dropout (
float) – Dropout rate for the RNN layers.d_model (
int) – Dimensionality of embeddings or model representations.norm (
str) – Normalization method to be used.activation (
Callable) – Activation function for the RNN layers.residuals (
bool) – Whether to include residual connections in the RNN.head_layer_sizes (
list) – Sizes of the layers in the head of the model.head_dropout (
float) – Dropout rate for the head layers.head_skip_layers (
bool) – Whether to skip layers in the head.head_activation (
Callable) – Activation function for the head layers.head_use_batch_norm (
bool) – Whether to use batch normalization in the head layers.pooling_method (
str) – Pooling method to be used (‘avg’, ‘cls’, etc.).norm_first (
bool) – Whether to apply normalization before other operations in each block.layer_norm_eps (
float) – Epsilon value for layer normalization.bias (
bool) – Whether to use bias in the linear layers.rnn_activation (
str) – Activation function for the RNN layers.dim_feedforward (
int) – Size of the feedforward network.d_conv (
int) – Size of the convolutional layer for embedding features.dilation (
int) – Dilation factor for the convolution.conv_bias (
bool) – Whether to use bias in the convolutional layers.
- class deeptab.configs.DefaultMambAttentionConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=64, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.SiLU, cat_encoding='int', n_layers=4, expand_factor=2, n_heads=8, last_layer='attn', n_mamba_per_attention=1, bias=False, d_conv=4, conv_bias=True, dropout=0.0, attn_dropout=0.2, dt_rank='auto', d_state=128, dt_scale=1.0, dt_init='random', dt_max=0.1, dt_min=0.0001, dt_init_floor=0.0001, norm='LayerNorm', head_layer_sizes=<factory>, head_dropout=0.5, head_skip_layers=False, head_activation=torch.nn.SELU, head_use_batch_norm=False, pooling_method='avg', bidirectional=False, use_learnable_interaction=False, use_cls=False, shuffle_embeddings=False, AD_weight_decay=True, BC_layer_norm=False, use_pscan=False, n_attention_layers=1)[source]
Configuration class for the Default Mambular Attention model with predefined hyperparameters.
- Parameters:
d_model (
int) – Dimensionality of the model.n_layers (
int) – Number of layers in the model.expand_factor (
int) – Expansion factor for the feed-forward layers.n_heads (
int) – Number of attention heads in the model.last_layer (
str) – Type of the last layer (e.g., ‘attn’).n_mamba_per_attention (
int) – Number of Mamba blocks per attention layer.bias (
bool) – Whether to use bias in the linear layers.d_conv (
int) – Dimensionality of the convolutional layers.conv_bias (
bool) – Whether to use bias in the convolutional layers.dropout (
float) – Dropout rate for regularization.attn_dropout (
float) – Dropout rate for the attention mechanism.dt_rank (
str) – Rank of the decision tree.d_state (
int) – Dimensionality of the state in recurrent layers.dt_scale (
float) – Scaling factor for the decision tree.dt_init (
str) – Initialization method for the decision tree.dt_max (
float) – Maximum value for decision tree initialization.dt_min (
float) – Minimum value for decision tree initialization.dt_init_floor (
float) – Floor value for decision tree initialization.norm (
str) – Type of normalization used in the model.activation (
Callable) – Activation function for the model.head_layer_sizes (
list) – Sizes of the fully connected layers in the model’s head.head_dropout (
float) – Dropout rate for the head layers.head_skip_layers (
bool) – Whether to use skip connections in the head layers.head_activation (
Callable) – Activation function for the head layers.head_use_batch_norm (
bool) – Whether to use batch normalization in the head layers.pooling_method (
str) – Pooling method to be used (‘avg’, ‘max’, etc.).bidirectional (
bool) – Whether to process input sequences bidirectionally.use_learnable_interaction (
bool) – Whether to use learnable feature interactions before passing through Mamba blocks.use_cls (
bool) – Whether to append a CLS token for sequence pooling.shuffle_embeddings (
bool) – Whether to shuffle embeddings before passing to Mamba layers.cat_encoding (
str) – Encoding method for categorical features (‘int’, ‘one-hot’, etc.).AD_weight_decay (
bool) – Whether weight decay is applied to A-D matrices.BC_layer_norm (
bool) – Whether to apply layer normalization to B-C matrices.use_pscan (
bool) – Whether to use PSCAN for the state-space model.n_attention_layers (
int) – Number of attention layers in the model.
- class deeptab.configs.DefaultNDTFConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=32, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.ReLU, cat_encoding='int', min_depth=4, max_depth=16, temperature=0.1, node_sampling=0.3, lamda=0.3, n_ensembles=12, penalty_factor=1e-08)[source]
Configuration class for the default Neural Decision Tree Forest (NDTF) model with predefined hyperparameters.
- Parameters:
min_depth (
int) – Minimum depth of trees in the forest. Controls the simplest model structure.max_depth (
int) – Maximum depth of trees in the forest. Controls the maximum complexity of the trees.temperature (
float) – Temperature parameter for softening the node decisions during path probability calculation.node_sampling (
float) – Fraction of nodes sampled for regularization penalty calculation. Reduces computation by focusing on a subset of nodes.lamda (
float) – Regularization parameter to control the complexity of the paths, penalizing overconfident or imbalanced paths.n_ensembles (
int) – Number of trees in the forestpenalty_factor (
float) – Factor with which the penalty is multiplied
- class deeptab.configs.DefaultNODEConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=32, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.ReLU, cat_encoding='int', num_layers=4, layer_dim=128, tree_dim=1, depth=6, norm=None, head_layer_sizes=<factory>, head_dropout=0.3, head_skip_layers=False, head_activation=torch.nn.ReLU, head_use_batch_norm=False)[source]
Configuration class for the Neural Oblivious Decision Ensemble (NODE) model.
- Parameters:
num_layers (
int) – Number of dense layers in the model.layer_dim (
int) – Dimensionality of each dense layer.tree_dim (
int) – Dimensionality of the output from each tree leaf.depth (
int) – Depth of each decision tree in the ensemble.norm (
str|None) – Type of normalization to use in the model.head_layer_sizes (
list) – Sizes of the layers in the model’s head.head_dropout (
float) – Dropout rate for the head layers.head_skip_layers (
bool) – Whether to skip layers in the head.head_activation (
Callable) – Activation function for the head layers.head_use_batch_norm (
bool) – Whether to use batch normalization in the head layers.
- class deeptab.configs.DefaultTabMConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=32, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.ReLU, cat_encoding='int', layer_sizes=<factory>, dropout=0.5, norm=None, use_glu=False, ensemble_size=32, ensemble_scaling_in=True, ensemble_scaling_out=True, ensemble_bias=True, scaling_init='ones', average_ensembles=False, model_type='mini', average_embeddings=True)[source]
Configuration class for the TabM model with batch ensembling and predefined hyperparameters.
- Parameters:
layer_sizes (
list) – Sizes of the layers in the model.activation (
Callable) – Activation function for the model layers.dropout (
float) – Dropout rate for regularization.norm (
str|None) – Normalization method to be used, if any.use_glu (
bool) – Whether to use Gated Linear Units (GLU) in the model.ensemble_size (
int) – Number of ensemble members for batch ensembling.ensemble_scaling_in (
bool) – Whether to use input scaling for each ensemble member.ensemble_scaling_out (
bool) – Whether to use output scaling for each ensemble member.ensemble_bias (
bool) – Whether to use a unique bias term for each ensemble member.scaling_init (
Literal['ones','random-signs','normal']) – Initialization method for scaling weights.average_ensembles (
bool) – Whether to average the outputs of the ensembles.model_type (
Literal['mini','full']) – Model type to use (‘mini’ for reduced version, ‘full’ for complete model).
- class deeptab.configs.DefaultSAINTConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=128, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.GELU, cat_encoding='int', n_layers=1, n_heads=2, attn_dropout=0.2, ff_dropout=0.1, norm='LayerNorm', norm_first=False, bias=True, head_layer_sizes=<factory>, head_dropout=0.5, head_skip_layers=False, head_activation=torch.nn.SELU, head_use_batch_norm=False, pooling_method='cls', use_cls=True)[source]
Configuration class for the SAINT model with predefined hyperparameters.
- Parameters:
n_layers (
int) – Number of transformer layers.n_heads (
int) – Number of attention heads in the transformer.d_model (
int) – Dimensionality of embeddings or model representations.attn_dropout (
float) – Dropout rate for the attention mechanism.ff_dropout (
float) – Dropout rate for the feed-forward layers.norm (
str) – Type of normalization to be used (‘LayerNorm’, ‘RMSNorm’, etc.).activation (
Callable) – Activation function for the transformer layers.transformer_activation (callable, default=ReGLU()) – Activation function for the transformer feed-forward layers.
transformer_dim_feedforward (int, default=256) – Dimensionality of the feed-forward layers in the transformer.
norm_first (
bool) – Whether to apply normalization before other operations in each transformer block.bias (
bool) – Whether to use bias in linear layers.head_layer_sizes (
list) – Sizes of the fully connected layers in the model’s head.head_dropout (
float) – Dropout rate for the head layers.head_skip_layers (
bool) – Whether to use skip connections in the head layers.head_activation (
Callable) – Activation function for the head layers.head_use_batch_norm (
bool) – Whether to use batch normalization in the head layers.pooling_method (
str) – Pooling method to be used (‘cls’, ‘avg’, etc.).use_cls (
bool) – Whether to use a CLS token for pooling.cat_encoding (
str) – Method for encoding categorical features (‘int’, ‘one-hot’, or ‘linear’).
- class deeptab.configs.DefaultAutoIntConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=128, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.ReLU, cat_encoding='int', n_layers=4, n_heads=8, attn_dropout=0.2, fprenorm=False, transformer_dim_feedforward=256, bias=True, use_cls=False, kv_compression=0.5, kv_compression_sharing='key-value')[source]
Configuration class for the AutoInt model with predefined hyperparameters.
- Parameters:
d_model (
int) – Dimensionality of the transformer model.n_layers (
int) – Number of transformer layers.n_heads (
int) – Number of attention heads in the transformer.attn_dropout (
float) – Dropout rate for the attention mechanism.transformer_dim_feedforward (
int) – Dimensionality of the feed-forward layers in the transformer.prenorm (bool, default=False) – Whether to apply normalization before last layer.
bias (
bool) – Whether to use bias in linear layers.cat_encoding (
str) – Method for encoding categorical features (‘int’, ‘one-hot’, or ‘linear’).kv_compression (
float) – Compression ratio for key-value pairs.kv_compression_sharing (
str) – Sharing strategy for key-value compression (‘headwise’, or ‘key-value’).
- class deeptab.configs.DefaultENODEConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=8, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.ReLU, cat_encoding='int', num_layers=4, layer_dim=64, tree_dim=1, depth=6, norm=None, head_layer_sizes=<factory>, head_dropout=0.3, head_skip_layers=False, head_activation=torch.nn.ReLU, head_use_batch_norm=False)[source]
Configuration class for the Neural Oblivious Decision Ensemble (NODE) model.
- Parameters:
num_layers (
int) – Number of dense layers in the model.layer_dim (
int) – Dimensionality of each dense layer.tree_dim (
int) – Dimensionality of the output from each tree leaf.depth (
int) – Depth of each decision tree in the ensemble.norm (
str|None) – Type of normalization to use in the model.head_layer_sizes (
list) – Sizes of the layers in the model’s head.head_dropout (
float) – Dropout rate for the head layers.head_skip_layers (
bool) – Whether to skip layers in the head.head_activation (
Callable) – Activation function for the head layers.head_use_batch_norm (
bool) – Whether to use batch normalization in the head layers.
- class deeptab.configs.DefaultModernNCAConfig(lr=0.0001, lr_patience=10, weight_decay=1e-05, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='plr', embedding_bias=False, layer_norm_after_embedding=False, d_model=32, plr_lite=True, n_frequencies=75, frequencies_init_scale=0.045, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.ReLU, cat_encoding='int', dim=128, d_block=512, n_blocks=4, dropout=0.1, temperature=0.75, sample_rate=0.5, num_embeddings=None, optimizer_type='AdamW', learning_rate=0.01, head_layer_sizes=<factory>, head_dropout=0.5, head_skip_layers=False, head_activation=torch.nn.SELU, head_use_batch_norm=False)[source]
Default configuration for the ModernNCA model.
- class deeptab.configs.DefaultTangosConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=32, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.ReLU, cat_encoding='int', layer_sizes=<factory>, skip_layers=False, dropout=0.2, use_glu=False, skip_connections=False, lamda1=0.5, lamda2=0.1, subsample=0.5)[source]
Configuration class for the default Multi-Layer Perceptron (TANGOS) model with predefined hyperparameters.
- Parameters:
layer_sizes (
list) – Sizes of the layers in the TANGOS.activation (
Callable) – Activation function for the TANGOS layers.skip_layers (
bool) – Whether to skip layers in the TANGOS.dropout (
float) – Dropout rate for regularization.use_glu (
bool) – Whether to use Gated Linear Units (GLU) in the TANGOS.skip_connections (
bool) – Whether to use skip connections in the TANGOS.
- class deeptab.configs.DefaultTromptConfig(lr=0.0001, lr_patience=10, weight_decay=1e-06, lr_factor=0.1, use_embeddings=False, embedding_activation=torch.nn.Identity, embedding_type='linear', embedding_bias=False, layer_norm_after_embedding=False, d_model=128, plr_lite=False, n_frequencies=48, frequencies_init_scale=0.01, embedding_projection=True, batch_norm=False, layer_norm=False, layer_norm_eps=1e-05, activation=torch.nn.ReLU, cat_encoding='int', n_cycles=6, n_cells=4, P=128)[source]
Configuration class for the Trompt model with predefined hyperparameters.
- Parameters:
d_model (
int) – Dimensionality of the transformer model.n_cycles (
int) – Number of cycles in the Trompt model.n_cells (
int) – Number of cells in each cycle.P (
int) – Number of steps in the Trompt model.