|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.AbstractCondProbDistrib blog.distrib.MixtureDistrib
public class MixtureDistrib
A mixture of conditional probability distributions. The distributions being mixed together can have arguments, but the mixing probabilities cannot depend on the arguments. Currently this class does not have the standard constructor taking a list of parameters.
Constructor Summary | |
---|---|
MixtureDistrib(CondProbDistrib[] distribs,
double[] probs)
Creates a new MixtureDistrib that combines the given distributions according to the given probabilities. |
Method Summary | |
---|---|
double |
getLogProb(java.util.List args,
java.lang.Object value)
Returns the natural log of the value returned by getProb. |
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 blog.AbstractCondProbDistrib |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MixtureDistrib(CondProbDistrib[] distribs, double[] probs)
Method Detail |
---|
public double getProb(java.util.List args, java.lang.Object value)
CondProbDistrib
childValue
given the argument values args
.
For a continuous distribution, returns the conditional probability
density at childValue
.
public double getLogProb(java.util.List args, java.lang.Object value)
CondProbDistrib
getLogProb
in interface CondProbDistrib
getLogProb
in class AbstractCondProbDistrib
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 |