

Pytorch Tabular vise à rendre l'apprentissage en profondeur avec des données tabulaires faciles et accessibles aux cas et aux recherches du monde réel. Les principes fondamentaux derrière la conception de la bibliothèque sont:
Il a été construit sur les épaules de géants comme Pytorch (évidemment) et Pytorch Lightning .
Bien que l'installation comprenne Pytorch, le moyen le meilleur et recommandé est d'installer d'abord Pytorch à partir d'ici, en ramassant la bonne version CUDA pour votre machine.
Une fois, vous avez installé Pytorch, utilisez simplement:
pip install -U “pytorch_tabular[extra]”Pour installer la bibliothèque complète avec des dépendances supplémentaires (poids et biais et tracé).
Et :
pip install -U “pytorch_tabular”pour les éléments essentiels nus.
Les sources de pytorch_tabular peuvent être téléchargées à partir du Github repo _.
Vous pouvez soit cloner le référentiel public:
git clone git://github.com/manujosephv/pytorch_tabularUne fois que vous avez une copie de la source, vous pouvez l'installer avec:
cd pytorch_tabular && pip install .[extra]Pour une documentation complète avec des tutoriels, visitez ReadTheDocs
Apprentissage semi-supervisé
Pour implémenter de nouveaux modèles, consultez le tutoriel How to Implexe New Models. Il couvre les architectures de base et avancées.
from pytorch_tabular import TabularModel
from pytorch_tabular . models import CategoryEmbeddingModelConfig
from pytorch_tabular . config import (
DataConfig ,
OptimizerConfig ,
TrainerConfig ,
ExperimentConfig ,
)
data_config = DataConfig (
target = [
"target"
], # target should always be a list.
continuous_cols = num_col_names ,
categorical_cols = cat_col_names ,
)
trainer_config = TrainerConfig (
auto_lr_find = True , # Runs the LRFinder to automatically derive a learning rate
batch_size = 1024 ,
max_epochs = 100 ,
)
optimizer_config = OptimizerConfig ()
model_config = CategoryEmbeddingModelConfig (
task = "classification" ,
layers = "1024-512-512" , # Number of nodes in each layer
activation = "LeakyReLU" , # Activation between each layers
learning_rate = 1e-3 ,
)
tabular_model = TabularModel (
data_config = data_config ,
model_config = model_config ,
optimizer_config = optimizer_config ,
trainer_config = trainer_config ,
)
tabular_model . fit ( train = train , validation = val )
result = tabular_model . evaluate ( test )
pred_df = tabular_model . predict ( test )
tabular_model . save_model ( "examples/basic" )
loaded_model = TabularModel . load_model ( "examples/basic" )Manu Joseph | Jirka Borovec | Jinu Sunil | Programme artificiel | Soren Macbeth | Chris Fonnesbeck |
Snehil Chatterjee | Nul | Abhishar Sinha | Andreas | Charitarh Chugh | Earlee |
Nul | Kushashwa Ravi Shrimali | Luca Actis Grosso | Sterling G. Baird | Teck Meng | Yinyu nie |
Yonybreler | Liu Zhen |
Si vous utilisez Pytorch Tabular pour une publication scientifique, nous apprécierions les citations du logiciel publié et du document suivant:
@misc{joseph2021pytorch,
title={PyTorch Tabular: A Framework for Deep Learning with Tabular Data},
author={Manu Joseph},
year={2021},
eprint={2104.13638},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
@software{manu_joseph_2023_7554473,
author = {Manu Joseph and
Jinu Sunil and
Jiri Borovec and
Chris Fonnesbeck and
jxtrbtk and
Andreas and
JulianRein and
Kushashwa Ravi Shrimali and
Luca Actis Grosso and
Sterling G. Baird and
Yinyu Nie},
title = {manujosephv/pytorch_tabular: v1.0.1},
month = jan,
year = 2023,
publisher = {Zenodo},
version = {v1.0.1},
doi = {10.5281/zenodo.7554473},
url = {https://doi.org/10.5281/zenodo.7554473}
}