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: [email protected]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to