My web page discussing the Haar wavelet transform and its application to time series information can be found here After I implemented this software I studied Wim Sweldens' Lifting Scheme wavelet transform. An elegent implementation of the Haar transform, implemented via the Lifting Scheme, can be found here.
The wavelet source code published here includes the following:
The in-place Haar transform. The in-place Haar transform results in coefficients that are scattered in the array in a butterfly pattern. An order() function is included that will order the coefficients by frequency. The reverse transforms are also included.
The simple non-inplace Haar tranform and its inverse.
The tsRead class to read time series.
A growable array class that the time series is read into. This class is similar to the Java Vector class, but it is implemented for double elements.
Histogramming of coefficients and comparison to a normal (Gaussian) distribution. The output is formatted for gnuplot.
A noise filter that removes coefficients that fall inside the gaussian curve. This is my first, rather primative, attempt at using wavelets for noise removal.
Another way to remove noise is to use thresholding. My web page outlining one thresholding algorithm can be found here.
Gnuplot output of the time series with various coefficient frequencies removed.
The javadoc generated documentation for th above source code can be found here
Java software that implements the forward and inverse Haar transform using matrices can be downloaded here. This software includes a modest linear algebra class (e.g., matrix multiply and various vector operations). This class has also been used to implement Gram-Schmidt orthogonalization.
Ian Kaplan, July 2001
Revised: November 2001