pygsp
pygsp copied to clipboard
Factor pi missing in `compute_cheby_coeff`
It looks like a factor of pi
is missing in the numerical integration in https://github.com/epfl-lts2/pygsp/blob/d78095438a14a74d2195d4600fc00f8f1115005f/pygsp/filters/approximations.py#L52 compared Eq 8 https://arxiv.org/pdf/1105.1891.pdf throwing off the Chebyshev coefficients by a factor of pi
.
Hi thanks for reporting that. @mdeff , do you know if this is intentional or a mistake. I have the feeling we knew about that... If it is intentional, we should document it.
Indeed, we use 2/n
as a factor instead of 2/pi
. As for #74, the definition of the coefficients came from the matlab implementation. I believe that is intentional and correct, as the integration over pi
is approximated by a summation over n
evaluation points. Do you agree @nperraud?
In my overhaul of the Chebyshev approximation (in the polynomial-approximations
branch), I used 2/n
and documented the definition. I could add that the summation is an approximation of the integral.