Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/business-science/modeltime.resample

Resampling Tools for Time Series Forecasting with Modeltime
https://github.com/business-science/modeltime.resample

accuracy-metrics backtesting bootstrap bootstrapping cross-validation forecasting modeltime modeltime-resample r-package resampling statistics tidymodels time-series

Last synced: 3 days ago
JSON representation

Resampling Tools for Time Series Forecasting with Modeltime

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
message = F,
warning = F,
paged.print = FALSE,
fig.path = "man/figures/README-",
# out.width = "100%"
fig.align = 'center'
)

library(modeltime)
library(modeltime.resample)
```

# modeltime.resample modeltime.resample website

[![CRAN status](https://www.r-pkg.org/badges/version/modeltime.resample)](https://CRAN.R-project.org/package=modeltime.resample)
![](http://cranlogs.r-pkg.org/badges/modeltime.resample?color=brightgreen)
![](http://cranlogs.r-pkg.org/badges/grand-total/modeltime.resample?color=brightgreen)
[![R-CMD-check](https://github.com/business-science/modeltime.resample/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/business-science/modeltime.resample/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/business-science/modeltime.resample/branch/master/graph/badge.svg)](https://app.codecov.io/gh/business-science/modeltime.resample?branch=master)

> __Model Performance and Stability Assessment Tools__ for Single Time Series, Panel Data, & Cross-Sectional Time Series Analysis

A `modeltime` extension that implements ___forecast resampling tools___ that assess __time-based model performance and stability__ for a single time series, panel data, and cross-sectional time series analysis.

```{r, echo=F, out.width='100%'}
knitr::include_graphics("man/figures/cross_validation_plan.jpg")
```

## Installation

CRAN version:

``` r
install.packages("modeltime.resample")
```

Development version (latest features):

``` r
remotes::install_github("business-science/modeltime.resample")
```

## Why Modeltime Resample?

Resampling time series is an important strategy to __evaluate the stability of models over time.__ However, it's a pain to do this because it requires multiple for-loops to generate the predictions for multiple models and potentially multiple time series groups. __Modeltime Resample simplifies the iterative forecasting process taking the pain away.__

Modeltime Resample makes it easy to:

1. __Iteratively generate predictions__ from time series cross-validation plans.
2. __Evaluate the resample predictions__ to compare many time series models across multiple time-series windows.

Here is an example from [_Resampling Panel Data_](https://business-science.github.io/modeltime.resample/articles/panel-data.html), where we can see that Prophet Boost and XGBoost Models outperform Prophet with Regressors for the Walmart Time Series Panel Dataset using the 6-Slice Time Series Cross Validation plan shown above.

```{r, echo=F, out.width='100%', fig.cap="Model Accuracy for 6 Time Series Resamples"}
knitr::include_graphics("man/figures/plotly_resample_error_plot.jpg")
```

```{r, echo=F, out.width='80%', fig.cap="Resampled Model Accuracy (3 Models, 6 Resamples, 7 Time Series Groups)"}
knitr::include_graphics("man/figures/gt_accuracy_table.jpg")
```

## Getting Started

1. [Getting Started with Modeltime](https://business-science.github.io/modeltime/articles/getting-started-with-modeltime.html): Learn the basics of forecasting with Modeltime.
2. [Resampling a Single Time Series](https://business-science.github.io/modeltime.resample/articles/getting-started.html): Learn the basics of time series resample evaluation.
3. [Resampling Panel Data](https://business-science.github.io/modeltime.resample/articles/panel-data.html): An advanced tutorial on resample evaluation with __multiple time series groups (Panel Data)__

## Meet the modeltime ecosystem

> Learn a growing ecosystem of forecasting packages

```{r, echo=F, out.width='100%', fig.align='center', fig.cap="The modeltime ecosystem is growing"}
knitr::include_graphics("man/figures/modeltime_ecosystem.jpg")
```

Modeltime is part of a __growing ecosystem__ of Modeltime forecasting packages.

- [Modeltime (Machine Learning)](https://business-science.github.io/modeltime/)

- [Modeltime H2O (AutoML)](https://business-science.github.io/modeltime.h2o/)

- [Modeltime GluonTS (Deep Learning)](https://business-science.github.io/modeltime.gluonts/)

- [Modeltime Ensemble (Blending Forecasts)](https://business-science.github.io/modeltime.ensemble/)

- [Modeltime Resample (Backtesting)](https://business-science.github.io/modeltime.resample/)

- [Timetk (Feature Engineering, Data Wrangling, Time Series Visualization)](https://business-science.github.io/timetk/)

## Take the High-Performance Forecasting Course

> Become the forecasting expert for your organization

High-Performance Time Series Forecasting Course

[_High-Performance Time Series Course_](https://university.business-science.io/p/ds4b-203-r-high-performance-time-series-forecasting/)

### 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__](https://university.business-science.io/p/ds4b-203-r-high-performance-time-series-forecasting). 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