# sfa: Slow Feature Analysis In ForeCA: Forecastable Component Analysis

## Description

sfa performs Slow Feature Analysis (SFA) on a K-dimensional time series with T observations.

Important: This implementation of SFA is just the most basic version; it is merely included here for convenience in initialize_weightvector. If you want to actually use full functionality of SFA in R use the rSFA package, which has a much more advanced and efficient implementations. sfa() here corresponds to sfa1.

## Usage

 1 sfa(series, ...) 

## Arguments

 series a T \times K array with T observations from the K-dimensional time series \mathbf{X}_t. Can be a matrix, data.frame, or a multivariate ts object. ... additional arguments

## Details

Slow Feature Analysis (SFA) finds slow signals (see References below). The problem has an analytic solution and thus can be computed quickly using generalized eigen-value solvers. For ForeCA it is important to know that SFA is equivalent to finding a linear combination signal with largest lag 1 autocorrelation.

The disadvantage of SFA for forecasting is that, e.g., white noise (WN) is ranked higher than an AR(1) with negative autocorrelation coefficient ρ_1 < 0. While it is true that WN is slower, it is not more forecastable. Thus we are also interested in the fastest signal, i.e., the last eigenvector. The so obtained fastest signal corresponds to minimizing the lag 1 auto-correlation (possibly ρ_1 < 0).

Note though that maximizing (or minimizing) the lag 1 auto-correlation does not necessarily yield the most forecastable signal (as measured by Omega), but it is a good start.

## Value

An object of class sfa which inherits methods from princomp. Signals are ordered from slowest to fastest.

## References

Laurenz Wiskott and Terrence J. Sejnowski (2002). “Slow Feature Analysis: Unsupervised Learning of Invariances”, Neural Computation 14:4, 715-770.

initialize_weightvector
 1 2 3 4 5 6 7 8 9 XX <- diff(log(EuStockMarkets[-c(1:100),])) * 100 plot(ts(XX)) ss <- sfa(XX[,1:4]) summary(ss) plot(ss) plot(ts(ss$scores)) apply(ss$scores, 2, function(x) acf(x, plot = FALSE)\$acf) biplot(ss)