blog.distrib
Class BinaryBernoulliDistrib
java.lang.Object
blog.AbstractCondProbDistrib
blog.distrib.BinaryBernoulliDistrib
- All Implemented Interfaces:
- CondProbDistrib
public class BinaryBernoulliDistrib
- extends AbstractCondProbDistrib
A distribution over {0,1}. It takes one parameter, which is
the probability of true
. It takes no arguments.
Method Summary |
double |
getProb(java.util.List args,
java.lang.Object value)
For a discrete distribution, returns the conditional probability of
childValue given the argument values args . |
java.lang.Object |
sampleVal(java.util.List args,
Type childType)
Samples a value according to this CPD given the args
. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BinaryBernoulliDistrib
public BinaryBernoulliDistrib(java.util.List params)
getProb
public double getProb(java.util.List args,
java.lang.Object value)
- Description copied from interface:
CondProbDistrib
- For a discrete distribution, returns the conditional probability of
childValue
given the argument values args
.
For a continuous distribution, returns the conditional probability
density at childValue
.
sampleVal
public java.lang.Object sampleVal(java.util.List args,
Type childType)
- Description copied from interface:
CondProbDistrib
- Samples a value according to this CPD given the
args
. The object returned should be of the specified type.