generic/dynamic model fourier series #914
Replies: 1 comment
-
@bytelinker Well, assuming that I understand correctly, we should point out that a Fourier series is a linear problem, not a non-linear one:
so for exactly and only "fit a Fourier series", you do not need an iterative method - a regression method would work, as mentioned in that StackOverflow discussion. I believe (but am not 100% sure) that the Symfit link you give is also describing a linear least-squares fit. That said, it might be useful to have a lmfit model for a Fourier series. Writing such a model for a fixed maximum number of coefficients would not be too hard. Say, something like
That would allow up to 9 variable parameters, and you could set any of them to 0 to reduce the number of components. For a truly "variable" number of components, I think we would have to write a slightly more elaborate sub-class of |
Beta Was this translation helpful? Give feedback.
-
Hello,
which is the best way to set up a generic or dynamic fourier series fit model?
The degree of fourier coeffcients should be variable or could be determined by the numbers of guess parameters.
Starting points are:
https://stackoverflow.com/questions/52524919/fourier-series-fit-in-python
https://symfit.readthedocs.io/en/stable/examples/ex_fourier_series.html
Any ideas?
bytelinker
Beta Was this translation helpful? Give feedback.
All reactions