Temporal Encoder-Masked Probabilistic Ensemble Regressor

Implements a probabilistic ensemble time-series forecaster that combines an auto-encoder with a neural decision forest whose split variables are learned through a differentiable feature-mask layer. Functions are written with 'torch' tensors and provide continuous ranked probability score training, empirical or mixture forecast distributions, and optional forecast calibration.


temper

temper fits a probabilistic time-series forecasting model using a temporal encoder and a masked neural decision forest trained with the continuous ranked probability score. It returns forecast distribution functions and plots.

Installation

Install the released package from CRAN with install.packages("temper"). The development source in this folder can be installed from RStudio using Build > Install and Restart, or built with R CMD build . and installed from the resulting source archive. The torch package also requires its LibTorch and LibLantern libraries; see the torch installation guide.

Example

library(temper)
set.seed(2025)
x <- 100 + cumsum(rnorm(250))
fit <- temper(x, future = 3, epochs = 2, verbose = FALSE)
fit$pred_funs$t3$qfun(c(0.1, 0.5, 0.9))
paths <- fit$path_prediction(100)  # 100 complete paths, one per row
plot(fit$plot)

The default fit uses 60 epochs; this short example uses two for speed. Version 2.0 changes several model defaults and forecasting behavior compared with the CRAN 1.1.1 release. See NEWS.md and ?temper for details.

Paths are sampled with replacement from the finite forest ensemble. If the optional mixture distribution is selected, path samples remain empirical and do not have the smoothed marginal distributions returned by pred_funs.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("temper")

2.0 by Giancarlo Vercellino, 2 days ago


https://rpubs.com/giancarlo_vercellino/temper


Browse source code at https://github.com/cran/temper


Authors: Giancarlo Vercellino [aut, cre, cph]


Documentation:   PDF Manual  


GPL-3 license


Imports torch, purrr, imputeTS, lubridate, ggplot2, scales

Suggests knitr, rmarkdown, testthat


See at CRAN