2

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.

clemens
  • 382
  • 2
  • 12

2 Answers2

1

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.

D.W.
  • 167,959
  • 22
  • 232
  • 500
1

You could try symbolic regression (SR).

The general idea is finding a function that fits the given data points without making any assumptions about the structure of that function.

Genetic programming (GP) is well suited to this sort of task since it makes no such assumptions. SR was one of the earliest applications of GP and continues to be widely studied.

In general, SR is more computationally intensive and produces less accurate models than the other nonlinear technique.

manlio
  • 2,092
  • 20
  • 30