commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <p...@steitz.com>
Subject RE: [math] Questions regarding probability distributions
Date Mon, 18 Oct 2004 19:13:01 GMT
Frank,
 
Sorry I seem to have missed your earlier comment on the distributions.  I will respond fully
to that note tonight. In response to your point 1 below, please keep in mind that commons-math
is, at least at present, an applied math package (cf the charter on the web page).  The distributions
package aims only to provide access to commonly used distributions, not be provide a "probability
domain model."   We have tried to be conservative in introducing mathematical abstractions
or degrees of generality so that the package remains small(ish ;-), efficient and approachable
by non-mathematicians.    
 
I will respond the the specific points about the distribution interfaces in a separate post.
 
Phil
 
-----Original Message----- 
From: F Norin [mailto:frno@bredband.net] 
Sent: Mon 10/18/2004 11:52 AM 
To: Jakarta Commons Developers List 
Cc: 
Subject: Re: [math] Questions regarding probability distributions




	I'm glad if I can help you, Mark, and let me say that I think you've done a
	nice job with the commons-math package. I do think you might need to address
	a few things in the probability section though:
	1. Most importantly, I think you need to make the basic interfaces more
	extensible and generic so that they more closely matches the fundamental
	concepts of probability theory. I'd suggest introducing a Probability class
	and changing the interfaces for a probability distribution, something along
	the lines I mentioned in an earlier post.
	2. Also, you might need to consider introducing some mechanism for expressing
	the relationships among probability distributions. As you pointed out 
	yourself, this could be done in a number of ways.
	
	/FN
	
	
	On Friday 15 October 2004 19.17, Mark R. Diggory wrote:
	> Frank,
	>
	> I just wanted to thank you for your input regarding these design issues.
	> It gives us an opportunity to review our design choice further and
	> verify it still applies to current user situations and needs. Please let
	> us know if you have any needs that are not being met by the current design.
	>
	> Cheers,
	> Mark
	>
	> Mark R. Diggory wrote:
	> > F Norin wrote:
	> >> Yes you're right, with the parametrization model you're using it would
	> >> probably be confusing to simply let the exponential and chisquared
	> >> distributions be instances of a gammadistribution. However, this
	> >> indicates that there may be something flawed here. Remember, the
	> >> chisquared distribution *is a* gammadistribution, and this should be
	> >> reflected in the inheritance structure. Basically, you need some means
	> >> to express relationships between probability distributions.
	> >
	> > Inheritance is not necessarily the best (or only) way to model such a
	> > relationship, adapters and wrappers are a very prevalent design pattern.
	> >
	> > Java inheritance (single inheritance) is a poor choice for describing
	> > relationships such as this because the relationship between Gamma and
	> > ChiSquare is a "restriction of capability" not an "extension of
	> > capability". Yes, we could use inheritance and override the setBeta
	> > method to block its usage, but this violates all kinds of
	> > Interface/Implementation and expected behavior design rules too.
	> >
	> > Is there a reason you need to have ChiSquare and Exponential extend
	> > Gamma instead of wrapping it or using an alternate efficient
	> > implementation?
	> >
	> > -Mark
	
	---------------------------------------------------------------------
	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