commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] Closed: (MATH-85) [math] SimpleRegression getSumSquaredErrors
Date Thu, 06 Jul 2006 05:13:31 GMT
     [ http://issues.apache.org/jira/browse/MATH-85?page=all ]
     
Phil Steitz closed MATH-85:
---------------------------

    Resolution: Fixed

Constrained returned result to be non-negative.  

> [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


Mime
View raw message