Skip to main content

Automated implementation of Google TabNet.

Project description

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).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auto_tabnet-0.0.1.tar.gz (16.0 kB view hashes)

Uploaded Source

Built Distribution

auto_tabnet-0.0.1-py3-none-any.whl (16.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page