Open tnecniv opened 2 years ago
Thanks for checking in! Those two functions definitely seem in scope of what jax.scipy
so we'd welcome a PR!
One note: if you have ported/copied scipy
code rather than rewriting the algorithm from scratch yourself, the implementation must go in https://github.com/google/jax/tree/main/jax/_src/third_party/scipy
Please:
Hello,
On a recent project, I had to implement the Savitzky-Golay filter in code that needed to run efficiently — i.e., it needed to be JIT-compiled and run repeatedly, not just used for post-processing in which case the SciPy function would suffice. This is a popular filter for a variety of applications, particularly ones in Analytic Chemistry (to my understanding, I am not a chemist).
I was able to port the SciPy implementation of
scipy.signal.savgol_coeffs
, which handles the bulk of the filtering algorithm, to JAX easily. Matching the API ofscipy.signal.savgol_filter
would take some additional work to handle the different ways it permits handling the boundaries of the signal.I'm happy to contribute my JAX implementation of
scipy.signal.savgol_coeffs
to build out the on-going port of SciPy's functionality to JAX and, when I have time, portscipy.signal.savgol_filter
properly as well. However, I wanted to open an issue before simply issuing a pull request.