Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mlr-org/mlr3forecast
Time series forecasting for mlr3
https://github.com/mlr-org/mlr3forecast
mlr3 r r-package time-series
Last synced: 6 days ago
JSON representation
Time series forecasting for mlr3
- Host: GitHub
- URL: https://github.com/mlr-org/mlr3forecast
- Owner: mlr-org
- License: lgpl-3.0
- Created: 2024-07-16T16:33:00.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-10T17:49:52.000Z (2 months ago)
- Last Synced: 2024-09-10T19:58:53.594Z (2 months ago)
- Topics: mlr3, r, r-package, time-series
- Language: R
- Homepage: http://mlr3forecast.mlr-org.com/
- Size: 1.26 MB
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)lgr::get_logger("mlr3")$set_threshold("warn")
options(datatable.print.class = FALSE, datatable.print.keys = FALSE)
```# mlr3forecast
Extending mlr3 to time series forecasting.
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![RCMD Check](https://github.com/mlr-org/mlr3forecast/actions/workflows/rcmdcheck.yaml/badge.svg)](https://github.com/mlr-org/mlr3forecast/actions/workflows/rcmdcheck.yaml)
[![CRAN status](https://www.r-pkg.org/badges/version/mlr3forecast)](https://CRAN.R-project.org/package=mlr3forecast)
[![StackOverflow](https://img.shields.io/badge/stackoverflow-mlr3-orange.svg)](https://stackoverflow.com/questions/tagged/mlr3)
[![Mattermost](https://img.shields.io/badge/chat-mattermost-orange.svg)](https://lmmisld-lmu-stats-slds.srv.mwn.de/mlr_invite/)> This package is in an early stage of development and should be considered experimental.
## Installation
Install the development version from [GitHub](https://github.com/):
```{r, eval = FALSE}
# install.packages("pak")
pak::pak("mlr-org/mlr3forecast")
```## Usage
```{r}
library(mlr3forecast)
library(mlr3learners)dt = tsbox::ts_dt(AirPassengers)
dt[, time := NULL]
task = as_task_regr(dt, target = "value")ff = Forecaster$new(
learner = lrn("regr.ranger"),
lag = 1:3
)
ff$train(task)
prediction = ff$predict(task)
prediction
prediction = ff$predict_newdata(task, 3L)
prediction
prediction = ff$predict(task, 142:144)
prediction
prediction$score(msr("regr.rmse"))
```