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
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ A unified, extensible framework for text classification with categorical variabl
7
7
## 🚀 Features
8
8
9
9
-**Complex input support**: Handle text data alongside categorical variables seamlessly.
10
+
-**ValueEncoder**: Pass raw string categorical values and labels directly — no manual integer encoding required. Build a `ValueEncoder` from `DictEncoder` or sklearn `LabelEncoder` instances once, and the wrapper handles encoding at train time and label decoding after prediction automatically.
10
11
-**Unified yet highly customizable**:
11
12
- Use any tokenizer from HuggingFace or the original fastText's ngram tokenizer.
12
13
- Manipulate the components (`TextEmbedder`, `CategoricalVariableNet`, `ClassificationHead`) to easily create custom architectures - including **self-attention**. All of them are `torch.nn.Module` !
@@ -15,7 +16,9 @@ A unified, extensible framework for text classification with categorical variabl
15
16
-**PyTorch Lightning**: Automated training with callbacks, early stopping, and logging
16
17
-**Easy experimentation**: Simple API for training, evaluating, and predicting with minimal code:
17
18
- The `torchTextClassifiers` wrapper class orchestrates the tokenizer and the model for you
18
-
-**Additional features**: explainability using Captum
19
+
-**Explainability**:
20
+
-**Captum integration**: gradient-based token attribution via integrated gradients (`explain_with_captum=True`).
21
+
-**Label attention**: class-specific cross-attention that produces one sentence embedding per class, enabling token-level explanations for each label (`explain_with_label_attention=True`). Enable it by setting `n_heads_label_attention` in `ModelConfig`.
19
22
20
23
21
24
## 📦 Installation
@@ -57,5 +60,3 @@ See the [examples/](examples/) directory for:
57
60
## 📄 License
58
61
59
62
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
0 commit comments