pt.tumba.ngram.bayes
Class Expectation

java.lang.Object
  extended by pt.tumba.ngram.bayes.Expectation
Direct Known Subclasses:
QuasiBayesExpectation

public class Expectation
extends java.lang.Object


Field Summary
protected  BayesNet bn
           
protected  DiscreteFunction current_function
           
protected  boolean do_produce_clusters
           
(package private) static int EXPECTED_VALUE
           
(package private) static int FOURTH_MOMENT
           
protected  Inference inference
           
protected  double[] results
           
(package private) static int SECOND_MOMENT
           
(package private) static int THIRD_MOMENT
           
 
Constructor Summary
Expectation(BayesNet b_n, boolean dpc)
          Constructor for an Expectation.
 
Method Summary
private  DiscreteFunction construct_values(ProbabilityVariable pv, int moment_order)
           
protected  void do_expectation_from_inference(DiscreteFunction df)
           
 void expectation()
          Calculation of Expectation.
 void expectation(DiscreteFunction df)
          Do the Expectation, assuming the input DiscreteFunction is a function only of the queried variable.
 void expectation(DiscreteFunction df, java.lang.String queried_variable_name)
          Do the Expectation, assuming the input DiscreteFunction is a function only of the queried variable.
 void expectation(DiscreteFunction df, java.lang.String[] order)
          Do the Expectation given order, assuming the input DiscreteFunction is a function only of the queried variable.
 void expectation(int moment_order)
          Calculation of Expectation.
 void expectation(int moment_order, java.lang.String queried_variable_name)
          Calculation of Expectation.
 void expectation(int moment_order, java.lang.String[] order)
          Calculation of expectation given order.
 void expectation(java.lang.String queried_variable_name)
          Calculation of Expectation.
 void expectation(java.lang.String[] order)
          Perform calculation of expectation given order.
 double[] get_results()
          Get the results of Expectation.
protected  void initialize_inference()
           
 void print()
          Print Expectation.
 void print(boolean should_print_bucket_tree)
          Print Expectation.
 void print(java.io.PrintStream out)
          Print Expectation.
 void print(java.io.PrintStream out, boolean should_print_bucket_tree)
          Print Expectation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bn

protected BayesNet bn

inference

protected Inference inference

results

protected double[] results

do_produce_clusters

protected boolean do_produce_clusters

current_function

protected DiscreteFunction current_function

EXPECTED_VALUE

static final int EXPECTED_VALUE
See Also:
Constant Field Values

SECOND_MOMENT

static final int SECOND_MOMENT
See Also:
Constant Field Values

THIRD_MOMENT

static final int THIRD_MOMENT
See Also:
Constant Field Values

FOURTH_MOMENT

static final int FOURTH_MOMENT
See Also:
Constant Field Values
Constructor Detail

Expectation

public Expectation(BayesNet b_n,
                   boolean dpc)
Constructor for an Expectation.

Method Detail

initialize_inference

protected void initialize_inference()

expectation

public void expectation()
Calculation of Expectation.


expectation

public void expectation(java.lang.String queried_variable_name)
Calculation of Expectation.


expectation

public void expectation(java.lang.String[] order)
Perform calculation of expectation given order.


expectation

public void expectation(int moment_order)
Calculation of Expectation.


expectation

public void expectation(int moment_order,
                        java.lang.String queried_variable_name)
Calculation of Expectation.


expectation

public void expectation(int moment_order,
                        java.lang.String[] order)
Calculation of expectation given order.


expectation

public void expectation(DiscreteFunction df)
Do the Expectation, assuming the input DiscreteFunction is a function only of the queried variable.


expectation

public void expectation(DiscreteFunction df,
                        java.lang.String queried_variable_name)
Do the Expectation, assuming the input DiscreteFunction is a function only of the queried variable.


expectation

public void expectation(DiscreteFunction df,
                        java.lang.String[] order)
Do the Expectation given order, assuming the input DiscreteFunction is a function only of the queried variable.


construct_values

private DiscreteFunction construct_values(ProbabilityVariable pv,
                                          int moment_order)

do_expectation_from_inference

protected void do_expectation_from_inference(DiscreteFunction df)

print

public void print()
Print Expectation.


print

public void print(java.io.PrintStream out)
Print Expectation.


print

public void print(boolean should_print_bucket_tree)
Print Expectation.


print

public void print(java.io.PrintStream out,
                  boolean should_print_bucket_tree)
Print Expectation.


get_results

public double[] get_results()
Get the results of Expectation.