r-squared
v0.0.0
Published
Calculate r-squared, how well a regression line calculates values
Downloads
20
Readme
r-squared
r-squared tells us how well a regression line predicts or estimates actual values
Get it!
npm install --save r-squared
Usage
var rSquared = require('rSquared')
var x = [1,2,3,4,5]
var y = [2,4,5,4,5]
rSquared.rSquared(x, y, function (err, data) {
if (err) throw err
console.log(data)
})
API
r-squared(x, y, callback)
x
actual valuesy
estimated valuescallback
error first callback