Auto-Tabnet
Auto-TabNet is the implementation of Google's TabNet model using dreamquark-ai's pytorch implementation along with hyperparameter search with Optuna.
Google's TabNet was proposed in 2019 with the idea of effectively using deep neural networks for tabular data.
TabNet is a complex model composed of a feature transformer, attentive transformer, and feature masking, that soft feature selection with controllable sparsity in end-to-end learning. The reason for the high performance of TabNet is that it focuses on the most important features that have been considered by the Attentive Transformer. The Attentive Transformer performs feature selection to select which model features to reason from at each step in the model, and a Feature Transformer processes feature into more useful representations and learn complex data patterns, which improve interpretability and help it learn more accurate models.
Requirements
python 3.7 >
pip (python package manager)
Installation
With pip:
pip install auto-tabnet
Source Code
If you want to use it locally within a pip virtualenv:
- Clone the repository
git clone https://github.com/Femme-js/auto-tabnet.git
- Create a pip virtual environment.
virtualenv env
- Install the dependencies from requirements.txt file.
pip install -r requirements.txt
Usage
from auto_tabnet import AutoTabnetClassifier
clf = AutoTabnetClassifier(X, y, X_test)
To get the prediction on test data.
results = clf.predict()
To get the auc_roc_score:
results = clf.get_roc_auc_score()
To get the best hyperparamters tuned by optuna:
results = clf.get_best_params()
The targets on y_train should contain a unique type (e.g. they must all be strings or integers).
Metadata
Release files for auto-tabnet 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| auto_tabnet-0.0.1.tar.gz | 16.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| auto_tabnet-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.3 kB
Release files / auto_tabnet-0.0.1.tar.gz
| Download URL | auto_tabnet-0.0.1.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57d874c13c96c1f7f3298dad15374ed194f7df087c073b43237fd5ad7f3a023c
|
|
BLAKE2b-256 checksum How to use checksums |
83f8e15aee21380791324ea90127b1a5496aac0609210525659afc9b373d275f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.12
|
Release files / auto_tabnet-0.0.1-py3-none-any.whl
| Download URL | auto_tabnet-0.0.1-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d4f7dbd1774fe4dc9b2d54944f236eef96f51dc4df7236a8536343f23e89d23
|
|
BLAKE2b-256 checksum How to use checksums |
9b7c10280e33c098f214587fdc52b7740f6f1d0e946ea37e29d4b14c20a27ece
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.12
|