|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.AbstractCondProbDistrib blog.distrib.Beta
public class Beta
A Beta distribution with shape parameters a and b, defined by f(x) =(x^(a-1) * (1-x)^(b-1)) / B(a,b) where B(a,b) is a normalization constant equal to integral from 0 to 1 of x^(a-1) * (1-x)^(b-1) dx
Constructor Summary | |
---|---|
Beta(java.util.List params)
Returns a new Beta with shape parameters a and b. |
Method Summary | |
---|---|
static double |
beta(double a,
double b)
Returns the Beta function of reals a and b B(a,b) = Gamma(a)Gamma(b) / Gamma(a+b) Reference: Numerical Recipes in C http://www.library.cornell.edu/nr/cbookcpdf.html |
double |
getLogProb(java.util.List args,
java.lang.Object value)
Returns the log of the probability of value under this distribution. |
double |
getProb(java.util.List args,
java.lang.Object value)
Returns the probability of value 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 Beta(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 static double beta(double a, double b)
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 |