A model based on average values Calls base::mean from package base.

Dictionary

This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():

mlr_learners$get("forecast.average")
lrn("forecast.average")

Meta Information

  • Task type: “forecast”

  • Predict Types: “response”

  • Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered”

  • Required Packages: mlr3, 'base'

Parameters

Empty ParamSet

See also

Other Learner: LearnerForecast, mlr_learners_regr.VAR, mlr_learners_regr.arima, mlr_learners_regr.auto_arima

Super classes

mlr3::Learner -> mlr3temporal::LearnerForecast -> LearnerRegrForecastAverage

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.


Method forecast()

Returns forecasts after the last training instance.

Usage

LearnerRegrForecastAverage$forecast(h = 10, task, new_data = NULL)

Arguments

h

(numeric(1))
Number of steps ahead to forecast. Default is 10.

task

(Task).

new_data

(data.frame())
New data to predict on.

Returns

Prediction.


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerRegrForecastAverage$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

learner = mlr3::lrn("forecast.average")
print(learner)
#> <LearnerRegrForecastAverage:forecast.average>
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, base
#> * Predict Types:  [response]
#> * Feature Types: logical, integer, numeric, factor, ordered
#> * Properties: univariate

# available parameters:
learner$param_set$ids()
#> character(0)