commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 39432] New: - [math] SimpleRegression getSumSquaredErrors
Date Thu, 27 Apr 2006 17:00:55 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39432>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39432

           Summary: [math]  SimpleRegression getSumSquaredErrors
           Product: Commons
           Version: 1.1.0
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Math
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: Mark.Osborn@research.ge.com


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
		
	}

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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