View source: R/regression_model.R
1 | forecastML(model, newdata = NULL, h, pi = c(0.95, 0.8))
|
model |
A trainML object |
newdata |
A tsibble object, must be used when the input model was trained with external inputs (i.e., the 'x' argument of the trainML function was used). This input must follow the following structure: - Use the same time intervals (monthly, daily, hourly, etc.) structure and timestamp class (e.g., yearquarter, yearmonth, POSIXct, etc.) as the original input - The number of observations must align with the forecasting horizon (the 'h' argument) - The timestamp of the first observation must be the consecutive observation of the last observation of the original series |
h |
An integer, define the forecast horizon |
pi |
A vector with numeric values between 0 and 1, define the level of the confidence of the prediction intervals of the forecast. By default calculate the 80 |
Forecast trainML Model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.