} else if (name.equals("RegressionTree")) {
RegressionTreeLearner learner = new RegressionTreeLearner();
learner.init(trainDataset, configHolder, maxNumTrainInstances);
return learner;
} else if (name.equals("RandomForest")) {
RandomForest learner = new RandomForest();
learner.init(trainDataset, configHolder, maxNumTrainInstances, maxNumValidInstances, evaluationMetric);
return learner;
} else {
throw new Exception("Unknown algorithm: " + name);
}
}