Package moa.classifiers.rules.core
Class NominalRulePredicate
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.classifiers.rules.core.NominalRulePredicate
-
- All Implemented Interfaces:
Serializable
,Predicate
,MOAObject
public class NominalRulePredicate extends AbstractMOAObject implements Predicate
Class that contains the literal information for a nominal variable- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NominalRulePredicate(int inputAttributeIndex, double attributeValue, boolean isEqual)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
evaluate(Instance instance)
boolean
evaluate(MultiLabelInstance instance)
int
getAttributeIndex()
void
getDescription(StringBuilder sb, int indent)
Returns a string representation of this object.void
getDescription(StringBuilder sb, int indent, InstanceInformation instInformation)
boolean
isEqualOrLess()
void
negateCondition()
String
toString()
Returns a description of the object.-
Methods inherited from class moa.AbstractMOAObject
copy, copy, measureByteSize, measureByteSize
-
-
-
-
Method Detail
-
evaluate
public boolean evaluate(MultiLabelInstance instance)
-
negateCondition
public void negateCondition()
- Specified by:
negateCondition
in interfacePredicate
-
getDescription
public void getDescription(StringBuilder sb, int indent)
Description copied from interface:MOAObject
Returns a string representation of this object. Used inAbstractMOAObject.toString
to give a string representation of the object.- Specified by:
getDescription
in interfaceMOAObject
- Parameters:
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indent
-
getDescription
public void getDescription(StringBuilder sb, int indent, InstanceInformation instInformation)
- Specified by:
getDescription
in interfacePredicate
-
toString
public String toString()
Description copied from class:AbstractMOAObject
Returns a description of the object.- Overrides:
toString
in classAbstractMOAObject
- Returns:
- a description of the object
-
getAttributeIndex
public int getAttributeIndex()
- Specified by:
getAttributeIndex
in interfacePredicate
-
isEqualOrLess
public boolean isEqualOrLess()
- Specified by:
isEqualOrLess
in interfacePredicate
-
-