public class NumericAttributeBinaryRulePredicate extends InstanceConditionalBinaryTest implements Predicate
Modifier and Type | Field | Description |
---|---|---|
protected int |
attIndex |
|
protected double |
attValue |
|
protected int |
operator |
|
protected boolean |
state |
Constructor | Description |
---|---|
NumericAttributeBinaryRulePredicate(int attIndex,
double attValue,
int operator) |
Modifier and Type | Method | Description |
---|---|---|
int |
branchForInstance(Instance inst) |
Returns the number of the branch for an instance, -1 if unknown.
|
java.lang.String |
describeConditionForBranch(int branch,
InstancesHeader context) |
Gets the text that describes the condition of a branch.
|
boolean |
evaluate(Instance inst) |
|
int |
getAttributeIndex() |
|
int[] |
getAttsTestDependsOn() |
Returns an array with the attributes that the test depends on.
|
void |
getDescription(java.lang.StringBuilder sb,
int indent) |
Returns a string representation of this object.
|
void |
getDescription(java.lang.StringBuilder sb,
int indent,
InstanceInformation instInformation) |
|
double |
getSplitValue() |
|
boolean |
isEqual(NumericAttributeBinaryRulePredicate predicate) |
|
boolean |
isEqualOrLess() |
|
boolean |
isIncludedInRuleNode(NumericAttributeBinaryRulePredicate predicate) |
|
boolean |
isUsingSameAttribute(NumericAttributeBinaryRulePredicate predicate) |
|
void |
negateCondition() |
|
void |
setAttributeValue(NumericAttributeBinaryRulePredicate ruleSplitNodeTest) |
|
java.lang.String |
toString() |
Returns a description of the object.
|
copy, copy, measureByteSize, measureByteSize
maxBranches
resultKnownForInstance
protected int attIndex
protected double attValue
protected int operator
protected boolean state
public NumericAttributeBinaryRulePredicate(int attIndex, double attValue, int operator)
public void negateCondition()
negateCondition
in interface Predicate
public int branchForInstance(Instance inst)
InstanceConditionalTest
branchForInstance
in class InstanceConditionalTest
inst
- the instance to be usedpublic java.lang.String describeConditionForBranch(int branch, InstancesHeader context)
InstanceConditionalTest
describeConditionForBranch
in class InstanceConditionalTest
branch
- the number of the branch to describecontext
- the context or header of the data streampublic int[] getAttsTestDependsOn()
InstanceConditionalTest
getAttsTestDependsOn
in class InstanceConditionalTest
public double getSplitValue()
public boolean isEqual(NumericAttributeBinaryRulePredicate predicate)
public boolean isUsingSameAttribute(NumericAttributeBinaryRulePredicate predicate)
public boolean isIncludedInRuleNode(NumericAttributeBinaryRulePredicate predicate)
public void setAttributeValue(NumericAttributeBinaryRulePredicate ruleSplitNodeTest)
public void getDescription(java.lang.StringBuilder sb, int indent)
MOAObject
AbstractMOAObject.toString
to give a string representation of the object.getDescription
in interface MOAObject
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indentpublic void getDescription(java.lang.StringBuilder sb, int indent, InstanceInformation instInformation)
getDescription
in interface Predicate
public java.lang.String toString()
AbstractMOAObject
toString
in class AbstractMOAObject
public int getAttributeIndex()
getAttributeIndex
in interface Predicate
public boolean isEqualOrLess()
isEqualOrLess
in interface Predicate
Copyright © 2020 University of Waikato, Hamilton, NZ. All Rights Reserved.