|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.AbstractCondProbDistrib blog.distrib.Gamma
public class Gamma
A Gamma distribution with shape parameter k and scale parameter 1/lambda. Defined as f(x) = (lambda*e^(-lambda*x)*(lambda*x)^(k - 1)) / Gamma(k) where Gamma(k) = integral from 0 to infinity of t^(k-1) * e^(-t) dt
Constructor Summary | |
---|---|
Gamma(double k,
double lambda)
Creates a new Gamma distribution with parameters k and lambda. |
|
Gamma(java.util.List params)
Creates a new Gamma distribution with parameters k and lambda. |
Method Summary | |
---|---|
static double |
gamma(double x)
|
double |
getLogProb(java.util.List args,
java.lang.Object value)
Returns the log of the probability of x under this distribution. |
double |
getProb(java.util.List args,
java.lang.Object value)
Returns the probability of x under this distribution |
static double |
lgamma(double x)
|
java.lang.Object |
sampleVal(java.util.List args,
Type childType)
Returns a double sampled according to this distribution. |
Methods inherited from class blog.AbstractCondProbDistrib |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Gamma(java.util.List params)
public Gamma(double k, double lambda)
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 gamma(double x)
public static double lgamma(double x)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |