gtop: Reconciliate individual predictions using GTOP

Description Usage Arguments Details Value Examples

Description

Uses a Game Theory approach to reconciliate hierarchical time series predicitons

Usage

1
2
gtop(preds_indiv, pred_total, weights_indiv, weight_total, bounds_indiv,
  solver = "quad")

Arguments

preds_indiv

vector contains the individual predictions

pred_total

prediction for the sum of individuals

weights_indiv

vector, contains the weights of the individuals

weight_total

weight of the total

bounds_indiv

vector, contains the bounds of the individuals

solver

string, use quadratic programming (quad) or Lasso-like solvers (lasso)

Details

In hierarchical time series forecasts, one predicts individuals quantities and a global quantity. There exists a contraint that matches the sum of the individual quantities to the global quantity. However, forecasting models don't take into account this constraint. With GTOP you can reconciliate the individual and global quantities in order to match the aggregate consistency contraint.

Value

A list with

  • pred_indivs the reconciliated predictions for the individuals and the total,

  • solution the solution to the associate minimisation problem.

Examples

1
2
3
4
5
6
7
8
K <- 5
indiv <- rep(0, K)
total <- 1
gtop(preds_indiv   = indiv,
     pred_total = total,
     weights_indiv = rep(1, K),
     weight_total = 2,
     bounds_indiv  = rep(1 / K, K))


Search within the gtop package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.