org.encog.ml.bayesian
Class BayesianChoice

java.lang.Object
  extended by org.encog.ml.bayesian.BayesianChoice
All Implemented Interfaces:
Serializable, Comparable<BayesianChoice>

public class BayesianChoice
extends Object
implements Serializable, 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
BayesianChoice(String label, double min, double max)
          Construct a continuous choice that covers the specified range.
BayesianChoice(String label, int index)
          Construct a discrete choice for the specified index.
 
Method Summary
 int compareTo(BayesianChoice other)
          
 String getLabel()
           
 double getMax()
           
 double getMin()
           
 boolean isIndex()
           
 String toFullString()
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BayesianChoice

public BayesianChoice(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(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 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 String toString()

Overrides:
toString in class Object

toFullString

public String toFullString()
Returns:
A string representation of this choice.

compareTo

public int compareTo(BayesianChoice other)

Specified by:
compareTo in interface Comparable<BayesianChoice>


Copyright © 2014. All Rights Reserved.