org.apache.mahout.df.node
Class MockLeaf
java.lang.Object
org.apache.mahout.df.node.Node
org.apache.mahout.df.node.Leaf
org.apache.mahout.df.node.MockLeaf
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
public class MockLeaf
- extends Leaf
Custom Leaf node that returns for each instance its own label. Used mainly for testing purposes
Nested classes/interfaces inherited from class org.apache.mahout.df.node.Node |
Node.Type |
MockLeaf
public MockLeaf()
classify
public int classify(Instance instance)
- Description copied from class:
Node
- predicts the label for the instance
- Overrides:
classify
in class Leaf
- Returns:
- -1 if the label cannot be predicted
getType
protected Node.Type getType()
- Overrides:
getType
in class Leaf
getString
protected String getString()
- Overrides:
getString
in class Leaf
Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.