pt.tumba.ngram.bayes
Class ConstantDensityRatioSet
java.lang.Object
pt.tumba.ngram.bayes.DiscreteFunction
pt.tumba.ngram.bayes.ProbabilityFunction
pt.tumba.ngram.bayes.QBProbabilityFunction
pt.tumba.ngram.bayes.FinitelyGeneratedSet
pt.tumba.ngram.bayes.ConstantDensityRatioSet
- All Implemented Interfaces:
- java.io.Serializable, MappingDouble
public class ConstantDensityRatioSet
- extends FinitelyGeneratedSet
- implements MappingDouble
- See Also:
- Serialized Form
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 |
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
ConstantDensityRatioSet
public ConstantDensityRatioSet(ProbabilityFunction pf,
double kk)
- Constructor for an ConstantDensityRatioSet
ProbabilityFunction object and given constant.
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