weka.classifiers
Class RangeCheckHelper

java.lang.Object
  extended by weka.classifiers.RangeCheckHelper

public class RangeCheckHelper
extends Object

Helper class for generating range checks.

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

Constructor Summary
RangeCheckHelper()
           
 
Method Summary
protected static String computePercentage(double value, double min, double max)
          Calculates the percentage of how much the value is outside the range.
static String isOutside(weka.core.Instance inst, int attIndex, double min, double max)
          Performs a check for the given instance, whether it exceeds the range.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeCheckHelper

public RangeCheckHelper()
Method Detail

computePercentage

protected static String computePercentage(double value,
                                          double min,
                                          double max)
Calculates the percentage of how much the value is outside the range.

Parameters:
value - the value to calculate the percentage for
min - the minimum of the range
max - the maximum of the range
Returns:
the generated string

isOutside

public static String isOutside(weka.core.Instance inst,
                               int attIndex,
                               double min,
                               double max)
Performs a check for the given instance, whether it exceeds the range. The attribute must be numeric.

Parameters:
inst - the instance to check
attIndex - the attribute to check
min - the minimum of the range (incl)
max - the maximum of the range (excl)
Returns:
null if not outside, otherwise error message


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