knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

M4comp2018

The R package M4comp2018 contains the 100000 time series from the M4-competition. It also includes the true future values (the test part) and the submitted forecasts of the top25 participants.

Installation

install.packages("https://github.com/carlanetto/M4comp2018/releases/download/0.2.0/M4comp2018_0.2.0.tar.gz",
                 repos=NULL)

Example

The M4 object is a list with the series. Each element of this list is also a list with some components, like the series, the future values, type and domain and the submitted forecasts.

## check the components of the least
library(M4comp2018)
data(M4)
names(M4[[1]])
#extract yearly series
yearly_M4 <- Filter(function(l) l$period == "Yearly", M4)
#plot one of the series, in red the future data
#in black, the hitorical data
plot(ts(c(M4[[40773]]$x, M4[[40773]]$xx),
        start=start(M4[[40773]]$x), frequency = frequency(M4[[40773]]$x)),
        col="red", type="l", ylab="")
lines(M4[[40773]]$x, col="black")
#read the help file for documentation
?M4comp2018

You can check the point forecasts subissions in the $pt_ff of each element of the list. Info about the submissions is in the submission_info dataframe, the order of $pt_ff is the OWA ranking. Upper and Lower bound prediction intervals are found in $up_ff and $low_ff respectively.

?submission_info
M4[[1]]$pt_ff[1:3, ]
data(submission_info)
#check some info about top 3 sumbissions
submission_info[1:3,]

License

This package is free and open source software, licensed under GPL-3



carlanetto/Mcomp2018 documentation built on June 13, 2019, 3:44 p.m.