Package com.bayesserver.inference
Enum QueryEvidenceMode
- java.lang.Object
-
- java.lang.Enum<QueryEvidenceMode>
-
- com.bayesserver.inference.QueryEvidenceMode
-
- All Implemented Interfaces:
Serializable
,Comparable<QueryEvidenceMode>
public enum QueryEvidenceMode extends Enum<QueryEvidenceMode>
Determines how predictions on variables with evidence are performed.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description RETAIN_QUERY_EVIDENCE
When predictions are made on a variable with evidence, the prediction simply returns the evidence.RETRACT_QUERY_EVIDENCE
When predictions are made on a variable with evidence, the variable's own evidence is ignored.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static QueryEvidenceMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static QueryEvidenceMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RETAIN_QUERY_EVIDENCE
public static final QueryEvidenceMode RETAIN_QUERY_EVIDENCE
When predictions are made on a variable with evidence, the prediction simply returns the evidence.
-
RETRACT_QUERY_EVIDENCE
public static final QueryEvidenceMode RETRACT_QUERY_EVIDENCE
When predictions are made on a variable with evidence, the variable's own evidence is ignored. For example, consider a network with variables {A,B,C}, with evidence set on all variables. If you query {P(A),P(B),P(C)}, P(A) will only use the evidence on B and C, P(B) will only use the evidence on A and C, and P(C) will only use the evidence on A and B.This allows the prediction of variables, without having to perform multiple calls to
Inference.query(com.bayesserver.inference.QueryOptions, com.bayesserver.inference.QueryOutput)
, each time setting a different variable to null (missing).
-
-
Method Detail
-
values
public static QueryEvidenceMode[] 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 (QueryEvidenceMode c : QueryEvidenceMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static QueryEvidenceMode 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
-
-