# Expanding piecewise polynomial using Daubechies wavelet

What is the best Daubechies wavelet (i.e. the number of vanishing moment) to expand a signal $\boldsymbol{x} \in \mathbb{R}^n$? $\boldsymbol{x}$ consists of $m$ pieces of polynomial with $d$ degree. The criterium is to make the DWT signal as sparse as possible.

Update: The goal of sparsifying the signal in wavelet domain is denoising. Let $\boldsymbol{W}$ denote DWT. $$\boldsymbol{y} = \boldsymbol{Wx}$$ Apply a soft-thresholding to $\boldsymbol{y}$, $$\hat{\boldsymbol{y}} = \text{sign}(\boldsymbol{y})(\max(\boldsymbol{y}-\lambda,0))$$ Choose $\lambda=\sqrt{2\log n}$ according to Ideal spatial adaptation by wavelet shrinkage. The sparsity is defined by $\| \hat{\boldsymbol{y}} \|_0$.

• @OlliNiemitalo see the updated question. Mar 26, 2016 at 16:35

According to your formula, you also apply soft-thresholding to the approximation coefficients, which is not standard. Aside, your operator $W$ does not seem to specify the number of wavelet levels used. Finally, your class of signals does not seem to address the regularity at piecewise junctions.
I believe in this case very unlikely that in a discrete implementation, without further relation between $m$ and $n$, you can find, theoretically, a best wavelet in all cases, because $\|\hat{y}\|_0$ is a quite sensitive index (and it is not a norm). Of course, a Daubechies with $d$ vanishing moments would seem appropriate.
But since the DWT is quite fast, in your context, you could just find a "generally best wavelet", by simulating random signals, and iterating over some levels, and each Daubechies wavelet with moments in $[d-2,\ldots,d+2]$ for instance.