Last active
August 29, 2015 14:09
-
-
Save jonasalmeida/73e9a5d1af95da43e093 to your computer and use it in GitHub Desktop.
Residua Distribution of signs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// One way to measure goodness of fit is to | |
// assess the even distribution of values arround | |
// the regression line. This is a non-parameric | |
// approach that is not sensitive to the magitude | |
// of the noise, only to its structure | |
RSD={ | |
res2sign:function(r){ // counts same-sideness of residuals in array r | |
var rs = 0 | |
for(var i=1;i<r.length;i++){rs+=((r[i]*r[i-1])>0)} | |
return rs | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment