Class InstanceConditionalTest
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.classifiers.core.conditionaltests.InstanceConditionalTest
-
- All Implemented Interfaces:
Serializable
,MOAObject
- Direct Known Subclasses:
InstanceConditionalBinaryTest
,NominalAttributeMultiwayTest
public abstract class InstanceConditionalTest extends AbstractMOAObject
Abstract 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
-
-
Constructor Summary
Constructors Constructor Description InstanceConditionalTest()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract int
branchForInstance(Instance inst)
Returns the number of the branch for an instance, -1 if unknown.abstract String
describeConditionForBranch(int branch, InstancesHeader context)
Gets the text that describes the condition of a branch.abstract int[]
getAttsTestDependsOn()
Returns an array with the attributes that the test depends on.abstract int
maxBranches()
Gets the number of maximum branches, -1 if unknown.boolean
resultKnownForInstance(Instance inst)
Gets whether the number of the branch for an instance is known.-
Methods inherited from class moa.AbstractMOAObject
copy, copy, measureByteSize, measureByteSize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface moa.MOAObject
getDescription
-
-
-
-
Method Detail
-
branchForInstance
public abstract int branchForInstance(Instance inst)
Returns the number of the branch for an instance, -1 if unknown.- Parameters:
inst
- the instance to be used- Returns:
- the number of the branch for an instance, -1 if unknown.
-
resultKnownForInstance
public boolean resultKnownForInstance(Instance inst)
Gets whether the number of the branch for an instance is known.- Parameters:
inst
-- Returns:
- true if the number of the branch for an instance is known
-
maxBranches
public abstract int maxBranches()
Gets the number of maximum branches, -1 if unknown.- Returns:
- the number of maximum branches, -1 if unknown..
-
describeConditionForBranch
public abstract String describeConditionForBranch(int branch, InstancesHeader context)
Gets the text that describes the condition of a branch. It is used to describe the branch.- 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
-
getAttsTestDependsOn
public abstract int[] getAttsTestDependsOn()
Returns an array with the attributes that the test depends on.- Returns:
- an array with the attributes that the test depends on
-
-