Package com.bayesserver.inference
Enum QueryComparison
- java.lang.Object
-
- java.lang.Enum<QueryComparison>
-
- com.bayesserver.inference.QueryComparison
-
- All Implemented Interfaces:
Serializable
,Comparable<QueryComparison>
public enum QueryComparison extends Enum<QueryComparison>
Determines whether and how queried values (e.g. probabilities) are adjusted to be comparisons.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DIFFERENCE
The difference between the current queried value and the value calculated usingBase evidence
.LIFT
Each queried value is divided by its value when calculated usingBase evidence
.NONE
No comparison is made.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static QueryComparison
valueOf(String name)
Returns the enum constant of this type with the specified name.static QueryComparison[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final QueryComparison NONE
No comparison is made. This is the default.
-
DIFFERENCE
public static final QueryComparison DIFFERENCE
The difference between the current queried value and the value calculated usingBase evidence
. Returns a value between -1 and 1 for discrete values. This comparison is useful because it gives less weight when small probabilities are involved.
-
LIFT
public static final QueryComparison LIFT
Each queried value is divided by its value when calculated usingBase evidence
.A value of NaN will be returned if the probability before and after is zero. This is by design.
A value of Infinity will be returned if the probability before is zero and the probability after is positive. This is by design.
-
-
Method Detail
-
values
public static QueryComparison[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (QueryComparison c : QueryComparison.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static QueryComparison valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-