Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 5061 invoked from network); 1 Sep 2005 06:28:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Sep 2005 06:28:14 -0000 Received: (qmail 54217 invoked by uid 500); 1 Sep 2005 06:27:48 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 53759 invoked by uid 500); 1 Sep 2005 06:27:46 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 53430 invoked by uid 99); 1 Sep 2005 06:27:41 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Aug 2005 23:27:39 -0700 Received: by ajax.apache.org (Postfix, from userid 99) id 9A1E8323; Thu, 1 Sep 2005 07:27:25 +0200 (CEST) From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 36450] - [math] RunTimeException in EmpiricalDistributionImpl.load(double[]) X-Bugzilla-Reason: AssignedTo Message-Id: <20050901052725.9A1E8323@ajax.apache.org> Date: Thu, 1 Sep 2005 07:27:25 +0200 (CEST) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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