Class NominalAttributeMultiwayTest
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.classifiers.core.conditionaltests.InstanceConditionalTest
-
- moa.classifiers.core.conditionaltests.NominalAttributeMultiwayTest
-
- All Implemented Interfaces:
Serializable
,MOAObject
- Direct Known Subclasses:
IademNominalAttributeMultiwayTest
public class NominalAttributeMultiwayTest extends InstanceConditionalTest
Nominal multi way conditional test for instances to use to split nodes in Hoeffding trees.- Version:
- $Revision: 7 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
attIndex
-
Constructor Summary
Constructors Constructor Description NominalAttributeMultiwayTest(int attIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
branchForInstance(Instance inst)
Returns the number of the branch for an instance, -1 if unknown.String
describeConditionForBranch(int branch, InstancesHeader context)
Gets the text that describes the condition of a branch.int[]
getAttsTestDependsOn()
Returns an array with the attributes that the test depends on.void
getDescription(StringBuilder sb, int indent)
Returns a string representation of this object.int
maxBranches()
Gets the number of maximum branches, -1 if unknown.-
Methods inherited from class moa.classifiers.core.conditionaltests.InstanceConditionalTest
resultKnownForInstance
-
Methods inherited from class moa.AbstractMOAObject
copy, copy, measureByteSize, measureByteSize, toString
-
-
-
-
Method Detail
-
branchForInstance
public int branchForInstance(Instance inst)
Description copied from class:InstanceConditionalTest
Returns the number of the branch for an instance, -1 if unknown.- Specified by:
branchForInstance
in classInstanceConditionalTest
- Parameters:
inst
- the instance to be used- Returns:
- the number of the branch for an instance, -1 if unknown.
-
describeConditionForBranch
public String describeConditionForBranch(int branch, InstancesHeader context)
Description copied from class:InstanceConditionalTest
Gets the text that describes the condition of a branch. It is used to describe the branch.- Specified by:
describeConditionForBranch
in classInstanceConditionalTest
- Parameters:
branch
- the number of the branch to describecontext
- the context or header of the data stream- Returns:
- the text that describes the condition of the branch
-
maxBranches
public int maxBranches()
Description copied from class:InstanceConditionalTest
Gets the number of maximum branches, -1 if unknown.- Specified by:
maxBranches
in classInstanceConditionalTest
- Returns:
- the number of maximum branches, -1 if unknown..
-
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.- Parameters:
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indent
-
getAttsTestDependsOn
public int[] getAttsTestDependsOn()
Description copied from class:InstanceConditionalTest
Returns an array with the attributes that the test depends on.- Specified by:
getAttsTestDependsOn
in classInstanceConditionalTest
- Returns:
- an array with the attributes that the test depends on
-
-