org.wdssii.decisiontree
Class AxialTreeNode
java.lang.Object
org.wdssii.decisiontree.AxialTreeNode
- All Implemented Interfaces:
- Serializable
public class AxialTreeNode
- extends Object
- implements Serializable
A node in an axial decision tree has two branches and a condition to decide
which branch to take.
- Author:
- lakshman
- See Also:
- Serialized Form
thresh
private float thresh
attributeNumber
private int attributeNumber
left
private AxialTreeNode left
right
private AxialTreeNode right
defaultCategory
private int defaultCategory
AxialTreeNode
public AxialTreeNode()
AxialTreeNode
public AxialTreeNode(int category)
- node that supplies the same category for all inputs
AxialTreeNode
public AxialTreeNode(int attributeNo,
float thresh,
AxialTreeNode leftNode,
AxialTreeNode rightNode,
int defaultCategory)
- A node in the tree that branches out.
classify
public int classify(float[] data)
isHandledByLeftBranch
boolean isHandledByLeftBranch(float[] data)
isHandledByRightBranch
boolean isHandledByRightBranch(float[] data)
getLeft
public AxialTreeNode getLeft()
setLeft
public void setLeft(AxialTreeNode left)
getRight
public AxialTreeNode getRight()
setRight
public void setRight(AxialTreeNode right)
toString
public String toString()
- Overrides:
toString
in class Object
appendJava
public void appendJava(StringBuilder sb,
int depth,
String newline)
normalize
public void normalize()
getDefaultCategory
public int getDefaultCategory()
getAttributeNumber
public int getAttributeNumber()
setAttributeNumber
public void setAttributeNumber(int attributeNumber)
getThresh
public float getThresh()
setThresh
public void setThresh(float thresh)
setDefaultCategory
public void setDefaultCategory(int defaultCategory)