3
$\begingroup$

I have a sequence of $n$ points $(x_i,y_i)$, for $i=1,\dots,n$. I would like to find the function, of the form $y=V\sin(x+\phi)$, which best fits the points. Which numerical method could I use? I have a slow system, with little memory, so I am searching for a fast and efficent method, even if not very accurate.

I have tried with gradient descent, but it is slow.

  • 0
    How do you define "best fit"?2011-11-25
  • 3
    The usual method for *least-squares* fitting is Levenberg-Marquardt. Of course, this needs a good initial estimate for your model's parameters, as with most iterative methods.2011-11-26
  • 1
    http://math.stackexchange.com/questions/301194/given-a-data-set-how-do-you-do-a-sinusoidal-regression-on-paper-what-are-the-e/319118#3191182013-03-17
  • 0
    You can look at things like Prony's Method, Espirit and music.2015-04-03

2 Answers 2