Implementing empirical distributions using the ParallelColt API
I'm wondering if anyone has some experience with using empirical distributions in the ParallelColt API?
I'm struggling to find some example references on:
- the differences between the classes Empirical and EmpiricalWalker, and
- how the interpolation feature works.
I believe I've implemented the Empirical class correctly, though I've found through some debugging that since my lowest data point in the empirical set is 15, I don't get any real values between 0 - 14. I was hoping that 开发者_运维技巧by passing the argument in the Empirical constructor for LINEAR_INTERPOLATION, it would allow a number to be drawn anywhere between 0 and the max value of the data set.
Any insight into this would be appreciated. I've attached a snippet from my code.
private static final DoubleRandomEngine rngEngine =
new DoubleMersenneTwister();
private static final Empirical tHazDist =
new Empirical(DistData.getThazZfwHi(),
Empirical.LINEAR_INTERPOLATION, rngEngine);
double timeToHazard = tHazDist.nextDouble();
精彩评论