knitr::opts_chunk$set(
  collapse = TRUE,
  message = F, 
  warning = F, 
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "90%",
  fig.align = "center"
)

modeltime.gluonts modeltime.gluonts website

CRAN_Status_Badge Codecov test coverage R-CMD-check

GluonTS Deep Learning in R.

GluonTS Deep Learning in R

Modeltime GluonTS integrates the Python GluonTS Deep Learning Library, making it easy to develop forecasts using Deep Learning for those that are comfortable with the Modeltime Forecasting Workflow.

knitr::include_graphics("man/figures/m4_hourly_forecast.jpg")

Installation Requirements

Important: This package is being maintained on GitHub (not CRAN). Please install the GitHub version, which is updated with the latest features:

# Install GitHub Version 
remotes::install_github("business-science/modeltime.gluonts")

# Install Python Dependencies
modeltime.gluonts::install_gluonts()

For more detailed installation instructions and troubleshooting guidance, visit our Installation Guide.

Make Your First DeepAR Model

Make your first deep_ar() model, which connects to the GluonTS DeepAREstimator(). For a more detailed walkthough, visit our Getting Started Guide.

library(modeltime.gluonts)
library(tidymodels)
library(tidyverse)

# Fit a GluonTS DeepAR Model
model_fit_deepar <- deep_ar(
    id                    = "id",
    freq                  = "M",
    prediction_length     = 24,
    lookback_length       = 48,
    epochs                = 5
) %>%
    set_engine("gluonts_deepar") %>%
    fit(value ~ ., training(m750_splits))

# Forecast with 95% Confidence Interval
modeltime_table(
    model_fit_deepar
) %>%
    modeltime_calibrate(new_data = testing(m750_splits)) %>%
    modeltime_forecast(
        new_data      = testing(m750_splits),
        actual_data   = m750,
        conf_interval = 0.95
    ) %>%
    plot_modeltime_forecast(.interactive = FALSE)
knitr::include_graphics("man/figures/deepar_example_1.png")

Meet the modeltime ecosystem

Learn a growing ecosystem of forecasting packages

knitr::include_graphics("man/figures/modeltime_ecosystem.jpg")

Modeltime is part of a growing ecosystem of Modeltime forecasting packages.

Take the High-Performance Forecasting Course

Become the forecasting expert for your organization

High-Performance Time Series Forecasting Course

High-Performance Time Series Course

Time Series is Changing

Time series is changing. Businesses now need 10,000+ time series forecasts every day. This is what I call a High-Performance Time Series Forecasting System (HPTSF) - Accurate, Robust, and Scalable Forecasting.

High-Performance Forecasting Systems will save companies by improving accuracy and scalability. Imagine what will happen to your career if you can provide your organization a "High-Performance Time Series Forecasting System" (HPTSF System).

How to Learn High-Performance Time Series Forecasting

I teach how to build a HPTFS System in my High-Performance Time Series Forecasting Course. You will learn:

Become the Time Series Expert for your organization.


Take the High-Performance Time Series Forecasting Course



business-science/modeltime.gluonts documentation built on Jan. 20, 2024, 3:59 a.m.