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 36450] - [math] RunTimeException in EmpiricalDistributionImpl.load(double[])
Date Thu, 01 Sep 2005 05:27:25 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=36450>.
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=36450





------- Additional Comments From phil@steitz.com  2005-09-01 07:27 -------
The code should probably include a guard for this and throw a more meaningful
exception, but this class is not designed to be used with very small data sets.
Are you trying to produce random draws from a discrete distribution with point
masses on the two values?  This class is designed to use empirical data to
simulate continuous distributions (see the reference in the class header comment).  

As stated in the Usage Notes section of the header comment, the binCount should
be set to a number smaller than than the sample size. In this case, 1 is the
only possible value; but this will not work, since bins of size 1 have no
variance.  So the minimum possible acceptable values are effectively 4
datapoints with binCount = 2. 

The javadoc should probably be updated to make this clear and a binCount -
sample size guard should be added.

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