commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikkel Meyer Andersen <m...@mikl.dk>
Subject [math] Generate random data using the Inverse CDF Method?
Date Mon, 26 Oct 2009 22:09:32 GMT
Dear community.

I've just started using the Apache Commons Math library. In regards to
generating random data from probability distributions, the library
doesn't support generating random data using the inverse cdf method
although a lot of the distributions gives the possibility to calculate
the inverse cdf.

Are there any particular good reason for this?

If not, I would create a public interface
DistributionWithInverseCumulativeProbability (who has a better name?)
with the method inverseCumulativeProbability (right now it's on
ContinuousDistribution and some other subclasses and don't seem to be
gathered in an interface) and all the distributions with the
inverseCumulativeProbability-method should implement this interface.

With this small change, a new class called
RandomDistributionWithInverseCumulativeProbability (again, who has a
better name?) could simply use the uniform generator and a class
implementing DistributionWithInverseCumulativeProbability to generate
random data from that distribution.

What do you think about that idea? I look forward to comments,
suggestions, and preferably, better names :-).

Cheers, Mikkel Meyer Andersen.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message