What are Wavelets ?

175 views

Looking towards to practical intuition behind Wavelets and their purpose

In: 3

2 Answers

Anonymous 0 Comments

A wavelet is a way to break a set of data into pieces*.

Leaving ELI-5 territory, if you are asking about a wavelet, then you probably know about the discrete Fourier transform, which is a wavelet

Back to ELI5. Imagine that you have a set of values F=[6,8,2,4]. We could define the x-space wavelets x1=[1,0,0,0], x2=[0,1,0,0], x3=[0,0,1,0], x4=[0,0,0,1], and say that F=6*x1+8*x2+2*x3+4*x4. Now that is the trivial case; we already had those coefficients from the original function, but it shows how wavelets work.

Let’s propose an alternate wavelet called the Haar wavelet. The Haar wavelets are defined H0=[1,1,1,1], H11=[1,1,-1,-1], H21=[1,-1,0,0], H22=[0,0,1,-1]. We could then break our earlier F into F=5*H0+2*H11+(-1)*H21+(-1)*H22.

Now, what benefit does this provide? For the 4 component vector I was using, not much. However, imagine that instead of 4 components, it was 4096 components. You could describe that vector with 4096 terms with the equivalent x-space wavelets, or 4096 terms of the Haar wavelet. Now, imagine that you want to save this vector, but only have room for 2048 terms. If you dropped half of the x-space terms, you would have half the vector. If you dropped the smallest half of the Haar wavelet terms, you would have the whole vector, but fuzzy.

It is this property that gives wavelets a lot of their uses. .jpg and .mp3 files are broken into wavelets, and lossy compression is performed by dropping the values associated with fine detail (and in the case of .mp3, dropping the terms that correspond with frequencies outside our ability to hear)

*a wavelet is much more than that, but this was the easiest and most ELI5 way I could think of

Anonymous 0 Comments

Let’s suppose you have a sound wave, and you’re recording it. Every 25 microseconds (say), the computer records the amount of air pressure at the microphone.

Now you have excellent *time* data about the sound. But you have no idea about the *frequency* data. You can point to times when it’s loud, or soft, but not when it’s a high-pitched tone or a low-pitched tone.

One way to get frequency data is by taking a fourier transform. But then, you lose the *time* information.

Wavelet transforms give a nice compromise between these two types of useful information. A wavelet is like a short blip with specific frequencies (though not as specific as a pure sine wave tone), at a specific time (though not as specific as a single clap). Your microphone’s signal can be broken into wavelets, and then you can identify how the frequencies change with time (or vice-versa).