Enum DiscretePriorMethod
- java.lang.Object
-
- java.lang.Enum<DiscretePriorMethod>
-
- com.bayesserver.learning.parameters.DiscretePriorMethod
-
- All Implemented Interfaces:
Serializable
,Comparable<DiscretePriorMethod>
public enum DiscretePriorMethod extends Enum<DiscretePriorMethod>
The type of discrete prior to use for discrete distributions during parameter learning. The type of prior can be set for all distributions or individually allowing fine grained control.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FREQUENCIES
The prior for each combination is adjusted based on the frequency of that combination in the data.UNIFORM
The prior is uniformly distributed over all discrete combinations.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DiscretePriorMethod
valueOf(String name)
Returns the enum constant of this type with the specified name.static DiscretePriorMethod[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNIFORM
public static final DiscretePriorMethod UNIFORM
The prior is uniformly distributed over all discrete combinations. This allows each combination to have a chance of happening, even if it did occur in the data.This is useful when you still want to be able to make a prediction even when the combinations found in the data are not possible in a query due to other evidence.
A consequence of uniform priors is that combinations that are clearly impossible have a very small chance of occurring, such as Pregnant Males or a country belonging to different continents.
This can be set for all distributions or individually.
-
FREQUENCIES
public static final DiscretePriorMethod FREQUENCIES
The prior for each combination is adjusted based on the frequency of that combination in the data.This means that you do not get situations where a small probability is given to a combination such as Pregnant Male. Sometimes a uniform prior is better when the data doesn't reflect all possible combinations.
This can be set for all distributions or individually.
-
-
Method Detail
-
values
public static DiscretePriorMethod[] 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 (DiscretePriorMethod c : DiscretePriorMethod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DiscretePriorMethod 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
-
-