Learn R Programming

modeltime.gluonts (version 0.1.0)

to_gluon_list_dataset: Convert a data frame to a GluonTS ListDataset

Description

A ListDataset is the format required by GluonTS. This function simplifies creating a GluonTS ListDataset.

Usage

to_gluon_list_dataset(data, date_var, value_var, id_var = NULL, freq = "D")

Arguments

data

A data.frame

date_var

The date column (Timestamps)

value_var

The value column (Target)

id_var

The Time Series ID column for tracking time series in GluonTS

freq

the Pandas Timestamp Frequency.

Examples

Run this code
# NOT RUN {
library(timetk)

m4_daily %>%
    to_gluon_list_dataset(
        date_var  = date,
        value_var = value,
        id_var    = id,
        freq      = "D"
    )
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab