Common Errors with MPTK Output

A common error I see in interpreting the output of MPTK is the idea that the amplitudes of atoms in a book correspond to the weights of the unit norm atoms most often used in the description of matching pursuit, as well as other greedy iterative descent strategies. Consider the following plot:
energy.jpg
Here we see for each atom in a book, the quotient of its energy and the squared value of its amplitude. Were MPTK using exclusively real and continuous atoms and not optimizing the phase using complex atoms, this quotient should always be 1. However, because MPTK builds each best real discrete atom from adjusting the amplitudes of cos and sin atoms (or the phase of a complex atom), the squared atom weight is not always proportional to the atom energy. This choice of keeping the atom amplitude in the book and not its energy makes the signal reconstruction faster because we can skip normalizing each discrete atom.

This optimization is a bit annoying because I want the option to work in a world where the atoms have unit norm. So what I do is use the “-E” option in mpd to save to a file the energy decay of the decomposition process. The first element is the energy of the signal, followed by its energy after the first atom is removed, and so on. Then in MATLAB I use the following code to read it in and find the energies of each unit norm atom:

fid = fopen(energyfilename,’r’);
booken = fread(fid,inf,’double’);
fclose(fid);
alpha = flipud(diff(flipud(booken)));

The variable “alpha” contains the energies of each atom in the order that they were found.

Leave a comment