title: Sine regression PHP
body: <p>I have a one-dimensional data set in PHP, to be precise, an array with linearly increasing indices (to represent the values on the x-axis, the delta being 1) and corresponding values (representing the values on the y-axis). My question is: how can I make a sinusoidal regression for such a data set? I have found linear, exponential and even logarithmic regression algorithms, but none for a sine curve.</p>
  
  <p>The data set is formatted as such:</p>
  
  <p>f(x) would be equal to <code>$array[$x]</code>, where x ∈ ℕ</p>