|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.tumba.ngram.bayes.InferenceGraph
public class InferenceGraph
Field Summary | |
---|---|
static int |
CONSTANT_DENSITY_BOUNDED
|
static int |
CONSTANT_DENSITY_RATIO
|
private java.lang.String |
defaultBayesNetName
|
static int |
EPSILON_CONTAMINATED
|
static int |
EXPECTATION
|
static int |
EXPLANATION
|
static int |
FULL_EXPLANATION
|
static int |
MARGINAL_POSTERIOR
|
static int |
NO_CREDAL_SET
|
(package private) java.util.Vector |
nodes
|
(package private) QuasiBayesExpectation |
qbe
|
(package private) QuasiBayesInference |
qbi
|
(package private) QuasiBayesNet |
qbn
|
static int |
SENSITIVITY_ANALYSIS
|
static int |
TOTAL_VARIATION
|
Constructor Summary | |
---|---|
InferenceGraph()
|
|
InferenceGraph(BayesNet b_n)
|
|
InferenceGraph(java.lang.String filename)
|
|
InferenceGraph(java.net.URL url)
|
Method Summary | |
---|---|
void |
add_network_property(java.lang.String prop)
Add a property to the network. |
void |
change_values(InferenceGraphNode node,
java.lang.String[] values)
Change the values of a variable. |
java.lang.String |
check_name(java.lang.String n)
Determine whether or not a name is valid and/or repeated. |
(package private) boolean |
convert_bayes_net()
|
(package private) QuasiBayesNet |
convert_graph()
|
boolean |
create_arc(InferenceGraphNode parent,
InferenceGraphNode child)
Create an arc from parent to child. |
void |
create_node(int x,
int y)
Create a new node in the network. |
void |
delete_arc(InferenceGraphNode parent,
InferenceGraphNode child)
Delete the arc from parent to child. |
void |
delete_node(InferenceGraphNode node)
Delete a node in the network. |
java.util.Enumeration |
elements()
Get the nodes in the network as an Enumeration object. |
private java.lang.String |
generate_name(int i)
|
private void |
generate_parents_and_children()
|
QuasiBayesNet |
get_bayes_net()
|
double |
get_global_neighborhood_parameter()
Get the parameter for the global neighborhood modeled by the network. |
int |
get_global_neighborhood_type()
Get the type of global neighborhood modeled by the network. |
java.lang.String |
get_name()
Get the name of the network. |
java.util.Vector |
get_network_properties()
Get the properties of the network. |
private InferenceGraphNode |
get_node(DiscreteVariable dv)
|
java.util.Vector |
get_nodes()
Get the nodes in the network. |
boolean |
hasCycle(InferenceGraphNode bottom_node,
InferenceGraphNode head_node)
Determines whether the connection of bottom_node to head_node would cause the network to have a cycle. |
int |
number_nodes()
Get the number of variables in the network |
void |
print_bayes_net(java.io.PrintStream out)
Print the QuasiBayesNet. |
void |
print_expectation(java.io.PrintStream pstream,
java.lang.String queried_variable,
boolean do_compute_clusters,
boolean show_bucket_tree)
Print information about a posterior expectation for the Bayesian network into the given PrintStream. |
void |
print_explanation(java.io.PrintStream pstream,
boolean show_bucket_tree)
Print information about an explanation for the Bayesian network into the given PrintStream. |
void |
print_full_explanation(java.io.PrintStream pstream,
boolean show_bucket_tree)
Print information about a full explanation for the Bayesian network into the given PrintStream. |
void |
print_marginal(java.io.PrintStream pstream,
java.lang.String queried_variable,
boolean do_compute_clusters,
boolean show_bucket_tree)
Print information about a posterior marginal for the Bayesian network into the given PrintStream. |
void |
print_sensitivity_analysis(java.io.PrintStream pstream)
Print the metrics for sensitivity analysis of the Bayesian network into the given PrintStream. |
void |
print()
Print method for an InferenceGraph |
void |
print(java.io.PrintStream out)
Print method for an InferenceGraph |
void |
remove_network_property(int index)
Remove a property from the network. |
void |
reset_expectation()
Reset the QBExpectation. |
void |
reset_marginal()
Reset the QBInference. |
void |
save_bif(java.io.PrintStream out)
Save the Bayesian network into a PrintStream in the BIF InterchangeFormat. |
void |
save_bugs(java.io.PrintStream out)
Save the Bayesian networks in BUGS format into a PrintStream. |
void |
save_xml(java.io.PrintStream out)
Save the Bayesian network into a PrintStream in the XML InterchangeFormat. |
void |
set_global_neighborhood_parameter(double parameter)
Set the parameter for the global neighborhood modeled by the network. |
void |
set_global_neighborhood(int type)
Set the global neighborhood type. |
void |
set_name(java.lang.String n)
Set the name of the network. |
void |
set_network_properties(java.util.Vector prop)
Set the properties of the network. |
void |
set_pos(InferenceGraphNode node,
java.awt.Point position)
Set a value for the position of the node. |
java.lang.String |
validate_value(java.lang.String value)
Check whether a string is a valid name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
QuasiBayesNet qbn
QuasiBayesInference qbi
QuasiBayesExpectation qbe
java.util.Vector nodes
private final java.lang.String defaultBayesNetName
public static final int MARGINAL_POSTERIOR
public static final int EXPECTATION
public static final int EXPLANATION
public static final int FULL_EXPLANATION
public static final int SENSITIVITY_ANALYSIS
public static final int NO_CREDAL_SET
public static final int CONSTANT_DENSITY_RATIO
public static final int EPSILON_CONTAMINATED
public static final int CONSTANT_DENSITY_BOUNDED
public static final int TOTAL_VARIATION
Constructor Detail |
---|
public InferenceGraph()
public InferenceGraph(BayesNet b_n)
public InferenceGraph(java.lang.String filename) throws java.io.IOException, IFException
java.io.IOException
IFException
public InferenceGraph(java.net.URL url) throws java.io.IOException, IFException
java.io.IOException
IFException
Method Detail |
---|
public QuasiBayesNet get_bayes_net()
boolean convert_bayes_net()
private void generate_parents_and_children()
private InferenceGraphNode get_node(DiscreteVariable dv)
QuasiBayesNet convert_graph()
private java.lang.String generate_name(int i)
public java.lang.String get_name()
public void set_name(java.lang.String n)
public java.util.Vector get_network_properties()
public void set_network_properties(java.util.Vector prop)
public int get_global_neighborhood_type()
public void set_global_neighborhood(int type)
public double get_global_neighborhood_parameter()
public void set_global_neighborhood_parameter(double parameter)
public void remove_network_property(int index)
public void add_network_property(java.lang.String prop)
public java.lang.String check_name(java.lang.String n)
public java.lang.String validate_value(java.lang.String value)
public void print_bayes_net(java.io.PrintStream out)
public void print_marginal(java.io.PrintStream pstream, java.lang.String queried_variable, boolean do_compute_clusters, boolean show_bucket_tree)
queried_variable
- indicates the variable of interest.show_bucket_tree
- determines whether or not to present
a description of the BucketTree.public void reset_marginal()
public void print_expectation(java.io.PrintStream pstream, java.lang.String queried_variable, boolean do_compute_clusters, boolean show_bucket_tree)
queried_variable
- indicates the variable of interest.show_bucket_tree
- determines whether or not to present
a description of the BucketTree.public void reset_expectation()
public void print_explanation(java.io.PrintStream pstream, boolean show_bucket_tree)
show_bucket_tree
- determines whether or not to present
a description of the BucketTree.public void print_full_explanation(java.io.PrintStream pstream, boolean show_bucket_tree)
show_bucket_tree
- determines whether or not to present
a description of the BucketTree.public void print_sensitivity_analysis(java.io.PrintStream pstream)
public void save_bif(java.io.PrintStream out)
public void save_xml(java.io.PrintStream out)
public void save_bugs(java.io.PrintStream out)
public void print()
public void print(java.io.PrintStream out)
public java.util.Vector get_nodes()
public java.util.Enumeration elements()
public int number_nodes()
public void create_node(int x, int y)
public boolean create_arc(InferenceGraphNode parent, InferenceGraphNode child)
public void delete_node(InferenceGraphNode node)
public void delete_arc(InferenceGraphNode parent, InferenceGraphNode child)
public boolean hasCycle(InferenceGraphNode bottom_node, InferenceGraphNode head_node)
public void change_values(InferenceGraphNode node, java.lang.String[] values)
public void set_pos(InferenceGraphNode node, java.awt.Point position)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |