Program to calculate optimal transformations by ACE
by fast boxcar averaging of rank-ordered data

By Henning Voss, Fakultät fuer Physik, Universität Freiburg 

The program ace.m performs a calculation of optimal transformations
from a data set.
The algorithm has been invented by L. Breiman and J.H. Friedman [1]
and the program follows it closely, besides two differences:
1. The output is not normalized with respect to the mean values of the
optimal transformations, so the mean values may not necessarily be zero.
2. The data are rank ordered before the calculation of the optimal
transformations. This leads to a simpler computation of
conditional expectation values.
The algorithm (but not the particular subroutine of estimating the 
conditional expectation values) is also described in [2],[3],[4].

Usage:

The procedure is defined as 
'function [psi,phi]=ace(x,ll,dim,wl,oi,ii,ocrit,icrit,shol,shil)'.
Therefore, the outputs are psi (the maximal correlation) 
and phi (the set of optimal transformations).
There is another program, ace_m.m, that calls ace.m. It can also be used
to understand how ace.m has to be used.

The input parameters are defined as follows:
x:     The data set of size (dim+1) X ll.
ll:    The number of data points of each of the dim+1 terms, e.g. 1000, if the
       regression analysis is performed on 1000 data tuples.
dim:   The number of terms for the rhs, can be 1,2,3, etc.
       The 0th term corresponds to the lhs of the regression equation, 
       the 1st to dimth terms correspond to the rhs of the regression equation.
wl:    Half of the length of the boxcar window, i.e., 2*wl+1=width of filter.
       wl=0,1,2...
oi:    Maximum number of iterations of outer loop, e.g. 10
ii:    Maximum number of iterations of inner loop, e.g. 10
ocrit: Outer iteration stop criterion, should be a small number like 1e-12
icrit: The same for the inner loop, should be the same value or larger than osc
shol, shil: If 1, ace.m prints the iteration result during calculations for 
       outer and inner loop. If set to 0, no effect.

When the program is done, two output variables are produced:
1. psi contains the maximal correlation.
2. phi contains the transformed x-values in the same order as the
inputs. Thus, to display the result, one has to plot the input
variables pointwise against the output.

References:

[1] L. Breiman and J.H. Friedman,
Estimating optimal transformations for multiple regression and correlation,
J. Am. Stat. Assoc. 80 (1985) 580-619.

[2] W. Haerdle, Applied Nonparametric Regression, 
Cambridge Univ. Press, Cambridge, 1990.

[3] H. Voss and J. Kurths,
Reconstruction of nonlinear time delay models from data by the
use of optimal transformations,
Phys. Lett. A 234,  336-344 (1997).

[4] H. Voss and J. Kurths,
Reconstruction of nonlinear time delay models from optical data,
Chaos, Solitons & Fractals 10, 805-809 (1999).

[5] H.U. Voss, P. Kolodner, M. Abel, and J. Kurths,
Amplitude equations from spatiotemporal binary-fluid convection data,
Phys. Rev. Lett.  83, 3422-3425 (1999).
