EQRN R Package

EQRN: Extreme Quantile Regression Neural Networks for Conditionnal Risk Prediction

CRAN status R-CMD-check

EQRN is a framework for forecasting and extrapolating measures of conditional risk (e.g. of extreme or unprecedented events), including quantiles and exceedance probabilities, using extreme value statistics and flexible neural network architectures. It allows for capturing complex multivariate dependencies, including dependencies between observations, such as sequential (time) dependence. This implementation is based on the methodology introduced in Pasche and Engelke (2024) [doi, pdf, suppl.].

Motivation

Risk assessment for extreme events requires accurate estimation of high quantiles that go beyond the range of historical observations. When the risk depends on the values of observed predictors, regression techniques are used to interpolate in the predictor space. In this package we propose the EQRN model that combines tools from neural networks and extreme value theory into a method capable of extrapolation in the presence of complex predictor dependence. Neural networks can naturally incorporate additional structure in the data. The recurrent version of EQRN is able to capture complex sequential dependence in time series.

In the corresponding article, EQRN is applied to forecasting of flood risk in the Swiss Aare catchment. It exploits information from multiple covariates in space and time to provide one-day-ahead predictions of return levels and exceedances probabilities. This output complements the static return level from a traditional extreme value analysis and the predictions are able to adapt to distributional shifts as experienced in a changing climate. Our model can help authorities to manage flooding more effectively and to minimize their disastrous impacts through early warning systems.

EQRN documentation: https://opasche.github.io/EQRN/
CRAN page: https://cran.r-project.org/package=EQRN, (doi:10.32614/CRAN.package.EQRN). EQRN source code: https://github.com/opasche/EQRN

Related article:: https://doi.org/10.1214/24-AOAS1907 (Article PDF, Supplementary material)

Installation

To install EQRN from CRAN, simply run from R:

install.packages("EQRN")

Or, to install the development version of EQRN, run:

# install.packages("devtools")
devtools::install_github("opasche/EQRN")

When the package is first loaded interactively after installation (e.g. with library(EQRN) or with any EQRN::fct()), the necessary backend software from the torch dependency is automatically installed. Alternatively, EQRN::install_backend() can be called to perform the backend installation manually (necessary for non-interactive environments). For more information about the torch backend and troubleshooting, visit the torch installation guide.