marytts.cart
Class StringPredictionTree
java.lang.Object
marytts.cart.DirectedGraph
marytts.cart.CART
marytts.cart.StringPredictionTree
public class StringPredictionTree
- extends CART
| Methods inherited from class marytts.cart.DirectedGraph |
getDecisionNodeIterator, getDecisionNodes, getDirectedGraphNodeIterator, getDirectedGraphNodes, getFeatureDefinition, getLeafNodeIterator, getLeafNodes, getNodeIterator, getNodes, getNumNodes, getProperties, getRootNode, interpret, interpret, interpret, setRootNode |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ENC_LINE_START
public static final java.lang.String ENC_LINE_START
- See Also:
- Constant Field Values
ENC_LINE_END
public static final java.lang.String ENC_LINE_END
- See Also:
- Constant Field Values
StringPredictionTree
public StringPredictionTree(Node aRootNode,
FeatureDefinition aFeatDef,
java.lang.String[] aTargetDecoding)
- Parameters:
rootNode - the root node of this tree. This node has to be set to
be a root node beforehand.featDef - the featureDefinition used in this tree
StringPredictionTree
public StringPredictionTree(java.io.BufferedReader reader,
FeatureDefinition featDefinition)
throws java.io.IOException
- This constructs a new string prediciton tree from a stream containing
a tree in wagon format.
In addition to the constructor of ExtendedClassificationTree it
reads in the mapping from numbers to the Strings from a stream.
The encoding has to be the first line in the file (a empty line is allowed).
It has the form:
;;target={1:'string_a',2:'string_b,'...',26:'string_z'}
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString in class DirectedGraph
interpretToNode
public Node interpretToNode(FeatureVector featureVector,
int minNumberOfData)
- TODO: copied from CART, does not work as expected with minNumberOfData = 0
Passes the given item through this CART and returns the
leaf Node, or the Node it stopped walking down.
- Overrides:
interpretToNode in class CART
- Parameters:
target - the target to analyzeminNumberOfData - the minimum number of data requested.
If this is 0, walk down the CART until the leaf level.
- Returns:
- the Node
getMostProbableString
public java.lang.String getMostProbableString(FeatureVector aFV)
getMostProbableString
public java.lang.String getMostProbableString(Target aTarget)