adams.data.weka.evaluator
Class IntervalEstimatorBased.SortedInterval

java.lang.Object
  extended by adams.data.weka.evaluator.AbstractCrossvalidatedInstanceEvaluator.EvaluationContainer
      extended by adams.data.weka.evaluator.IntervalEstimatorBased.SortedInterval
All Implemented Interfaces:
Comparable
Enclosing class:
IntervalEstimatorBased

public static class IntervalEstimatorBased.SortedInterval
extends AbstractCrossvalidatedInstanceEvaluator.EvaluationContainer

Helper class for sorting the confidence intervals.

Version:
$Revision: 4584 $
Author:
fracpete (fracpete at waikato dot ac dot nz)

Field Summary
protected  double m_AverageWidth
          the average width.
protected  double[][] m_Intervals
          the intervals.
protected  boolean m_RelativeWidths
          whether the widths are relative.
 
Fields inherited from class adams.data.weka.evaluator.AbstractCrossvalidatedInstanceEvaluator.EvaluationContainer
m_Instance
 
Constructor Summary
IntervalEstimatorBased.SortedInterval(weka.core.Instance inst, double[][] intervals, boolean relative)
          Initializes the intervals.
 
Method Summary
 int compareTo(Object o)
          Compares this object with the specified object for order.
 double getAverageWidth()
          Returns the average width of the stored intervals.
 double[][] getIntervals()
          Returns the stored intervals.
 String toString()
          Returns the intervals as string.
 
Methods inherited from class adams.data.weka.evaluator.AbstractCrossvalidatedInstanceEvaluator.EvaluationContainer
equals, getInstance
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_Intervals

protected double[][] m_Intervals
the intervals.


m_AverageWidth

protected double m_AverageWidth
the average width.


m_RelativeWidths

protected boolean m_RelativeWidths
whether the widths are relative.

Constructor Detail

IntervalEstimatorBased.SortedInterval

public IntervalEstimatorBased.SortedInterval(weka.core.Instance inst,
                                             double[][] intervals,
                                             boolean relative)
Initializes the intervals.

Parameters:
inst - the Instance this container is for
intervals - the intervals
relative - whether to use relative widths
Method Detail

getIntervals

public double[][] getIntervals()
Returns the stored intervals.

Returns:
the intervals

getAverageWidth

public double getAverageWidth()
Returns the average width of the stored intervals.

Returns:
the average width

compareTo

public int compareTo(Object o)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Only compares the commandlines of the two objects.

Specified by:
compareTo in interface Comparable
Specified by:
compareTo in class AbstractCrossvalidatedInstanceEvaluator.EvaluationContainer
Parameters:
o - the object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
ClassCastException - if the specified object's type prevents it from being compared to this object.

toString

public String toString()
Returns the intervals as string.

Specified by:
toString in class AbstractCrossvalidatedInstanceEvaluator.EvaluationContainer
Returns:
the intervals


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.