You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2006/04/27 19:00:55 UTC
DO NOT REPLY [Bug 39432] New: - [math] SimpleRegression getSumSquaredErrors
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