It seems like they're different ways to smooth out data in general. This post looks like it has a similar question: Gradient in noisy data, python
One of the answer uses the function splev and splerp from scipy to smooth the curve. Here's that response: https://stackoverflow.com/a/19796063/13297560 Here are the lines of code that looks relevant:
from scipy.interpolate import splrep, splev
f = splrep(x, noisy_data, k=5, s=3)
plt.plot(x, splev(x,f), label="fitted")
it seems x is the range of the domain, noisy_data the output (y) and k and s are optional arguments that affect the smooth. Here's the documentation on that: https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.splrep.html
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments