Learn R Programming

ForeCA R package

ForeCA implements Forecastable component analysis in R. For details on algorithm & methodology see Forecastable Component Analysis, JMLR, Goerg (2013).

In a nutshell: ForeCA finds linear combinations of multivariate time series that are most forecastable, where forecastability is measured by the spectral entropy of the resulting signal (linear combination of input).

Installation

You can install the stable version from CRAN:

install.packages('ForeCA')

Alternatively, you can also install the latest version of ForeCA package directly from github as

library(devtools)
devtools::install_github("gmgeorg/ForeCA")

Usage

The workhorse function is ForeCA::foreca() which works just like the built-in princomp function for PCA.

library(ForeCA)
citation("ForeCA")

For a tutorial on how to use foreca() and the entire ForeCA suite of functions see the introductory vignette on CRAN.

References

Copy Link

Version

Install

install.packages('ForeCA')

Monthly Downloads

407

Version

0.2.8-1

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Georg M Goerg

Last Published

August 23rd, 2026

Functions in ForeCA (0.2.8-1)

whiten

whitens multivariate data
initialize_weightvector

Initialize weightvector for iterative ForeCA algorithms
mvspectrum2wcov

Compute (weighted) covariance matrix from frequency spectrum
quadratic_form

Computes quadratic form x' A x
sfa

Slow Feature Analysis
foreca.one_weightvector-utils

Plot, summary, and print methods for class 'foreca.one_weightvector'
mvspectrum

Estimates spectrum of multivariate time series
mvspectrum-utils

S3 methods for class 'mvspectrum'
spectral_entropy

Estimates spectral entropy of a time series
foreca-utils

Plot, summary, and print methods for class 'foreca'
discrete_entropy

Shannon entropy for discrete pmf
continuous_entropy

Shannon entropy for a continuous pdf
ForeCA-package

Implementation of Forecastable Component Analysis (ForeCA)
foreca.EM-aux

ForeCA EM auxiliary functions
foreca.EM.one_weightvector

EM-like algorithm to estimate optimal ForeCA transformation
common-arguments

List of common arguments
Omega

Estimate forecastability of a time series
foreca

Forecastable Component Analysis
complete-controls

Completes several control settings