|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.AbstractCondProbDistrib blog.distrib.RoundedLogNormal
public class RoundedLogNormal
Distribution over positive integers for a random variable X = round(Y), where Y has a log normal distribution. This means Z = log(Y) has a normal distribution. A RoundedLogNormal has two parameters, the mean and the variance. For consistency with Hanna's code, we use the mean of Y and the variance of Z.
Constructor Summary | |
---|---|
RoundedLogNormal(double mean,
double varianceOfLog)
Creates a RoundedLogNormal distribution where Y has the given mean and log(Y) has the given variance. |
|
RoundedLogNormal(java.util.List params)
Creates a RoundedLogNormal distribution with the given parameters. |
Method Summary | |
---|---|
double |
getLogProb(int n)
Returns the log probability that X=n. |
double |
getLogProb(java.util.List args,
java.lang.Object value)
Returns the log probability of the given value under this distribution. |
double |
getProb(java.util.List args,
java.lang.Object value)
Returns the probability of the given value under this distribution. |
java.lang.Object |
sampleVal(java.util.List args,
Type childType)
Samples a value according to this CPD given the args
. |
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 RoundedLogNormal(double mean, double varianceOfLog)
public RoundedLogNormal(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 double getLogProb(int n)
public java.lang.Object sampleVal(java.util.List args, Type childType)
CondProbDistrib
args
. The object returned should be of the specified type.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |