|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCOM.hugin.HAPI.Node
COM.hugin.HAPI.DiscreteNode
The DiscreteNode class. Base class for all discrete nodes.
| Method Summary | |
boolean |
caseIsSet(long c)
Returns true if a state has been set for this
DiscreteNode in case c; otherwise, returns
false. |
void |
computeExplanationData(long x,
DiscreteNode Y,
long y,
long maxSubsetSize)
Computes Bayes factor data for all (nonempty) subsets of evidence nodes up to the specified maximum size. |
void |
computeExplanationData(long state,
long maxSubsetSize)
Computes "normalized likelihoods" for the specified hypothesis and all (nonempty) subsets of evidence nodes up to the specified maximum size. |
void |
enterFinding(long state,
double finding)
Specifies a finding value for a given state with all other states unaffected. |
void |
generateTable()
Generates the table of this DiscreteNode from its model (a missing model will trigger an ExceptionUsage). |
double |
getBelief(long state)
Returns the belief for the specified state of this DiscreteNode. |
long |
getCaseState(long c)
Returns the state of this DiscreteNode for case c. |
double |
getEnteredFinding(long state)
Returns the entered finding for the specified state of this node. |
double |
getEntropy()
Computes the entropy of this node. |
double |
getExpectedUtility(long state)
Returns the expected utility associated with the specified action (state). |
NetworkModel.Kind |
getKind()
Returns the Kind of this DiscreteNode. |
double |
getMutualInformation(DiscreteNode node)
Computes the mutual information between this node and the specified node. |
long |
getNumberOfStates()
Returns the number of states of this node. |
double |
getPredictedBelief(long state,
long time)
Returns the predicted belief for the specified state of this DiscreteNode at the specified time point. |
double |
getPropagatedFinding(long state)
Returns the propagated finding. |
long |
getSampledState()
Returns the state index of this DiscreteNode for the configuration generated by the most recent call to Domain.simulate(). |
double[] |
getSensitivityConstants(long input)
Returns the four constants of the specified sensitivity function. |
double[] |
getSensitivityConstants(long input,
long output)
Returns the four constants of the specified sensitivity function. |
long |
getStateIndex(java.lang.String label)
Returns the index of the state matching the specified label. |
java.lang.String |
getStateLabel(long state)
Returns the label of the specified state. |
void |
retractFindings()
Retracts all findings for this node. |
void |
selectState(long state)
Selects the specified state of this node. |
void |
setCaseState(long c,
long state)
Sets the state of this DiscreteNode to state in
case c. |
void |
setNumberOfStates(long stateCount)
Sets the number of states of this node. |
void |
setStateLabel(long state,
java.lang.String newLabel)
Sets the label of the specified state. |
void |
unsetCase(long c)
Specifies that the state of this DiscreteNode is "unknown" for case c. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public double getBelief(long state)
throws ExceptionHugin
state - an integer value representing which state to examine.
ExceptionHugin
public double getPredictedBelief(long state,
long time)
throws ExceptionHugin
computeDBNPredictions.
state - an integer value representing which state to examine.time - time slice index (a nonnegative integer less than the
number of predicted time slices)
ExceptionHugin
public double getExpectedUtility(long state)
throws ExceptionHugin
state - An integer value designating which state to
examine.
ExceptionHugin
public double getEnteredFinding(long state)
throws ExceptionHugin
state - an integer value representing which state to examine.
ExceptionHugin
public double getPropagatedFinding(long state)
throws ExceptionHugin
state - an integer representing the state to be examined.
ExceptionHugin
public void retractFindings()
throws ExceptionHugin
ExceptionHugin
public long getNumberOfStates()
throws ExceptionHugin
ExceptionHugin
public void setNumberOfStates(long stateCount)
throws ExceptionHugin
ExceptionHugin
public java.lang.String getStateLabel(long state)
throws ExceptionHugin
state - the index (a nonnegative integer) of the state;
must be less than the number of states of the node
ExceptionHugin
public long getStateIndex(java.lang.String label)
throws ExceptionHugin
label - the state label to search for
ExceptionHugin
public void setStateLabel(long state,
java.lang.String newLabel)
throws ExceptionHugin
state - the index (a nonnegative integer) of the state;
must be less than the number of states of the node.newLabel - the desired state label (a String).
ExceptionHugin
public void selectState(long state)
throws ExceptionHugin
ExceptionHugin
public void computeExplanationData(long x,
DiscreteNode Y,
long y,
long maxSubsetSize)
throws ExceptionHugin
getExplanation and getExplanationScore.
x - state of the primary hypothesis node (this node)Y - the alternative hypothesis nodey - state of the alternative hypothesis nodemaxSubsetSize - data for all subsets of evidence nodes up
to this size are computed
ExceptionHugin
public void computeExplanationData(long state,
long maxSubsetSize)
throws ExceptionHugin
getExplanation and getExplanationScore.
state - state of the hypothesis node (this node)maxSubsetSize - data for all subsets of evidence nodes up
to this size are computed
ExceptionHugin
public void enterFinding(long state,
double finding)
throws ExceptionHugin
state - an integer representing the state to be
selected. States are numbered consecutively from 0 and upwards.finding - A nonnegative real number as the finding value.
ExceptionHuginpublic NetworkModel.Kind getKind()
getKind in class Node
public void setCaseState(long c,
long state)
throws ExceptionHugin
state in
case c.
c - the index of the case (an integer in the range 0, ...,
number of cases - 1)state - the state of the specified case for this Node
ExceptionHugin
public void unsetCase(long c)
throws ExceptionHugin
c.
c - the index of the case (an integer in the range 0, ..., number
of cases - 1)
ExceptionHugin
public boolean caseIsSet(long c)
throws ExceptionHugin
true if a state has been set for this
DiscreteNode in case c; otherwise, returns
false.
c - the index of the case (an integer in the range 0, ..., number
of cases - 1)
ExceptionHugin
public long getCaseState(long c)
throws ExceptionHugin
c.
c - the index of the case (an integer in the range 0, ..., number
of cases - 1)
ExceptionHugin
public long getSampledState()
throws ExceptionHugin
Domain.simulate().
ExceptionHugin
public void generateTable()
throws ExceptionHugin
ExceptionHugin
public double getEntropy()
throws ExceptionHugin
ExceptionHugin
public double getMutualInformation(DiscreteNode node)
throws ExceptionHugin
node - the other node
ExceptionHugin
public double[] getSensitivityConstants(long input)
throws ExceptionHugin
computeSensitivityData. If the results produced by that call
have been invalidated, a usage exception is thrown.
input - specifies a conditional probability (or policy)
parameter of this node (i.e., input is the index
of an entry in the CPT/policy of this node).
ExceptionHugin
public double[] getSensitivityConstants(long input,
long output)
throws ExceptionHugin
computeSensitivityData.
If the results produced by that call have been invalidated, a
usage exception is thrown.
input - specifies a conditional probability (or policy)
parameter of this node (i.e., input is the index
of an entry in the CPT/policy of this node).output - identifies one of the output probabilities
specified in the call to computeSensitivityData.
ExceptionHugin
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||