jabowery has asked for the wisdom of the Perl Monks concerning the following question:
Let's say I've got a probability distribution histogram represented as a hash:
{apples=>4,oranges=>19,pairs=>10,peaches=>5}What is the best way to simulate random sampling of that histogram? I looked around CPAN for Monte Carlo methods and the only distributions I found supported were math-based such as Math::GSL::Randist -- not data-based.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Sampling From a Histogram Distribution
by Kenosis (Priest) on Jan 05, 2014 at 21:32 UTC | |
by Anonymous Monk on Jan 05, 2014 at 21:42 UTC | |
by Kenosis (Priest) on Jan 05, 2014 at 21:46 UTC | |
Re: Sampling From a Histogram Distribution
by davido (Cardinal) on Jan 06, 2014 at 03:58 UTC | |
Re: Sampling From a Histogram Distribution
by educated_foo (Vicar) on Jan 06, 2014 at 00:53 UTC | |
Re: Sampling From a Histogram Distribution
by Cristoforo (Curate) on Jan 05, 2014 at 21:10 UTC |
Back to
Seekers of Perl Wisdom