You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Luc Maisonobe (JIRA)" <ji...@apache.org> on 2006/07/04 23:20:30 UTC
[jira] Updated: (MATH-85) [math] SimpleRegression
getSumSquaredErrors
[ http://issues.apache.org/jira/browse/MATH-85?page=all ]
Luc Maisonobe updated MATH-85:
------------------------------
Attachment: math-85.patch
patch adding a test case for issue MATH-85
> [math] SimpleRegression getSumSquaredErrors
> --------------------------------------------
>
> Key: MATH-85
> URL: http://issues.apache.org/jira/browse/MATH-85
> Project: Commons Math
> Type: Bug
> Versions: 1.1.0
> Environment: Operating System: Windows 2000
> Platform: PC
> Reporter: Mark Osborn
> Attachments: math-85.patch
>
> getSumSquaredErrors returns -ve value. See test below:
> public void testSimpleRegression() {
> double[] y = { 8915.102, 8919.302, 8923.502};
> double[] x = { 1.107178495, 1.107264895, 1.107351295};
> double[] x2 = { 1.107178495E2, 1.107264895E2, 1.107351295E2};
> SimpleRegression reg = new SimpleRegression();
> for (int i = 0; i < x.length; i++) {
> reg.addData(x[i],y[i]);
> }
> assertTrue(reg.getSumSquaredErrors() >= 0.0); // OK
> reg.clear();
> for (int i = 0; i < x.length; i++) {
> reg.addData(x2[i],y[i]);
> }
> assertTrue(reg.getSumSquaredErrors() >= 0.0); // FAIL
>
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org