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
<h1>DeepTabular: Tabular Deep Learning Made Simple</h1>
19
+
<h1>deeptab: Tabular Deep Learning Made Simple</h1>
20
20
</div>
21
21
22
-
DeepTabular is a Python library for tabular deep learning. It includes models that leverage the Mamba (State Space Model) architecture, as well as other popular models like TabTransformer, FTTransformer, TabM and tabular ResNets. Check out our paper `Mambular: A Sequential Model for Tabular Deep Learning`, available [here](https://arxiv.org/abs/2408.06291). Also check out our paper introducing [TabulaRNN](https://arxiv.org/pdf/2411.17207) and analyzing the efficiency of NLP inspired tabular models.
22
+
deeptab is a Python library for tabular deep learning. It includes models that leverage the Mamba (State Space Model) architecture, as well as other popular models like TabTransformer, FTTransformer, TabM and tabular ResNets. Check out our paper `Mambular: A Sequential Model for Tabular Deep Learning`, available [here](https://arxiv.org/abs/2408.06291). Also check out our paper introducing [TabulaRNN](https://arxiv.org/pdf/2411.17207) and analyzing the efficiency of NLP inspired tabular models.
23
23
24
24
<h3>⚡ What's New ⚡</h3>
25
25
<ul>
@@ -48,10 +48,10 @@ DeepTabular is a Python library for tabular deep learning. It includes models th
48
48
49
49
50
50
# 🏃 Quickstart
51
-
Similar to any sklearn model, DeepTabular models can be fit as easy as this:
51
+
Similar to any sklearn model, deeptab models can be fit as easy as this:
52
52
53
53
```python
54
-
fromdeeptabular.models import MambularClassifier
54
+
fromdeeptab.models import MambularClassifier
55
55
# Initialize and fit your model
56
56
model = MambularClassifier()
57
57
@@ -60,7 +60,7 @@ model.fit(X, y, max_epochs=150, lr=1e-04)
60
60
```
61
61
62
62
# 📖 Introduction
63
-
DeepTabular is a Python package that brings the power of advanced deep learning architectures to tabular data, offering a suite of models for regression, classification, and distributional regression tasks. Designed with ease of use in mind, DeepTabular models adhere to scikit-learn's `BaseEstimator` interface, making them highly compatible with the familiar scikit-learn ecosystem. This means you can fit, predict, and evaluate using DeepTabular models just as you would with any traditional scikit-learn model, but with the added performance and flexibility of deep learning.
63
+
deeptab is a Python package that brings the power of advanced deep learning architectures to tabular data, offering a suite of models for regression, classification, and distributional regression tasks. Designed with ease of use in mind, deeptab models adhere to scikit-learn's `BaseEstimator` interface, making them highly compatible with the familiar scikit-learn ecosystem. This means you can fit, predict, and evaluate using deeptab models just as you would with any traditional scikit-learn model, but with the added performance and flexibility of deep learning.
64
64
65
65
66
66
# 🤖 Models
@@ -94,13 +94,13 @@ Hence, they are available as e.g. `MambularRegressor`, `MambularClassifier` or `
94
94
95
95
# 📚 Documentation
96
96
97
-
You can find the DeepTabular API documentation [here](https://deeptabular.readthedocs.io/en/latest/).
97
+
You can find the deeptab API documentation [here](https://deeptab.readthedocs.io/en/latest/).
98
98
99
99
# 🛠️ Installation
100
100
101
-
Install DeepTabular using pip:
101
+
Install deeptab using pip:
102
102
```sh
103
-
pip install deeptabular
103
+
pip install deeptab
104
104
```
105
105
106
106
If you want to use the original mamba and mamba2 implementations, additionally install mamba-ssm via:
Hence, datatypes etc. are detected automatically and all preprocessing methods from pretab as well as from Sklearn.preprocessing are available.
126
126
Additionally, you can specify that each feature is preprocessed differently, according to your requirements, by setting the `feature_preprocessing={}`argument during model initialization.
@@ -144,10 +144,10 @@ For an overview over all available methods: [pretab](https://github.com/OpenTabu
144
144
145
145
146
146
<h2> Fit a Model </h2>
147
-
Fitting a model in deeptabular is as simple as it gets. All models in deeptabular are sklearn BaseEstimators. Thus the `.fit` method is implemented for all of them. Additionally, this allows for using all other sklearn inherent methods such as their built in hyperparameter optimization tools.
147
+
Fitting a model in deeptab is as simple as it gets. All models in deeptab are sklearn BaseEstimators. Thus the `.fit` method is implemented for all of them. Additionally, this allows for using all other sklearn inherent methods such as their built in hyperparameter optimization tools.
148
148
149
149
```python
150
-
fromdeeptabular.models import MambularClassifier
150
+
fromdeeptab.models import MambularClassifier
151
151
# Initialize and fit your model
152
152
model = MambularClassifier(
153
153
d_model=64,
@@ -243,12 +243,12 @@ Or use the built-in bayesian hpo simply by running:
243
243
best_params = model.optimize_hparams(X, y)
244
244
```
245
245
246
-
This automatically sets the search space based on the default config from ``deeptabular.configs``. See the documentation for all params with regard to ``optimize_hparams()``. However, the preprocessor arguments are fixed and cannot be optimized here.
246
+
This automatically sets the search space based on the default config from ``deeptab.configs``. See the documentation for all params with regard to ``optimize_hparams()``. However, the preprocessor arguments are fixed and cannot be optimized here.
247
247
248
248
249
249
<h2> ⚖️ Distributional Regression with MambularLSS </h2>
250
250
251
-
MambularLSS allows you to model the full distribution of a response variable, not just its mean. This is crucial when understanding variability, skewness, or kurtosis is important. All DeepTabular models are available as distributional models.
251
+
MambularLSS allows you to model the full distribution of a response variable, not just its mean. This is crucial when understanding variability, skewness, or kurtosis is important. All deeptab models are available as distributional models.
252
252
253
253
<h3> Key Features of MambularLSS: </h3>
254
254
@@ -277,10 +277,10 @@ These distribution classes make MambularLSS versatile in modeling various data t
277
277
278
278
<h3> Getting Started with MambularLSS: </h3>
279
279
280
-
To integrate distributional regression into your workflow with `MambularLSS`, start by initializing the model with your desired configuration, similar to other DeepTabular models:
280
+
To integrate distributional regression into your workflow with `MambularLSS`, start by initializing the model with your desired configuration, similar to other deeptab models:
281
281
282
282
```python
283
-
fromdeeptabular.models import MambularLSS
283
+
fromdeeptab.models import MambularLSS
284
284
285
285
# Initialize the MambularLSS model
286
286
model = MambularLSS(
@@ -305,18 +305,18 @@ model.fit(
305
305
306
306
# 💻 Implement Your Own Model
307
307
308
-
DeepTabular allows users to easily integrate their custom models into the existing logic. This process is designed to be straightforward, making it simple to create a PyTorch model and define its forward pass. Instead of inheriting from `nn.Module`, you inherit from DeepTabular's `BaseModel`. Each DeepTabular model takes three main arguments: the number of classes (e.g., 1 for regression or 2 for binary classification), `cat_feature_info`, and `num_feature_info` for categorical and numerical feature information, respectively. Additionally, you can provide a config argument, which can either be a custom configuration or one of the provided default configs.
308
+
deeptab allows users to easily integrate their custom models into the existing logic. This process is designed to be straightforward, making it simple to create a PyTorch model and define its forward pass. Instead of inheriting from `nn.Module`, you inherit from deeptab's `BaseModel`. Each deeptab model takes three main arguments: the number of classes (e.g., 1 for regression or 2 for binary classification), `cat_feature_info`, and `num_feature_info` for categorical and numerical feature information, respectively. Additionally, you can provide a config argument, which can either be a custom configuration or one of the provided default configs.
309
309
310
-
One of the key advantages of using DeepTabular is that the inputs to the forward passes are lists of tensors. While this might be unconventional, it is highly beneficial for models that treat different data types differently. For example, the TabTransformer model leverages this feature to handle categorical and numerical data separately, applying different transformations and processing steps to each type of data.
310
+
One of the key advantages of using deeptab is that the inputs to the forward passes are lists of tensors. While this might be unconventional, it is highly beneficial for models that treat different data types differently. For example, the TabTransformer model leverages this feature to handle categorical and numerical data separately, applying different transformations and processing steps to each type of data.
311
311
312
-
Here's how you can implement a custom model with DeepTabular:
312
+
Here's how you can implement a custom model with deeptab:
313
313
314
314
1.**First, define your config:**
315
315
The configuration class allows you to specify hyperparameters and other settings for your model. This can be done using a simple dataclass.
316
316
317
317
```python
318
318
from dataclasses import dataclass
319
-
fromdeeptabular.configs import BaseConfig
319
+
fromdeeptab.configs import BaseConfig
320
320
321
321
@dataclass
322
322
classMyConfig(BaseConfig):
@@ -332,8 +332,8 @@ Here's how you can implement a custom model with DeepTabular:
332
332
Define your custom model just as you would for an `nn.Module`. The main difference is that you will inherit from `BaseModel` and use the provided feature information to construct your layers. To integrate your model into the existing API, you only need to define the architecture and the forward pass.
@@ -372,19 +372,19 @@ Here's how you can implement a custom model with DeepTabular:
372
372
return output
373
373
```
374
374
375
-
3.**Leverage the DeepTabular API:**
376
-
You can build a regression, classification, or distributional regression model that can leverage all of DeepTabular's built-in methods by using the following:
375
+
3.**Leverage the deeptab API:**
376
+
You can build a regression, classification, or distributional regression model that can leverage all of deeptab's built-in methods by using the following:
You can now fit, evaluate, and predict with your custom model just like with any other DeepTabular model. For classification or distributional regression, inherit from `SklearnBaseClassifier` or `SklearnBaseLSS` respectively.
387
+
You can now fit, evaluate, and predict with your custom model just like with any other deeptab model. For classification or distributional regression, inherit from `SklearnBaseClassifier` or `SklearnBaseLSS` respectively.
0 commit comments