Python 3: DT requires Python version 3.6 or 3.7.
Tensorflow >= 2.0.0: DT is based on TensorFlow. Please follow this tutorial to install TensorFlow for python3.
pip is recommended to install DeepTables:
pip install tensorflow==2.4.2 deeptables
- Tensorflow is required by DeepTables, install it before running DeepTables.
- DeepTables was tested with TensorFlow version 2.0 to 2.4, install the tested version please.
GPU Setup (Optional)
To use DeepTables with GPU devices, install
tensorflow-gpu instead of
pip install tensorflow-gpu==2.4.2 deeptables
Verify the installation:
python -c "from deeptables.utils.quicktest import test; test()"
Launch a DeepTables Docker Container¶
You can also quickly try DeepTables through the Docker:
- Pull a DeepTables image (optional).
- Launch Docker container.
Pull the latest image:
docker pull datacanvas/deeptables-example
Then launch Docker container with this command line:
docker run -it -p 8830:8888 -e NotebookToken="your-token" datacanvas/deeptables-example
The value “your-token” is a user specified string for the notebook and can be empty.
As a result, notebook server should be running at: https://host-ip-address:8830?token=your-token Launch a browser and connect to that URL you will see the Jupyter Notebook like this:
Getting started: 5 lines to DT¶
DT can be use to solve classification and regression prediction problems on tabular data.
DT supports these tasks with extremely simple interface without dealing with data cleaning and feature engineering. You don’t even specify the task type, DT will automatically infer.
from deeptables.models.deeptable import DeepTable, ModelConfig from deeptables.models.deepnets import DeepFM dt = DeepTable(ModelConfig(nets=DeepFM)) dt.fit(X, y) preds = dt.predict(X_test)
DT has several build-in datasets for the demos or testing which covered binary classification, multi-class classification and regression task. All datasets are accessed through
Associated Tasks: Binary Classification
Predict whether income exceeds $50K/yr based on census data. Also known as “Census Income” dataset.
from deeptables.datasets import dsutils df = dsutils.load_adult()
Associated Tasks: Multi-class Classification
From USA Forensic Science Service; 6 types of glass; defined in terms of their oxide content (i.e. Na, Fe, K, etc)
from deeptables.datasets import dsutils df = dsutils.load_glass_uci()
Associated Tasks: Regression
from deeptables.datasets import dsutils df = dsutils.load_boston()