I am trying to use non-linear curve fitting for my data that seems to be periodic. So far, I found the "sum of sine" function to be the best; yielding (R² ≈ 1).
I wonder if there is any implementation of such function in Scipy?
Thank you
NOTE:
This question was wrongly closed. Please note that I am asking about the "sum of sine" Algorithm. and the link you provided when marked as duplicate is misleading, because I am asking about something else. Using a naive approach to implement "sum of sine" will not work because this kind of fitting is EXTREMLY sensitive to initial values of the parameters. Matlab does a lot of work under the hood to make it converge (using FFT, etc). So my question is if such implementation (not how to implement it manually) is already available in Scipy.