|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.demokritos.iit.jinsect.algorithms.statistics.statisticalCalculation
public class statisticalCalculation
Helper class implementing statistical calculation functions. Under review.
Constructor Summary | |
---|---|
statisticalCalculation()
|
Method Summary | |
---|---|
static double |
binomialSuccessProbability(int iNumberOfTrials,
int iNumberOfSuccesses,
double dSuccessChance)
Returns the probability of a given number of successful results after a given number of Bernoulli trials. |
static double |
combinationsOfNByK(int n,
int k)
Returns the number of groups of k members chosen from n elements. |
static double |
entropy(Distribution dDist)
Calculates the entropy given a Distribution . |
static double |
getPoissonNumber(double dMean)
Returns a poisson distributed random number. |
static void |
main(java.lang.String[] args)
Test function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public statisticalCalculation()
Method Detail |
---|
public static final double entropy(Distribution dDist)
Distribution
.
dDist
- The give distribution.
public static final double combinationsOfNByK(int n, int k)
n
- The number of items.k
- The size of group for every combination.
public static final double binomialSuccessProbability(int iNumberOfTrials, int iNumberOfSuccesses, double dSuccessChance)
iNumberOfTrials
- The number of Bernoulli trials.iNumberOfSuccesses
- The number of successful results.dSuccessChance
- The probability of a successful result in a signle trial.
public static final double getPoissonNumber(double dMean)
algorithm poisson random number (Knuth): init: Let L ← pow(e,−λ), k ← 0 and p ← 1. do: k ← k + 1. Generate uniform random number u and let p ← p × u. while p ≥ L return k − 1.
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |