org.drools.beliefs.bayes
Class BayesInstance<T>
java.lang.Object
org.drools.beliefs.bayes.BayesInstance<T>
public class BayesInstance<T>
- extends Object
|
Method Summary |
void |
applyEvidence()
|
void |
buildFieldMappings(Class<T> target)
|
void |
buildParameterMapping(Class<T> target)
|
void |
collectChildEvidence(JunctionTreeClique clique,
JunctionTreeClique startClique)
|
void |
collectEvidence(JunctionTreeClique clique)
|
void |
collectParentEvidence(JunctionTreeClique clique,
JunctionTreeSeparator sep,
JunctionTreeClique child,
JunctionTreeClique startClique)
|
void |
distributeChildEvidence(JunctionTreeClique clique,
JunctionTreeClique startClique)
|
void |
distributeEvidence(JunctionTreeClique clique)
|
void |
distributeParentEvidence(JunctionTreeClique clique,
JunctionTreeSeparator sep,
JunctionTreeClique child,
JunctionTreeClique startClique)
|
CliqueState[] |
getCliqueStates()
|
Map<String,BayesVariable> |
getFieldNames()
|
GlobalUpdateListener |
getGlobalUpdateListener()
|
PassMessageListener |
getPassMessageListener()
|
SeparatorState[] |
getSeparatorStates()
|
Map<String,BayesVariable> |
getVariables()
|
BayesVariableState[] |
getVarStates()
|
void |
globalUpdate()
|
void |
globalUpdate(JunctionTreeClique clique)
|
boolean |
isDecided()
|
boolean |
isDirty()
|
T |
marginalize()
|
void |
marginalize(BayesVariableState varState)
|
BayesVariableState |
marginalize(String name)
|
void |
passMessage(JunctionTreeClique sourceClique,
JunctionTreeSeparator sep,
JunctionTreeClique targetClique)
Passes a message from node1 to node2. |
void |
recurseGlobalUpdate(JunctionTreeClique clique)
|
void |
reset()
|
void |
setDecided(BayesVariable var,
boolean bool)
|
void |
setDecided(String varName,
boolean bool)
|
void |
setGlobalUpdateListener(GlobalUpdateListener globalUpdateListener)
|
void |
setLikelyhood(BayesLikelyhood likelyhood)
|
void |
setLikelyhood(BayesVariable var,
double[] distribution)
|
void |
setLikelyhood(String varName,
double[] distribution)
|
void |
setPassMessageListener(PassMessageListener passMessageListener)
|
void |
setTargetClass(Class<T> targetClass)
|
void |
unsetLikelyhood(BayesVariable var)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BayesInstance
public BayesInstance(JunctionTree tree,
Class<T> targetClass)
BayesInstance
public BayesInstance(JunctionTree tree)
reset
public void reset()
setTargetClass
public void setTargetClass(Class<T> targetClass)
buildFieldMappings
public void buildFieldMappings(Class<T> target)
buildParameterMapping
public void buildParameterMapping(Class<T> target)
getGlobalUpdateListener
public GlobalUpdateListener getGlobalUpdateListener()
setGlobalUpdateListener
public void setGlobalUpdateListener(GlobalUpdateListener globalUpdateListener)
getPassMessageListener
public PassMessageListener getPassMessageListener()
setPassMessageListener
public void setPassMessageListener(PassMessageListener passMessageListener)
getVariables
public Map<String,BayesVariable> getVariables()
getFieldNames
public Map<String,BayesVariable> getFieldNames()
setDecided
public void setDecided(String varName,
boolean bool)
setDecided
public void setDecided(BayesVariable var,
boolean bool)
isDecided
public boolean isDecided()
isDirty
public boolean isDirty()
setLikelyhood
public void setLikelyhood(String varName,
double[] distribution)
unsetLikelyhood
public void unsetLikelyhood(BayesVariable var)
setLikelyhood
public void setLikelyhood(BayesVariable var,
double[] distribution)
setLikelyhood
public void setLikelyhood(BayesLikelyhood likelyhood)
globalUpdate
public void globalUpdate()
applyEvidence
public void applyEvidence()
globalUpdate
public void globalUpdate(JunctionTreeClique clique)
recurseGlobalUpdate
public void recurseGlobalUpdate(JunctionTreeClique clique)
collectEvidence
public void collectEvidence(JunctionTreeClique clique)
collectParentEvidence
public void collectParentEvidence(JunctionTreeClique clique,
JunctionTreeSeparator sep,
JunctionTreeClique child,
JunctionTreeClique startClique)
collectChildEvidence
public void collectChildEvidence(JunctionTreeClique clique,
JunctionTreeClique startClique)
distributeEvidence
public void distributeEvidence(JunctionTreeClique clique)
distributeParentEvidence
public void distributeParentEvidence(JunctionTreeClique clique,
JunctionTreeSeparator sep,
JunctionTreeClique child,
JunctionTreeClique startClique)
distributeChildEvidence
public void distributeChildEvidence(JunctionTreeClique clique,
JunctionTreeClique startClique)
passMessage
public void passMessage(JunctionTreeClique sourceClique,
JunctionTreeSeparator sep,
JunctionTreeClique targetClique)
- Passes a message from node1 to node2.
node1 projects its trgPotentials into the separator.
node2 then absorbs those trgPotentials from the separator.
- Parameters:
sourceClique - sep - targetClique -
marginalize
public BayesVariableState marginalize(String name)
marginalize
public T marginalize()
marginalize
public void marginalize(BayesVariableState varState)
getSeparatorStates
public SeparatorState[] getSeparatorStates()
getCliqueStates
public CliqueState[] getCliqueStates()
getVarStates
public BayesVariableState[] getVarStates()
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.