0

So basically I have a 2d array filled with 1s and 0s. There should be a linear slope associated with the 1s, and I need to find that linear slope with the best accuracy and quickness possible.

How could I do this (please note, there could be multiple lines, but they should all be of similar slope)? (picture of plot below)

enter image description here

enter image description here

  • http://en.wikipedia.org/wiki/Linear_regression is an explanation of the idea and https://www.easycalculation.com/analytical/learn-least-square-regression.php is an explanation for computing least squares regression on a set of data points – Ryan Vitale May 05 '15 at 18:50
  • Linear regression does not work on multiple sets of lines. That is my main problem – Spaderdabomb May 05 '15 at 18:58

0 Answers0