org.apache.mahout.df.callback
Class MeanTreeCollector

java.lang.Object
  extended by org.apache.mahout.df.callback.MeanTreeCollector
All Implemented Interfaces:
PredictionCallback

public class MeanTreeCollector
extends java.lang.Object
implements PredictionCallback

Computes the error rate for each tree, and returns the mean of all the trees


Constructor Summary
MeanTreeCollector(Data data, int nbtrees)
           
 
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
 

Constructor Detail

MeanTreeCollector

public MeanTreeCollector(Data data,
                         int nbtrees)
Method Detail

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 instance
instanceId - classified instance
prediction - predicted label


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.