https://github.com/pat-alt/deepvars
Vector Autoregression augmented with deep learning.
https://github.com/pat-alt/deepvars
deeplearning r tensorflow vectorautoregression
Last synced: 8 months ago
JSON representation
Vector Autoregression augmented with deep learning.
- Host: GitHub
- URL: https://github.com/pat-alt/deepvars
- Owner: pat-alt
- License: mit
- Created: 2020-03-23T13:37:38.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-17T06:45:36.000Z (over 2 years ago)
- Last Synced: 2025-04-22T14:14:46.882Z (about 1 year ago)
- Topics: deeplearning, r, tensorflow, vectorautoregression
- Language: TeX
- Homepage: https://pat-alt.github.io/deepvars/
- Size: 1.75 MB
- Stars: 16
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
- Citation: CITATION.cff
Awesome Lists containing this project
README
---
output: github_document
bibliography: bib.bib
suppress-bibliography: true
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
[](https://www.tidyverse.org/lifecycle/#experimental)
> [!WARNING]
> I worked on this code base during my master's project in 2021 and today it is no longer actively maintained. Since the TensorFlow interface uses reticulate, you may run into compatibility issues with Python dependencies (see [#4](https://github.com/pat-alt/deepvars/issues/4)). While these things should be salvageable and I welcome contributions through pull requests, I have no capacity to work on this package myself.
> [!NOTE]
> This is the repository for the companion package to our paper @altmeyer2021deep. We recently presented our paper at the [NeurIPS 2021 MLECON workshop](https://nips.cc/Conferences/2021/ScheduleMultitrack?event=21847). For the specific code used for the paper and additional resources please see [this repository](https://github.com/pat-alt/deepvarsMacro).
## `deepvars`
The `deepvars` package provides a framework for Deep Vector Autoregression in R. The methodology is based on [@altmeyer2021deep], a working paper initially prepared as part of the [Masters Degree in Data Science](https://bse.eu/study/masters-programs/data-science-methodology) at [Barcelona School of Economics](https://bse.eu). For a summary of the first version of the working paper see [here](https://thevoice.bse.eu/2021/09/16/deep-vector-autoregression-for-macroeconomic-data/).
## Installation
### Prerequisites
As one of its dependencies the `deepvars` uses `tensorflow`, which is an R interface to the popular [TensorFlow](https://www.tensorflow.org) library. We have tried to automate the TensorFlow configuration as explained [here](https://rstudio.github.io/reticulate/articles/python_dependencies.html).
```{r, eval=FALSE}
install.packages("tensorflow")
tensorflow::install_tensorflow()
```
For uncertainty quantification we use `tensorflow_probability` for Bayesian inference.
```{r, eval=FALSE}
install.packages("tfprobability")
tfprobability::install_tfprobability()
```
Should you run into issues you may have to manually install the TensorFlow dependencies. Detailed instructions to this end can be found [here](https://tensorflow.rstudio.com/installation/).
### Install
You can either clone this repository and install from source or simply run the below in R:
```{r, eval=FALSE}
devtools::install_github("pat-alt/deepvars", build_vignettes=TRUE)
library(deepvars)
```
## Getting started
Full documentation of the package is still a work-in-progress. In the meantime, detailed guidance on different topics and estimation methods covered by `deepvars`, can be found in the vignettes. Simply type the following command once you have completed the steps above:
```{r, eval=FALSE}
utils::browseVignettes('deepvars')
```