What methods are performed for regression with trig functions? Eg, $-1,0,1,-1,0,1,\ldots$ to $\frac{2\sqrt3}{3}\cos(\frac{2\pi n}{3}+\frac{\pi}{6})$

215 Views Asked by At

What methods are performed for regression with trigonometric functions? E.g. :

Sequence: $$-1, 0, 1, -1, 0, 1, \ldots$$ Regression: $$\frac{2\sqrt3}{3}\;\cos\left(\frac{2\pi n}{3} + \frac{\pi}{6}\right)$$

1

There are 1 best solutions below

0
On

If I properly understand your question, you have a list of data points$(x_i,y_i)$ and you want to fit a model looking like $$y=a \cos(b x+c)$$ This is relevant from nonlinear regression and it should not make any specific problem if you are able to generate "reasonable" starting values.

By the way, this is sequence $A049347$ at $OEIS$.