Package weka.classifiers
Class RangeCheckHelper
- java.lang.Object
-
- weka.classifiers.RangeCheckHelper
-
public class RangeCheckHelper extends Object
Helper class for generating range checks.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description RangeCheckHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 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
-
-