org.encog.ml.bayesian
Class BayesianChoice
- java.lang.Object
-
- org.encog.ml.bayesian.BayesianChoice
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<BayesianChoice>
public class BayesianChoice extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<BayesianChoice>
A choice in a Bayesian network. Choices can be either discrete or continuous. For continuous choices the number must be made discrete by mapping it to discrete ranges.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description BayesianChoice(java.lang.String label, double min, double max)Construct a continuous choice that covers the specified range.BayesianChoice(java.lang.String label, int index)Construct a discrete choice for the specified index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intcompareTo(BayesianChoice other)java.lang.StringgetLabel()doublegetMax()doublegetMin()booleanisIndex()java.lang.StringtoFullString()java.lang.StringtoString()
-
-
-
Constructor Detail
-
BayesianChoice
public BayesianChoice(java.lang.String label, double min, double max)Construct a continuous choice that covers the specified range.- Parameters:
label- The label for this choice.min- The minimum value for this range.max- The maximum value for this range.
-
BayesianChoice
public BayesianChoice(java.lang.String label, int index)Construct a discrete choice for the specified index.- Parameters:
label- The label for this choice.index- The index for this choice.
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
- Returns:
- Get the label.
-
getMin
public double getMin()
- Returns:
- Get the min.
-
getMax
public double getMax()
- Returns:
- Get the max.
-
isIndex
public boolean isIndex()
- Returns:
- True, if this choice has an index, as opposed to min/max. If the value has an idex, then it is discrete.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toFullString
public java.lang.String toFullString()
- Returns:
- A string representation of this choice.
-
compareTo
public int compareTo(BayesianChoice other)
- Specified by:
compareToin interfacejava.lang.Comparable<BayesianChoice>
-
-
DMelt 3.0 © DataMelt by jWork.ORG