项目作者: business-science

项目描述 :
Time Series Ensemble Forecasting
高级语言: R
项目地址: git://github.com/business-science/modeltime.ensemble.git
创建时间: 2020-09-21T01:21:00Z
项目社区:https://github.com/business-science/modeltime.ensemble

开源协议:Other

下载


modeltime.ensemble modeltime.ensemble website

CRAN_Status_Badge


R-CMD-check
Codecov test
coverage

Ensemble Algorithms for Time Series Forecasting with Modeltime

A modeltime extension that implements ensemble forecasting
methods
including model averaging, weighted averaging, and stacking.

Installation

Install the CRAN version:

  1. install.packages("modeltime.ensemble")

Or, install the development version:

  1. remotes::install_github("business-science/modeltime.ensemble")

Getting Started

  1. Getting Started with
    Modeltime
    :
    Learn the basics of forecasting with Modeltime.
  2. Getting Started with Modeltime
    Ensemble
    :
    Learn the basics of forecasting with Modeltime ensemble models.

Make Your First Ensemble in Minutes

Load the following libraries.

  1. library(tidymodels)
  2. library(modeltime)
  3. library(modeltime.ensemble)
  4. library(dplyr)
  5. library(timetk)

Step 1 - Create a Modeltime Table

Create a Modeltime Table using the modeltime package.

  1. m750_models
  2. #> # Modeltime Table
  3. #> # A tibble: 3 × 3
  4. #> .model_id .model .model_desc
  5. #> <int> <list> <chr>
  6. #> 1 1 <workflow> ARIMA(0,1,1)(0,1,1)[12]
  7. #> 2 2 <workflow> PROPHET
  8. #> 3 3 <workflow> GLMNET

Step 2 - Make a Modeltime Ensemble

Then turn that Modeltime Table into a Modeltime Ensemble.

  1. ensemble_fit <- m750_models %>%
  2. ensemble_average(type = "mean")
  3. ensemble_fit
  4. #> ── Modeltime Ensemble ───────────────────────────────────────────
  5. #> Ensemble of 3 Models (MEAN)
  6. #>
  7. #> # Modeltime Table
  8. #> # A tibble: 3 × 3
  9. #> .model_id .model .model_desc
  10. #> <int> <list> <chr>
  11. #> 1 1 <workflow> ARIMA(0,1,1)(0,1,1)[12]
  12. #> 2 2 <workflow> PROPHET
  13. #> 3 3 <workflow> GLMNET

Step 3 - Forecast!

To forecast, just follow the Modeltime
Workflow
.

  1. # Calibration
  2. calibration_tbl <- modeltime_table(
  3. ensemble_fit
  4. ) %>%
  5. modeltime_calibrate(testing(m750_splits), quiet = FALSE)
  6. # Forecast vs Test Set
  7. calibration_tbl %>%
  8. modeltime_forecast(
  9. new_data = testing(m750_splits),
  10. actual_data = m750
  11. ) %>%
  12. plot_modeltime_forecast(.interactive = FALSE)

Meet the modeltime ecosystem

Learn a growing ecosystem of forecasting packages



The modeltime ecosystem is growing


The modeltime ecosystem is growing



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:

  • Time Series Machine Learning (cutting-edge) with Modeltime - 30+
    Models (Prophet, ARIMA, XGBoost, Random Forest, & many more)
  • Deep Learning with GluonTS (Competition Winners)
  • Time Series Preprocessing, Noise Reduction, & Anomaly Detection
  • Feature engineering using lagged variables & external regressors
  • Hyperparameter Tuning
  • Time series cross-validation
  • Ensembling Multiple Machine Learning & Univariate Modeling
    Techniques (Competition Winner)
  • Scalable Forecasting - Forecast 1000+ time series in parallel
  • and more.


Become the Time Series Expert for your organization.





Take
the High-Performance Time Series Forecasting Course