Package weka.associations
Class NumericItem
java.lang.Object
weka.associations.Item
weka.associations.NumericItem
- All Implemented Interfaces:
Serializable
,Comparable<Item>
Class that encapsulates a numeric item.
- Version:
- $Revision: 10172 $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionNumericItem
(Attribute att, double splitPoint, NumericItem.Comparison comp) Constructs a newNumericItem
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Equals.Gets the comparison operator for this item.Get this item's comparison operator as a String.Get this item's value as a String.double
Gets the numeric test.toString
(boolean freq) A string representation of this item, (i.e.Methods inherited from class weka.associations.Item
compareTo, decreaseFrequency, decreaseFrequency, getAttribute, getFrequency, hashCode, increaseFrequency, increaseFrequency, toString
-
Constructor Details
-
NumericItem
Constructs a newNumericItem
- Parameters:
att
- the attribute that backs the item.splitPoint
- the numeric test value.comp
- the comparison operator.- Throws:
Exception
- if the NumericItem can't be constructed.
-
-
Method Details
-
getSplitPoint
public double getSplitPoint()Gets the numeric test.- Returns:
- the numeric test value for this item.
-
getComparison
Gets the comparison operator for this item.- Returns:
- the comparison operator for this item.
-
getItemValueAsString
Get this item's value as a String.- Specified by:
getItemValueAsString
in classItem
- Returns:
- this item's value as a String.
-
getComparisonAsString
Get this item's comparison operator as a String.- Specified by:
getComparisonAsString
in classItem
- Returns:
- this item's comparison operator as a String.
-
toString
A string representation of this item, (i.e.- ). This default implementation just prints the attribute name and (optionally) frequency information.
-
equals
Equals. Compares the attribute, numeric test and comparison operator
-