weka.classifiers
Class RangeCheckHelper
java.lang.Object
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)
|
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 |
RangeCheckHelper
public RangeCheckHelper()
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 formin - the minimum of the rangemax - 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 checkattIndex - the attribute to checkmin - 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.