org.encog.ml.bayesian
public class BayesianEvent extends Object implements Serializable
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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.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 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.Copyright © 2014. All Rights Reserved.