|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.bayesian.BayesianEvent
public class BayesianEvent
Events make up a Bayesian network. Each evidence or outcome event usually corresponds to one number in the training data. A event is always discrete. However, continues values can be range-mapped to discrete values.
Constructor Summary | |
---|---|
BayesianEvent(String theLabel)
Construct a boolean event. |
|
BayesianEvent(String theLabel,
List<BayesianChoice> theChoices)
Construct an event with the specified label and choices. |
|
BayesianEvent(String theLabel,
String[] theChoices)
Construct an event with the specified label and choices. |
Method Summary | |
---|---|
void |
addChild(BayesianEvent e)
Add a child event. |
void |
addParent(BayesianEvent e)
Add a parent event. |
int |
calculateParameterCount()
|
void |
finalizeStructure()
Finalize the structure. |
static String |
formatEventName(BayesianEvent event,
int value)
Format the event name with +, - and =. |
List<BayesianEvent> |
getChildren()
|
BayesianChoice |
getChoice(int arg)
Return the choice specified by the index. |
Set<BayesianChoice> |
getChoices()
|
String |
getLabel()
|
List<BayesianEvent> |
getParents()
|
BayesianTable |
getTable()
|
boolean |
hasChildren()
|
boolean |
hasGiven(String l)
Return true if the event has the specified given event. |
boolean |
hasParents()
|
boolean |
isBoolean()
|
int |
matchChoiceToRange(double d)
Match a continuous value to a discrete range. |
void |
removeAllRelations()
Remove all relations. |
void |
reset()
Reset the logic table. |
boolean |
rollArgs(double[] args)
Roll the specified arguments through all of the possible values, return false if we are at the final iteration. |
String |
toFullString()
|
String |
toString()
|
void |
validate()
Validate the event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BayesianEvent(String theLabel, List<BayesianChoice> theChoices)
theLabel
- The label.theChoices
- The choices, or states.public BayesianEvent(String theLabel, String[] theChoices)
theLabel
- The label.theChoices
- The choices, or states.public BayesianEvent(String theLabel)
theLabel
- The label.Method Detail |
---|
public List<BayesianEvent> getParents()
public List<BayesianEvent> getChildren()
public String getLabel()
public void addChild(BayesianEvent e)
e
- The child event.public void addParent(BayesianEvent e)
e
- The parent event.public boolean hasParents()
public boolean hasChildren()
public String toFullString()
public String toString()
toString
in class Object
public int calculateParameterCount()
public Set<BayesianChoice> getChoices()
public BayesianTable getTable()
public void finalizeStructure()
public void validate()
public boolean isBoolean()
public boolean rollArgs(double[] args)
args
- The arguments to enumerate.
public void removeAllRelations()
public static String formatEventName(BayesianEvent event, int value)
event
- The event to format.value
- The value to format for.
public boolean hasGiven(String l)
l
- The event to check for.
public void reset()
public int matchChoiceToRange(double d)
d
- The continuous value.
public BayesianChoice getChoice(int arg)
arg
- The argument number.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |