How can I fit a sine function to a SVR?

I have a time series which represent the sine curve. Now I want a regressor to learn this curve, and being able to predict for future values.

PS: Sine curve is only for testing purposes. What I want is to learn that function and its parameters as well which need not be sine.

• I don't quite understand your problem. What is the input, and what is the desired output? Apr 20, 2017 at 8:08

Use nonlinear regression: https://en.wikipedia.org/wiki/Nonlinear_regression. Write down a model, e.g., $f(x) = \sin(\alpha x + \beta)$, and then try to find parameters $\alpha,\beta$ that minimize the regression error (the sum of the squared error at each point; i.e., square of difference between model's prediction and observed value). You can use gradient descent or other forms of mathematical optimization for that. If a sin function isn't the right model, you can write down some other model (with some parameters) and use optimization to find the best values for the parameters.