public TreeBagging(ClassifierGenerationMethod generator, int forest_size = 800, double percentage_data_use = 0.6667) { mForestSize = forest_size; mPercentageDataUsage = percentage_data_use; mClassifiers = new Classifier <T, U> [forest_size]; for (int t = 0; t < forest_size; ++t) { mClassifiers[t] = generator(t); } }
public RandomForest(ClassifierGenerationMethod generator, int forest_size = 800, int feature_subset_size = -1, double percentage_data_use = 0.6667) { mForestSize = forest_size; mPercentageDataUsage = percentage_data_use; mClassifiers = new ID3 <T> [forest_size]; for (int t = 0; t < forest_size; ++t) { mClassifiers[t] = generator(t); mClassifiers[t].Forest = this; } mFeatureSubSetSize = -1; }