You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2006/07/06 07:13:31 UTC

[jira] Closed: (MATH-85) [math] SimpleRegression getSumSquaredErrors

     [ 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