|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.math.PersistentObject
org.apache.mahout.math.jet.random.AbstractDistribution
org.apache.mahout.math.jet.random.AbstractDiscreteDistribution
org.apache.mahout.math.jet.random.NegativeBinomial
public class NegativeBinomial
Mostly deprecated until unit tests are in place. Until this time, this class/interface is unsupported.
Field Summary |
---|
Fields inherited from class org.apache.mahout.math.jet.random.AbstractDistribution |
---|
randomGenerator |
Constructor Summary | |
---|---|
NegativeBinomial(int r,
double p,
java.util.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. |
java.lang.Object |
clone()
Deprecated. |
int |
nextInt()
|
int |
nextInt(int r,
double p)
Returns a sample from this distribution. |
double |
pdf(int k)
Returns the probability distribution function. |
void |
setRandP(int r,
double p)
Sets the parameters number of trials and the probability of success. |
java.lang.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, setRandomGenerator |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NegativeBinomial(int r, double p, java.util.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)
@Deprecated public java.lang.Object clone()
clone
in class org.apache.mahout.math.PersistentObject
public int nextInt()
nextInt
in class AbstractDiscreteDistribution
public int nextInt(int r, double p)
public void setRandP(int r, double p)
r
- the number of trialsp
- the probability of success.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |