|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.math.function.DoubleFunction
org.apache.mahout.math.jet.random.AbstractDistribution
org.apache.mahout.math.jet.random.AbstractDiscreteDistribution
org.apache.mahout.math.jet.random.NegativeBinomial
public final class NegativeBinomial
Mostly deprecated until unit tests are in place. Until this time, this class/interface is unsupported.
Constructor Summary | |
---|---|
NegativeBinomial(int r,
double p,
Random randomGenerator)
Constructs a Negative Binomial distribution which describes the probability of getting a particular number of negative trials (k) before getting a fixed number of positive trials (r) where each positive trial has probability (p) of being successful. |
Method Summary | |
---|---|
double |
cdf(int k)
Returns the cumulative distribution function. |
int |
nextInt()
|
int |
nextInt(int r,
double p)
Returns a sample from this distribution. |
double |
pdf(int k)
Returns the probability distribution function. |
String |
toString()
Returns a String representation of the receiver. |
Methods inherited from class org.apache.mahout.math.jet.random.AbstractDiscreteDistribution |
---|
nextDouble |
Methods inherited from class org.apache.mahout.math.jet.random.AbstractDistribution |
---|
apply, apply, getRandomGenerator, randomDouble, setRandomGenerator |
Methods inherited from class org.apache.mahout.math.function.DoubleFunction |
---|
isDensifying |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NegativeBinomial(int r, double p, Random randomGenerator)
r
- the required number of positive trials.p
- the probability of success.randomGenerator
- a uniform random number generator.Method Detail |
---|
public double cdf(int k)
public double pdf(int k)
public int nextInt()
nextInt
in class AbstractDistribution
public int nextInt(int r, double p)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |