Skip to contents

Fitting EQRN Tail Neural Networks

Functions to fit a tail GPD EQRN network to intermediate quantile exceedences

EQRN_fit_restart()
Wrapper for fitting EQRN with restart for stability
EQRN_fit()
EQRN fit function for independent data
EQRN_fit_seq()
EQRN fit function for sequential and time series data

Predicting using fitted EQRN networks

EQRN_predict()
Predict function for an EQRN_iid fitted object
EQRN_predict_seq()
Predict function for an EQRN_seq fitted object
EQRN_predict_params()
GPD parameters prediction function for an EQRN_iid fitted object
EQRN_predict_params_seq()
GPD parameters prediction function for an EQRN_seq fitted object
EQRN_excess_probability()
Tail excess probability prediction using an EQRN_iid object
EQRN_excess_probability_seq()
Tail excess probability prediction using an EQRN_seq object
compute_EQRN_GPDLoss()
Generalized Pareto likelihood loss of a EQRN_iid predictor
compute_EQRN_seq_GPDLoss()
Generalized Pareto likelihood loss of a EQRN_seq predictor

Saving and Loading

EQRN_save()
Save an EQRN object on disc
EQRN_load()
Load an EQRN object from disc

Neural Networks Helpers

install_backend()
Install Torch Backend
default_device()
Default torch device
loss_GPD_tensor()
GPD tensor loss function for training a EQRN network
quantile_loss_tensor()
Tensor quantile loss function for training a QRN network
get_excesses()
Computes rescaled excesses over the conditional quantiles
process_features()
Feature processor for EQRN
perform_scaling()
Performs feature scaling without overfitting
mts_dataset()
Dataset creator for sequential data
FC_GPD_net()
MLP module for GPD parameter prediction
FC_GPD_SNN()
Self-normalized fully-connected network module for GPD parameter prediction
Separated_GPD_SNN()
Self-normalized separated network module for GPD parameter prediction
Recurrent_GPD_net()
Recurrent network module for GPD parameter prediction
QRNN_RNN_net()
Recurrent quantile regression neural network module

Extreme Value Analysis Helpers

GPD_excess_probability()
Tail excess probability prediction based on conditional GPD parameters
fit_GPD_unconditional()
Maximum likelihood estimates for the GPD distribution using peaks over threshold
predict_unconditional_quantiles()
Predict unconditional extreme quantiles using peaks over threshold
predict_GPD_semiconditional()
Predict semi-conditional extreme quantiles using peaks over threshold
loss_GPD()
Generalized Pareto likelihood loss
unconditional_train_valid_GPD_loss()
Unconditional GPD MLEs and their train-validation likelihoods
semiconditional_train_valid_GPD_loss()
Semi-conditional GPD MLEs and their train-validation likelihoods
GPD_quantiles()
Compute extreme quantile from GPD parameters

Intermediate Models

QRN_seq_fit()
Recurrent QRN fitting function
QRN_fit_multiple()
Wrapper for fitting a recurrent QRN with restart for stability
QRN_seq_predict()
Predict function for a QRN_seq fitted object
QRN_seq_predict_foldwise()
Foldwise fit-predict function using a recurrent QRN
QRN_seq_predict_foldwise_sep()
Sigle-fold foldwise fit-predict function using a recurrent QRN

Accuracy metrics

mean_squared_error()
Mean squared error
mean_absolute_error()
Mean absolute error
square_loss()
Square loss
quantile_loss()
Quantile loss
prediction_bias()
Prediction bias
prediction_residual_variance()
Prediction residual variance
R_squared()
R squared
proportion_below()
Proportion of observations below conditional quantile vector
quantile_prediction_error()
Quantile prediction calibration error
quantile_exceedance_proba_error()
Quantile exceedance probability prediction calibration error
multilevel_MSE()
Multilevel quantile MSEs
multilevel_MAE()
Multilevel quantile MAEs
multilevel_q_loss()
Multilevel quantile losses
multilevel_pred_bias()
Multilevel prediction bias
multilevel_resid_var()
Multilevel residual variance
multilevel_R_squared()
Multilevel R squared
multilevel_prop_below()
Multilevel 'proportion_below'
multilevel_q_pred_error()
Multilevel 'quantile_prediction_error'
multilevel_exceedance_proba_error()
Multilevel 'quantile_exceedance_proba_error'

Other Helpers

check_directory()
Check directory existence
safe_save_rds()
Safe RDS save
last_elem()
Last element of a vector
roundm()
Mathematical number rounding
vec2mat()
Convert a vector to a matrix
make_folds()
Create cross-validation folds
lagged_features()
Covariate lagged replication for temporal dependence
vector_insert()
Insert value in vector
get_doFuture_operator()
Get doFuture operator
set_doFuture_strategy()
Set a doFuture execution strategy
end_doFuture_strategy()
End the currently set doFuture strategy

Prediction methods

S3 class method support for classes EQRN_iid, EQRN_seq and QRN_seq, and methods predict and excess_probability, as a facultative alternative to their respective functions above.

predict(<EQRN_iid>)
Predict method for an EQRN_iid fitted object
predict(<EQRN_seq>)
Predict method for an EQRN_seq fitted object
predict(<QRN_seq>)
Predict method for a QRN_seq fitted object
excess_probability()
Excess Probability Predictions
excess_probability(<EQRN_iid>)
Tail excess probability prediction method using an EQRN_iid object
excess_probability(<EQRN_seq>)
Tail excess probability prediction method using an EQRN_iid object