Sigle-fold foldwise fit-predict function using a recurrent QRN
Source:R/QRN.R
QRN_seq_predict_foldwise_sep.Rd
Separated single-fold version of QRN_seq_predict_foldwise()
, for computation purposes.
Usage
QRN_seq_predict_foldwise_sep(
X,
y,
q_level,
n_folds = 3,
fold_todo = 1,
number_fits = 3,
seq_len = 10,
seed = NULL,
...
)
Arguments
- X
Matrix of covariates, for training. Entries must be in sequential order.
- y
Response variable vector to model the conditional quantile of, for training. Entries must be in sequential order.
- q_level
Probability level of the desired conditional quantiles to predict.
- n_folds
Number of folds.
- fold_todo
Index of the fold to do (integer in 1:n_folds).
- number_fits
Number of restarts, for stability.
- seq_len
Data sequence length (i.e. number of past observations) used during training to predict each response quantile.
- seed
Integer random seed for reproducibility in network weight initialization.
- ...
Other parameters given to
QRN_seq_fit()
.
Value
A named list containing the foldwise predictions and fits. It namely contains:
predictionsthe numerical vector of quantile predictions for each observation entry in y,
fitsa list containing the
"QRN_seq"
fitted networks for each fold,cutsthe fold cuts indices,
foldsa list of lists containing the train indices, validation indices and fold separations as a list for each fold setup,
n_foldsnumber of folds,
q_levelprobability level of the predicted quantiles,
train_lossesthe vector of train losses on each fold,
valid_lossesthe vector of validation losses on each fold,
min_valid_lossesthe minimal validation losses obtained on each fold,
min_valid_ethe epoch index of the minimal validation losses obtained on each fold.