Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

onlineforecast (version 1.0.2)

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 "onlineforecast: An R package for adaptive and recursive forecasting" .

Copy Link

Version

Install

install.packages('onlineforecast')

Monthly Downloads

319

Version

1.0.2

License

GPL-3

Maintainer

Peder Bacher

Last Published

October 12th, 2023

Functions in onlineforecast (1.0.2)

Dbuilding

Observations and weather forecasts from a single-family building, weather station and Danish Meteorological Institute (DMI)
as.data.frame.data.list

Convert to data.frame
complete_cases

Find complete cases in forecast matrices
cache_save

Save a cache file (name generated with code_name()
cache_name

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

Auto-Regressive (AR) input
aslt

Convertion to POSIXlt
bspline

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

Convertion to POSIXct
as.data.list

Convert to data.list class
getse

Getting subelement from list.
%**%

Multiplication of list with y, elementwise
gof

Simple wrapper for graphics.off()
depth

Depth of a list
fs

Generation of Fourrier series.
==.data.list

Determine if two data.lists are identical
data.list

Make a data.list
in_range

Selects a period
forecastmodel

Class for forecastmodels
flattenlist

Flattens list
input_class

Class for forecastmodel inputs
lagdf.character

Lagging which returns a data.frame
lagvec

Lag by shifting
lagdf

Lagging which returns a data.frame
lagdf.numeric

Lagging which returns a data.frame
lagdf.logical

Lagging which returns a data.frame
lapply_cbind

Helper which does lapply and then cbind
lagdf.factor

Lagging which returns a data.frame
lagdf.matrix

Lagging which returns a data.frame
lm_optim

Optimize parameters for onlineforecast model fitted with LM
lp

First-order low-pass filtering
long_format

Long format of prediction data.frame
lm_predict

Prediction with an lm forecast model.
lp_vector_cpp

Low pass filtering of a vector.
lp_vector

First-order low-pass filtering
lapply_cbind_df

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

Lagging which returns a data.list
lapply_rbind_df

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

Helper which does lapply and then rbind
lm_fit

onlineforecast-package

onlineforecast: Forecast Modelling for Online Applications
one

Create ones for model input intercept
nams

Return the column names
make_tday

Make an hour-of-day forecast matrix
pbspline

Wrapper for bspline with periodic=TRUE
persistence

Generate persistence forecasts
par_ts

Set parameters for plot_ts()
pairs.data.list

Generation of pairs plot for a data.list.
make_periodic

Make an forecast matrix with a periodic time signal.
make_input

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

Time series plotting
residuals.data.frame

Calculate the residuals given a forecast matrix and the observations.
print.forecastmodel

Print forecast model
print_to_message

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

Time series plotting
plotly_ts.data.frame

Time series plotting
resample.data.frame

Resampling to equidistant time series
resample

Resampling to equidistant time series
rls_fit

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

Simple wrapper for paste0().
rls_prm

Function for generating the parameters for RLS regression
rmse

Computes the RMSE score.
stairs

Plotting stairs with time point at end of interval.
rls_update_cpp

Calculating k-step recursive least squares estimates
rls_predict

Prediction with an rls model.
rls_optim

Optimize parameters for onlineforecast model fitted with RLS
setpar

Setting par() plotting parameters
rls_summary

Print summary of an onlineforecast model fitted with RLS
rls_update

Updates the model fits
score

Calculate the score for each horizon.
summary.rls_fit

Print summary of an onlineforecast model fitted with RLS
step_optim

Forward and backward model selection
state_getval

Get the state value kept in last call.
subset.data.list

Take a subset of a data.list.
summary.data.list

Summary with checks of the data.list for appropriate form.
state_setval

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