|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.AbstractCondProbDistrib blog.distrib.NegativeBinomial
public class NegativeBinomial
A Negative Binomial distribution with parameters k (number of successes) and p (probability of a success at a given trial). If k is an integer, this is also called the Pascal distribution. The distribution is defined (in discrete terms) as the number of failures before k successes.
Constructor Summary | |
---|---|
NegativeBinomial(java.util.List params)
Creates a new instance of the NegativeBinomial with parameters k and p. |
Method Summary | |
---|---|
double |
getLogProb(java.util.List args,
java.lang.Object value)
Returns the log of the probability of n failures in this distribution. |
double |
getProb(java.util.List args,
java.lang.Object value)
Returns the probability of n failures under this distribution. |
java.lang.Object |
sampleVal(java.util.List args,
Type childType)
Returns a double sampled according to this distribution. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NegativeBinomial(java.util.List params)
Method Detail |
---|
public double getProb(java.util.List args, java.lang.Object value)
public double getLogProb(java.util.List args, java.lang.Object value)
getLogProb
in interface CondProbDistrib
getLogProb
in class AbstractCondProbDistrib
public java.lang.Object sampleVal(java.util.List args, Type childType)
public java.lang.String toString()
toString
in class AbstractCondProbDistrib
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |