Skip to content

Commit

Permalink
fixed files form Math #105
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 92fb2bb commit eb198ed
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public double getSlope() {
* @return sum of squared errors associated with the regression model
*/
public double getSumSquaredErrors() {
return sumYY - sumXY * sumXY / sumXX;
return Math.max(0d, sumYY - sumXY * sumXY / sumXX);
}

/**
Expand Down

0 comments on commit eb198ed

Please sign in to comment.