# Documentation

## Wavelet Packet Analysis

The wavelet packet method is a generalization of wavelet decomposition that offers a richer range of possibilities for signal analysis.

In wavelet analysis, a signal is split into an approximation and a detail. The approximation is then itself split into a second-level approximation and detail, and the process is repeated. For an `n`-level decomposition, there are `n+1` possible ways to decompose or encode the signal.

In wavelet packet analysis, the details as well as the approximations can be split.

This yields more than ${2}^{{2}^{n-1}}$ different ways to encode the signal. This is the wavelet packet decomposition tree.

The wavelet decomposition tree is a part of this complete binary tree.

For instance, wavelet packet analysis allows the signal S to be represented as A1 + AAD3 + DAD3 + DD2. This is an example of a representation that is not possible with ordinary wavelet analysis.

Choosing one out of all these possible encodings presents an interesting problem. In this toolbox, we use an entropy-based criterion to select the most suitable decomposition of a given signal. This means we look at each node of the decomposition tree and quantify the information to be gained by performing each split.

Simple and efficient algorithms exist for both wavelet packet decomposition and optimal decomposition selection. This toolbox uses an adaptive filtering algorithm, based on work by Coifman and Wickerhauser (see [CoiW92] in References), with direct applications in optimal signal coding and data compression.

Such algorithms allow the Wavelet Packet 1-D and Wavelet Packet 2-D tools to include "Best Level" and "Best Tree" features that optimize the decomposition both globally and with respect to each node.