|
Boost : |
From: Milan Rusev (milan.rusev_at_[hidden])
Date: 2008-03-25 04:16:48
OK, a statistics library sounds better to me, too.
So how about that (speaking in pseudo code):
There is a base class:
distribution
{
get_probability(value); // P(value)
get_comulutative_probability(value); //P(x <= value)
generate_random();
get_expectation();
get_variance();
//more
}
Specific distributions will derive from it and expose their parameters too;
discrete distributions may have a method get_values().
Factories:
distribution create_distribution(samples, distribution_type); // given a
specific distribution and
a set of samples find the MLE (the parameters of the distribution);
implemented specifically for each distribution
distribution create_ distribution(samples); // given a set of samples
approximate an
unknown distribution (e.g. with a Monte Carlo or smth like this);
maybe the method for the generation will be a parameter too.
There may be methods of inferring some properties of a distribution without
generating the whole of it first.
Operations:
distribution create_joint_distr(distribution, distribution);
distribution create_sum(distribution, distribution);
distribution create_difference(distribution, distribution);
Other things I can think of.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk