deepregression now has an engine argument that allows the support of torch!
This is a refactored version of the old deepregression package.
To install the package, use the following command:
devtools::install_github("neural-structured-additive-learning/deepregression")Note that the installation requires additional packages (see below) and their installation is currently forced by deepregression.
The requirements are given in the DESCRIPTION. If you load the package manually using devtools::load_all, make sure the following packages are availabe:
- Matrix
- dplyr
- mgcv
If you have problems with TensorFlow and these cannot be solved with our check_and_install function nor with the comments mentioned below, consider using our torch engine instead.
If R does not find Python or installed Python packages, check if the Python version and environment in R is set to the correct path. You can find your Python installations e.g. like this. To check if all the modules have been installed correctly -- just as a sanity check, because you can do the installation of modules also from inside R using reticulate::py_install -- you can use pip freeze other similar approaches. Finally, to check whether R also uses the Python version and environment you have installed all those modules into, you can force R to use a specific Python version using
reticulate::use_python("path/to/python/path", required = TRUE)directly after starting your R session. Similar, you can force the usage of a virtual environment
reticulate::use_virtualenv("path/to/venv", required = TRUE)or Conda environment
reticulate::use_condaenv("path/to/condaenv", required = TRUE)again, directly after starting your R session.
For the methodology, please cite the following preprint:
@article{rugamer2020unifying,
title={Semi-Structured Distributional Regression},
author={R{\"u}gamer, David and Kolb, Chris and Klein, Nadja},
journal={The American Statistician},
year={2023},
note={Accepted}
}
For the software, please cite:
@article{rugamer2021deepregression,
title={deepregression: a Flexible Neural Network Framework for Semi-Structured Deep Distributional Regression},
author={David R{\"u}gamer and Chris Kolb and Cornelius Fritz and Florian Pfisterer and Philipp Kopper and Bernd Bischl and Ruolin Shen and Christina Bukas and Lisa Barros de Andrade e Sousa and Dominik Thalmeier and Philipp Baumann and Lucas Kook and Nadja Klein and Christian L. M{\"u}ller},
year={2022},
eprint={2104.02705},
archivePrefix={arXiv},
journal={Journal of Statistical Software},
note={Accepted}
}
See recent our Vignette / Tutorial paper on arXiv.
A Python version of the package is available here.
The following works are based on the ideas implemented in this package:
- Original Semi-Structured Deep Distributional Regression Proposal
- Neural Mixture Distributional Regression
- Deep Conditional Transformation Models
- Semi-Structured Deep Piecewise Exponential Models
- Combining Graph Neural Networks and Spatio-temporal Disease Models to Predict COVID-19 Cases in Germany
Many thanks to following people for helpful comments, issues, suggestions for improvements and discussions:
- Andreas Bender
- Christina Bukas
- Oliver Duerr
- Maarten Jung
- Patrick Kaiser
- Nadja Klein
- Philipp Kopper
- Christian Mueller
- Julian Raith
- Fabian Scheipl
- Matthias Schmid
- Max Schneider
- Ruolin Shen
- Almond Stoecker
- Dominik Thalmeier
- Viet Tran
- Kang Yang