Skip to main content

DeepTables

Python Versions TensorFlow Versions Downloads PyPI Version

Documentation Status Build Status Coverage Status License

We Are Hiring!

Dear folks, we are opening several precious positions based in Beijing both for professionals and interns avid in AutoML/NAS, please send your resume/cv to yangjian@zetyun.com. (Application deadline: TBD.)

DeepTables: Deep-learning Toolkit for Tabular data

DeepTables(DT) is a easy-to-use toolkit that enables deep learning to unleash great power on tabular data.

Overview

MLP (also known as Fully-connected neural networks) have been shown inefficient in learning distribution representation. The "add" operations of the perceptron layer have been proven poor performance to exploring multiplicative feature interactions. In most cases, manual feature engineering is necessary and this work requires extensive domain knowledge and very cumbersome. How learning feature interactions efficiently in neural networks becomes the most important problem.

Various models have been proposed to CTR prediction and continue to outperform existing state-of-the-art approaches to the late years. Well-known examples include FM, DeepFM, Wide&Deep, DCN, PNN, etc. These models can also provide good performance on tabular data under reasonable utilization.

DT aims to utilize the latest research findings to provide users with an end-to-end toolkit on tabular data.

DT has been designed with these key goals in mind:

  • Easy to use, non-experts can also use.
  • Provide good performance out of the box.
  • Flexible architecture and easy expansion by user.

Tutorials

Please refer to the official docs at https://deeptables.readthedocs.io/en/latest/.

Installation

pip is recommended to install DeepTables:

pip install tensorflow deeptables

Note:

  • Tensorflow is required by DeepTables, install it before running DeepTables.

GPU Setup (Optional)

To use DeepTables with GPU devices, install tensorflow-gpu instead of tensorflow.

pip install tensorflow-gpu deeptables

Verify the installation:

python -c "from deeptables.utils.quicktest import test; test()"

Optional dependencies

Following libraries are not hard dependencies and are not automatically installed when you install DeepTables. To use all functionalities of DT, these optional dependencies must be installed.

pip install shap

Example:

A simple binary classification example

import numpy as np
from deeptables.models import deeptable, deepnets
from deeptables.datasets import dsutils
from sklearn.model_selection import train_test_split

#loading data
df = dsutils.load_bank()
df_train, df_test = train_test_split(df, test_size=0.2, random_state=42)

y = df_train.pop('y')
y_test = df_test.pop('y')

#training
config = deeptable.ModelConfig(nets=deepnets.DeepFM)
dt = deeptable.DeepTable(config=config)
model, history = dt.fit(df_train, y, epochs=10)

#evaluation
result = dt.evaluate(df_test,y_test, batch_size=512, verbose=0)
print(result)

#scoring
preds = dt.predict(df_test)

A solution using DeepTables to win the 1st place in Kaggle Categorical Feature Encoding Challenge II

Click here

Citation

If you use DeepTables in your research, please cite us as follows:

Jian Yang, Xuefeng Li, Haifeng Wu. DeepTables: A Deep Learning Python Package for Tabular Data. https://github.com/DataCanvasIO/DeepTables, 2022. Version 0.2.x.

BibTex:

@misc{deeptables,
  author={Jian Yang, Xuefeng Li, Haifeng Wu},
  title={{DeepTables}: { A Deep Learning Python Package for Tabular Data}},
  howpublished={https://github.com/DataCanvasIO/DeepTables},
  note={Version 0.2.x},
  year={2022}
}

DataCanvas

DeepTables is an open source project created by DataCanvas.

Metadata

Release files for deeptables 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deeptables 0.2.6
File Size Uploaded
deeptables-0.2.6.tar.gz 813.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deeptables 0.2.6
File Interpreter ABI Platform
deeptables-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 1.7 MB

Release files / deeptables-0.2.6.tar.gz

Download URL deeptables-0.2.6.tar.gz
Size 813.0 kB
Tags Source
SHA-256 checksum
How to use checksums
75d6c25863cd3371d2264c79033c759e163c356fd5752ea39956acef41fa96ca
BLAKE2b-256 checksum
How to use checksums
937a5af5a7dac832d386903dbbeaea1e9c995bbf76f6cbd0364a1fb2bd8456ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18

Release files / deeptables-0.2.6-py3-none-any.whl

Download URL deeptables-0.2.6-py3-none-any.whl
Size 842.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
651137abcc2b0b7c66abfb05119179ff7c0e949ad8ec1f504039fc5e8022620c
BLAKE2b-256 checksum
How to use checksums
926a7e5af82607cf58f00a91182e76b3f24653bfa62a57918a7d5550304d994b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18

Release history Release notifications | RSS feed

This release

0.2.6 This release

2 release files

0.2.5

2 release files

0.2.3

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.4

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page