I have implemented a small java application using Weka lib with Random Forest. I have trained some classifiers with a sample data and getting a good accuracy of around 85%. However, when i used theFast Random Forest (https://code.google.com/p/fast-random-forest/) it starts throwing error(s).
I have implemented the Fast Random Forest and build it with current jar files. However, it keeps giving the following error when we evaluate the classifier on Training Data:
"The method evaluateModel(Classifier, Instances, Object...)
in the type Evaluation is not applicable for the arguments
(FastRandomForest, Instances) "
For this current code:
FastRandomForest rTree = new FastRandomForest();
rTree.buildClassifier(trainingData);
showTree(rTree);
System.out.println("records: " + trainingData.attribute(classIndex));
System.out.println("number of instances: " + trainingData.numInstances());
System.out.println(trainingData.instance(1));
System.out.println("target: " + trainingData.classAttribute());
//System.out.println(rTree.classifyInstance(trainingData.instance(1)));
/* Evaluate the classifier on Training data */
Evaluation eTest = new Evaluation(trainingData);
eTest.evaluateModel(rTree, trainingData);
String strSummary = eTest.toSummaryString();
System.out.println(strSummary);
Help appreciated!!
FastRandomForest
implement or inheritClassifier
? The message is saying "I need aClassifier
but you have given me aFastRandomForest
".