Package weka.classifiers.rules
Class DecisionTableHashKey
java.lang.Object
weka.classifiers.rules.DecisionTableHashKey
- All Implemented Interfaces:
Serializable,RevisionHandler
Class providing hash table keys for DecisionTable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDecisionTableHashKey(double[] t) Constructor for a hashKeyDecisionTableHashKey(Instance t, int numAtts, boolean ignoreClass) Constructor for a hashKey -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if two instances are equalReturns the revision string.inthashCode()Calculates a hash codevoidPrints the hash codeConvert a hash entry to a string
-
Constructor Details
-
DecisionTableHashKey
Constructor for a hashKey- Parameters:
t- an instance from which to generate a keynumAtts- the number of attributesignoreClass- if true treat the class as a normal attribute- Throws:
Exception- if something goes wrong
-
DecisionTableHashKey
public DecisionTableHashKey(double[] t) Constructor for a hashKey- Parameters:
t- an array of feature values
-
-
Method Details
-
toString
Convert a hash entry to a string- Parameters:
t- the set of instancesmaxColWidth- width to make the fields- Returns:
- string representation of the hash entry
-
hashCode
public int hashCode()Calculates a hash code -
equals
Tests if two instances are equal -
print_hash_code
public void print_hash_code()Prints the hash code -
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Returns:
- the revision
-