april icon indicating copy to clipboard operation
april copied to clipboard

Linear regression

Open faeredia opened this issue 3 years ago • 0 comments

In the APL wiki at https://aplwiki.com/wiki/Matrix_Divide#Applications it mentions that matrix divide should do least squares regression for an overdetermined system This PR implements linear-regression for the domino operator

Example use;

      ⎕←X←1,⍪⍳5
1 1
1 2
1 3
1 4
1 5
      Y←5 1 4 2 8
      Y⌹X
1.9 0.7

Here the result is the parameters [c, m] in the equation y=mx+c

faeredia avatar Jun 05 '22 03:06 faeredia