org.apache.mahout.df.callback
Class MeanTreeCollector
java.lang.Object
org.apache.mahout.df.callback.MeanTreeCollector
- All Implemented Interfaces:
- PredictionCallback
public class MeanTreeCollector
- extends Object
- implements PredictionCallback
Computes the error rate for each tree, and returns the mean of all the trees
Method Summary |
double |
meanTreeError()
|
void |
prediction(int treeId,
int instanceId,
int prediction)
called when an instance has been classified |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MeanTreeCollector
public MeanTreeCollector(Data data,
int nbtrees)
meanTreeError
public double meanTreeError()
prediction
public void prediction(int treeId,
int instanceId,
int prediction)
- Description copied from interface:
PredictionCallback
- called when an instance has been classified
- Specified by:
prediction
in interface PredictionCallback
- Parameters:
treeId
- tree that classified the instanceinstanceId
- classified instanceprediction
- predicted label
Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.