Package 'rego'

Title: Automatic Time Series Forecasting and Missing Value Imputation
Description: Machine learning algorithm for predicting and imputing time series. It can automatically set all the parameters needed, thus in the minimal configuration it only requires the target variable and the dependent variables if present. It can address large problems with hundreds or thousands of dependent variables and problems in which the number of dependent variables is greater than the number of observations. Moreover it can be used not only for time series but also for any other real valued target variable. The algorithm implemented includes a Bayesian stochastic search methodology for model selection and a robust estimation based on bootstrapping. 'rego' is fast because all the code is C++.
Authors: Davide Altomare [cre, aut], David Loris [aut]
Maintainer: Davide Altomare <[email protected]>
License: MIT + file LICENSE
Version: 1.6.1
Built: 2024-11-24 06:33:11 UTC
Source: CRAN

Help Index


Automatic Time Series Forecasting and Missing Value Imputation.

Description

rego is a machine learning algorithm for predicting and imputing time series. It can automatically set all the parameters needed, thus in the minimal configuration it only requires the target variable and the regressors if present. It can address large problems with hundreds or thousands of dependent variables and problems in which the number of dependent variables is greater than the number of observations. Moreover it can be used not only with time series but also with any other real valued target variable. The algorithm implemented includes a Bayesian stochastic search methodology for model selection and a robust estimation based on bootstrapping. rego is fast because all the code is C++.

Details

Package: rego
Type: Package
Version: 1.6.1
Date: 2023-08-09
License: GPL3 | see file LICENCE

Package contains a function for automatic time series forecasting and missing values imputation.

Author(s)

Davide Altomare ([email protected]).

References

rego Documentation


Airline Passenger Dataset

Description

Airline Passenger Dataset

Usage

data(Data)

Format

Data is a data.frame with 156 rows and 1 column containing the yearly number of airline passengers


Automatic Time Series forecasting and Missing Value Imputation.

Description

Automatic time series prediction and missing value imputation.

Usage

regpred(Data, from_lag=1, max_lag="auto", alpha=0.05, nsim=1000, flg_print=1, 
          direction="->", flg_const=TRUE, flg_diff=FALSE, model=NULL)

Arguments

Data

data.frame containing target variable at first column and regressors if present from second to last column.

from_lag

minimum time lag to be considered in the autoregressive moving average part of the algorithm.

max_lag

maximum time lag to be considered in the autoregressive moving average part of the algorithm. If "auto" then the algorithm will set a suitable value. Set to 0 or NULL if you want to remove the autoregressive moving average part as in case of non time series data.

alpha

significance level for the confidence interval produced around predictions. If 0.05 then the algorithm will calculate a 95% confidence interval around predictions.

nsim

number of bootstrap replications used for producing confidence interval around predictions.

flg_print

if 1 some information during the evaluation will be printed.

direction

if "->" then only a forward prediction will be executed, if "<-" then only a backward prediction will be executed, if "<->" then both a forward than a backward prediction will be executed if possible. For imputing missing values is convenient to leave default "<->".

flg_const

if 1 then a constant is included into the model.

flg_diff

if 1 and no regressor is present then if the target variable exhibits a trend, it is one-step differentiated up to two times.

model

estimated models from a previous train to be used in new data prediction without retraining.

Value

An object of class list with predictions and models.

Author(s)

Davide Altomare ([email protected]).

References

rego Documentation

Examples

## Not run: 

#example 1: seasonal time series

library(rego)

data(Data)

res=regpred(Data)

#print final prediction 
print(res$prediction)

#example 2: high dimensional problem

Data=read.csv(url("https://channelattribution.io/csv/Data_sim_1000.csv"),header=FALSE)

res=regpred(Data, max_lag=NULL)

#print final prediction 
print(res$prediction)



## End(Not run)