You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,7 @@ For complete Documentation with tutorials visit []
69
69
*[TabNet: Attentive Interpretable Tabular Learning](https://arxiv.org/abs/1908.07442) is another model coming out of Google Research which uses Sparse Attention in multiple steps of decision making to model the output.
70
70
*[Mixture Density Networks](https://publications.aston.ac.uk/id/eprint/373/1/NCRG_94_004.pdf) is a regression model which uses gaussian components to approximate the target function and provide a probabilistic prediction out of the box.
71
71
*[AutoInt: Automatic Feature Interaction Learning via Self-Attentive Neural Networks](https://arxiv.org/abs/1810.11921) is a model which tries to learn interactions between the features in an automated way and create a better representation and then use this representation in downstream task
72
+
*[TabTransformer] (https://arxiv.org/abs/2012.06678) is an adaptation of the Transformer model for Tabular Data which creates contextual representations for categorical features.
72
73
73
74
To implement new models, see the [How to implement new models tutorial](https://github.com/manujosephv/pytorch_tabular/blob/main/docs/04-Implementing%20New%20Architectures.ipynb). It covers basic as well as advanced architectures.
[PyTorch Tabular – A Framework for Deep Learning for Tabular Data](https://deep-and-shallow.com/2021/01/27/pytorch-tabular-a-framework-for-deep-learning-for-tabular-data/)
116
-
[Neural Oblivious Decision Ensembles(NODE) – A State-of-the-Art Deep Learning Algorithm for Tabular Data](https://deep-and-shallow.com/2021/02/25/neural-oblivious-decision-ensemblesnode-a-state-of-the-art-deep-learning-algorithm-for-tabular-data/)
117
-
[Mixture Density Networks: Probabilistic Regression for Uncertainty Estimation](https://deep-and-shallow.com/2021/03/20/mixture-density-networks-probabilistic-regression-for-uncertainty-estimation/)
116
+
-[PyTorch Tabular – A Framework for Deep Learning for Tabular Data](https://deep-and-shallow.com/2021/01/27/pytorch-tabular-a-framework-for-deep-learning-for-tabular-data/)
117
+
-[Neural Oblivious Decision Ensembles(NODE) – A State-of-the-Art Deep Learning Algorithm for Tabular Data](https://deep-and-shallow.com/2021/02/25/neural-oblivious-decision-ensemblesnode-a-state-of-the-art-deep-learning-algorithm-for-tabular-data/)
118
+
-[Mixture Density Networks: Probabilistic Regression for Uncertainty Estimation](https://deep-and-shallow.com/2021/03/20/mixture-density-networks-probabilistic-regression-for-uncertainty-estimation/)
6. Add Text and Image Modalities for mixed modal problems
127
-
7. Integrate Wide and Deep model
128
-
8. Integrate TabTransformer
128
+
7. Add Variable Importance
129
+
8. Integrate SHAP for interpretability
130
+
** DL Models**
131
+
9.[DNF-Net: A Neural Architecture for Tabular Data](https://www.semanticscholar.org/paper/DNF-Net%3A-A-Neural-Architecture-for-Tabular-Data-Abutbul-Elidan/99c49f3a917815eed2144bfb5d064623ff09ade5)
132
+
10.[Attention augmented differentiable forest for tabular data](https://www.semanticscholar.org/paper/Attention-augmented-differentiable-forest-for-data-Chen/57990b40affc5f34f4029dab39bc78e44e7d3b10)
133
+
11.[XBNet : An Extremely Boosted Neural Network](https://arxiv.org/abs/2106.05239v2)
134
+
12.[Revisiting Deep Learning Models for Tabular Data](https://arxiv.org/abs/2106.11959)
129
135
## Citation
130
136
If you use PyTorch Tabular for a scientific publication, we would appreciate citations to the published software and the following paper:
Copy file name to clipboardExpand all lines: pytorch_tabular/models/tab_transformer/components.py
+31-3Lines changed: 31 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -44,9 +44,37 @@ def forward(self, x):
44
44
out=rearrange(out, "b h n d -> b n (h d)", h=h)
45
45
returnself.to_out(out)
46
46
47
-
48
-
# transformer
49
-
47
+
#Shamelessly copied with slight adaptation from https://github.com/jrzaurin/pytorch-widedeep/blob/b487b06721c5abe56ac68c8a38580b95e0897fd4/pytorch_widedeep/models/tab_transformer.py
Copy file name to clipboardExpand all lines: pytorch_tabular/models/tab_transformer/config.py
+25-6Lines changed: 25 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,31 @@ class TabTransformerConfig(ModelConfig):
54
54
"help": "The embedding dimension for the input categorical features. Defaults to 32"
55
55
},
56
56
)
57
+
embedding_dropout: float=field(
58
+
default=0.1,
59
+
metadata={
60
+
"help": "Dropout to be applied to the Categorical Embedding. Defaults to 0.1"
61
+
},
62
+
)
63
+
share_embedding: bool=field(
64
+
default=False,
65
+
metadata={
66
+
"help": "The flag turns on shared embeddings in the input embedding process. The key idea here is to have an embedding for the feature as a whole along with embeddings of each unique values of that column. For more details refer to Appendix A of the TabTransformer paper. Defaults to False"
67
+
}
68
+
)
69
+
share_embedding_strategy: Optional[str] =field(
70
+
default="fraction",
71
+
metadata={
72
+
"help": "There are two strategies in adding shared embeddings. 1. `add` - A separate embedding for the feature is added to the embedding of the unique values of the feature. 2. `fraction` - A fraction of the input embedding is reserved for the shared embedding of the feature. Defaults to fraction.",
73
+
"choices": ["add","fraction"]
74
+
}
75
+
)
76
+
shared_embedding_fraction: float=field(
77
+
default=0.25,
78
+
metadata={
79
+
"help": "Fraction of the input_embed_dim to be reserved by the shared embedding. Should be less than one. Defaults to 0.25"
80
+
},
81
+
)
57
82
num_heads: int=field(
58
83
default=8,
59
84
metadata={
@@ -72,12 +97,6 @@ class TabTransformerConfig(ModelConfig):
72
97
"help": "The number of hidden units in the Multi-Headed Attention layers. Defaults to None and will be same as input_dim."
73
98
},
74
99
)
75
-
embedding_dropout: float=field(
76
-
default=0.1,
77
-
metadata={
78
-
"help": "Dropout to be applied to the Categorical Embedding. Defaults to 0.1"
0 commit comments