pt.tumba.ngram.bayes
Class ConstantDensityRatioSet

java.lang.Object
  extended by pt.tumba.ngram.bayes.DiscreteFunction
      extended by pt.tumba.ngram.bayes.ProbabilityFunction
          extended by pt.tumba.ngram.bayes.QBProbabilityFunction
              extended by pt.tumba.ngram.bayes.FinitelyGeneratedSet
                  extended by pt.tumba.ngram.bayes.ConstantDensityRatioSet
All Implemented Interfaces:
java.io.Serializable, MappingDouble

public class ConstantDensityRatioSet
extends FinitelyGeneratedSet
implements MappingDouble

See Also:
Serialized Form

Field Summary
private static double ACCURACY
           
private  double k
           
private static int LOWER_EXPECTATION_BRACKET
           
private  DiscreteFunction temporary_discrete_function
           
private static int UPPER_EXPECTATION_BRACKET
           
 
Fields inherited from class pt.tumba.ngram.bayes.QBProbabilityFunction
lower_envelope, upper_envelope
 
Fields inherited from class pt.tumba.ngram.bayes.ProbabilityFunction
bn, properties
 
Fields inherited from class pt.tumba.ngram.bayes.DiscreteFunction
values, variables
 
Constructor Summary
ConstantDensityRatioSet(ProbabilityFunction pf, double kk)
          Constructor for an ConstantDensityRatioSet ProbabilityFunction object and given constant.
 
Method Summary
 double[] expected_values(DiscreteFunction df)
          Perform calculation of expected value for density ratio.
 double map(int map_type, double map_input)
          To conform to the Mapping interface demanded by the Bracketing class, the method map() must be present.
 double[] posterior_expected_values(DiscreteFunction df)
          Perform calculation of posterior expected value.
 ProbabilityFunction posterior_marginal()
          Perform calculation of marginal posterior distributions for.
 
Methods inherited from class pt.tumba.ngram.bayes.QBProbabilityFunction
get_lower_envelope, get_upper_envelope, print, print
 
Methods inherited from class pt.tumba.ngram.bayes.ProbabilityFunction
add_property, evaluate, evaluate, expected_value, get_enumerated_properties, get_position_from_indexes, get_properties, posterior_expected_value, process_properties, remove_property, remove_property, save_xml_0_3, save_xml, set_properties, set_value, variance
 
Methods inherited from class pt.tumba.ngram.bayes.DiscreteFunction
evaluate, get_index, get_indexes, get_position_from_indexes, get_value, get_values, get_variable, get_variables, memberOf, multiply, normalize_first, normalize, number_values, number_variables, same_variables, set_value, set_values, set_variable, sum_out
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

k

private double k

temporary_discrete_function

private DiscreteFunction temporary_discrete_function

LOWER_EXPECTATION_BRACKET

private static final int LOWER_EXPECTATION_BRACKET
See Also:
Constant Field Values

UPPER_EXPECTATION_BRACKET

private static final int UPPER_EXPECTATION_BRACKET
See Also:
Constant Field Values

ACCURACY

private static final double ACCURACY
See Also:
Constant Field Values
Constructor Detail

ConstantDensityRatioSet

public ConstantDensityRatioSet(ProbabilityFunction pf,
                               double kk)
Constructor for an ConstantDensityRatioSet ProbabilityFunction object and given constant.

Method Detail

posterior_marginal

public ProbabilityFunction posterior_marginal()
Perform calculation of marginal posterior distributions for. a density ratio global neighborhood.


expected_values

public double[] expected_values(DiscreteFunction df)
Perform calculation of expected value for density ratio.


posterior_expected_values

public double[] posterior_expected_values(DiscreteFunction df)
Perform calculation of posterior expected value. Assumes that the probability values are not normalized; probability values are p(x, e) where e is the fixed evidence


map

public double map(int map_type,
                  double map_input)
To conform to the Mapping interface demanded by the Bracketing class, the method map() must be present.

Specified by:
map in interface MappingDouble