Learn R Programming

⚠️There's a newer version (1.0.2) of this package.Take me there.

onlineforecast (version 0.9.3)

Forecast Modelling for Online Applications

Description

A framework for fitting adaptive forecasting models. Provides a way to use forecasts as input to models, e.g. weather forecasts for energy related forecasting. The models can be fitted recursively and can easily be setup for updating parameters when new data arrives. See the included vignettes, the website and the paper "Short-term heat load forecasting for single family houses" .

Copy Link

Version

Install

install.packages('onlineforecast')

Monthly Downloads

398

Version

0.9.3

License

GPL-3

Maintainer

Peder Bacher

Last Published

September 15th, 2020

Functions in onlineforecast (0.9.3)

aslt

Convertion to POSIXlt
as.data.list

Convert to data.list class
check

Checking the object for appropriate form.
Dbuilding

Observations and weather forecasts from a single-family building, weather station and Danish Meteorological Institute (DMI)
cache_save

Save a cache file (name generated with code_name()
as.data.frame.data.list

Convert to data.frame
as.data.list.data.frame

Convertion of data.frame into data.list
AR

Auto-Regressive (AR) input
bspline

Compute base splines of a variable using the R function splines::bs, use in the transform stage.
check.data.list

Checking the data.list for appropriate form.
getse

Getting subelement from list.
fs

Generation of Fourrier series.
forecastmodel

Class for forecastmodels
lapply_rbind

Helper which does lapply and then rbind
==.data.list

Determine if two data.lists are identical
data.list

Make a data.list
cache_name

Generation of a name for a cache file for the value of a function.
lapply_cbind_df

Helper which does lapply, cbind and then as.data.frame
one

Create ones for model input intercept
onlineforecast

Functions for online forecasting
pbspline

Wrapper for bspline with periodic=TRUE
lapply_rbind_df

Helper which does lapply, rbind and then as.data.frame
persistence

Generate persistence forecasts
gof

Simple wrapper for graphics.off()
rmse

Computes the RMSE score.
rls_update_cpp

Calculating k-step recursive least squares estimates
subset.data.list

Take a subset of a data.list.
make_tday

Make an hour-of-day data.frame with k-step ahead columns.
print_to_message

Simple function for capturing from the print function and send it in a message().
lm_fit

nams

Return the column names
score

Calculate the score for each horizon.
pst

Simple wrapper for paste0().
ct

Convertion to POSIXct
lm_optim

Optimize parameters for onlineforecast model fitted with LM
lm_predict

Prediction with an lm forecast model.
long_format

Long format of prediction data.frame
lp

First-order low-pass filtering
%**%

Multiplication of list with y, elementwise
lapply_cbind

Helper which does lapply and then cbind
make_input

Make a forecast matrix (as data.frame) from observations.
lp_vector_cpp

Low pass filtering of a vector.
in_range

Selects a period
lagvec

Lag by shifting
resample

Resampling to equidistant time series
setpar

Setting par() plotting parameters
residuals.data.frame

Calculate the residuals given a forecast matrix and the observations.
stairs

Plotting stairs with time point at end of interval.
score_fit

Calculates scores for a forecast model fit.
state_getval

Get the state value kept in last call.
state_setval

Set a state value to be kept for next the transformation function is called.
rls_fit

Fit an onlineforecast model with Recursive Least Squares (RLS).
rls_optim

Optimize parameters for onlineforecast model fitted with RLS
rls_update

Updates the model fits
rls_summary

Print summary of an onlineforecast model fitted with RLS
input_class

Class for forecastmodel inputs
lagdf

Lagging which returns a data.frame
pairs.data.list

Generation of pairs plot for a data.list.
par_ts

print.forecastmodel

Print forecast model
plot_ts

Time series plotting
rls_predict

Prediction with an rls model.
rls_prm

Function for generating the parameters for RLS regression