net.sf.myra.antree.representation
Class LeafNode
java.lang.Object
net.sf.myra.antree.representation.Node
net.sf.myra.antree.representation.LeafNode
- All Implemented Interfaces:
- java.lang.Cloneable
public final class LeafNode
- extends Node
- Version:
- $Revision: 2320 $ $Date:: 2011-01-25 13:06:10#$
- Author:
- Fernando Esteban Barril Otero
Constructor Summary |
LeafNode(int level,
net.sf.myra.datamining.data.Metadata metadata,
net.sf.myra.datamining.data.Label prediction)
Default constructor. |
Method Summary |
LeafNode |
clone()
|
net.sf.myra.datamining.data.Label |
getPrediction()
Returns the label predicted by the node. |
java.lang.String |
label()
Returns a label representation of this node. |
void |
setPrediction(net.sf.myra.datamining.data.Label prediction)
Sets the prediction of the node. |
Methods inherited from class net.sf.myra.antree.representation.Node |
equals, getAttribute, getBranch, getBranch, getBranch, getBranches, getLevel, getParent, hashCode, isLeaf, setLevel, toString, validate |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
LeafNode
public LeafNode(int level,
net.sf.myra.datamining.data.Metadata metadata,
net.sf.myra.datamining.data.Label prediction)
- Default constructor.
- Parameters:
level
- the level of the node.metadata
- the current data set metadata.prediction
- the prediction of the node.
getPrediction
public net.sf.myra.datamining.data.Label getPrediction()
- Returns the label predicted by the node.
- Specified by:
getPrediction
in class Node
- Returns:
- the label predicted by the node.
setPrediction
public void setPrediction(net.sf.myra.datamining.data.Label prediction)
- Sets the prediction of the node.
- Specified by:
setPrediction
in class Node
- Parameters:
prediction
- the prediction to set.
label
public java.lang.String label()
- Description copied from class:
Node
- Returns a label representation of this node.
- Specified by:
label
in class Node
- Returns:
- a label representation of this node.
clone
public LeafNode clone()
- Overrides:
clone
in class Node
Copyright © 2013. All Rights Reserved.