I have a one-dimensional dataset in PHP, to be precise, an array with linearly increasing indices (to represent values on the x axis, with the delta equal to 1) and corresponding values (representing values on the y-axis). My question is: how can I do a sinusoidal regression for such a dataset? I found linear, exponential and even logarithmic regression algorithms, but there isn’t for a sinusoidal curve.
The dataset is formatted as such:
f (x) will be equal $array[$x], where x ∈ ℕ
source
share