Search code examples
javaweka

How to set number of trees in Weka's Java library (setNumTrees no longer works?)


Using the Java Weka library I need to set the number of trees.

I found a nice example, but it seems that this method

    RandomForest rf = new RandomForest();
    rf.setNumTrees(100);

no longer works and I don't see any substitute for it.


Solution

  • You can use SetNumIteration instead of SetNumTrees.