Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

regression to the mean using javascript

var known_y = [1, 2, 3, 4];
var known_x = [5.2, 5.7, 5.0, 4.2];

var lr = linearRegression(known_y, known_x);
// now you have:
// lr.slope
// lr.intercept
// lr.r2
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #regression #javascript
ADD COMMENT
Topic
Name
4+5 =