package dh.algorithms;

import dh.algorithms.classification.bagging.BaggingLearner;
import dh.algorithms.classification.bayes.BayesLearner;
import dh.algorithms.classification.decisionstumps.FastDecisionStumpLearner;
import dh.algorithms.classification.featureselection.FeatureSelectionLearner;
import dh.algorithms.classification.kmeans.KMeansLearner;
import dh.algorithms.classification.knn.KNNLearner;
import dh.algorithms.classification.logisticregression.LogisticRegressionLearner;

public class LearnerFactory {

	public static AbstractLearner create(String name) {
		if (name.equals("classification.lr")) {
			return new LogisticRegressionLearner();
		} else if (name.equals("classification.fastdecisonstump")) {
			return new FastDecisionStumpLearner();
		} else if (name.equals("classification.bayes")) {
			return new BayesLearner();
		} else if (name.equals("classification.bagging")) {
			return new BaggingLearner();
		} else if (name.equals("classification.featureselection")) {
			return new FeatureSelectionLearner();
		} else if (name.equals("classification.kmeans")) {
			return new KMeansLearner();
		} else if (name.equals("classification.knn")) {
			return new KNNLearner();
		} else {
			throw new RuntimeException("Not supported learner...(" + name + ")");
		}
	}
}

@@ -479,16 +479,74 @@
 Learner;
+%0Aimport dh.algorithms.regression.ann.NeuralNetworkLearner;
 %0A%0Apublic
@@ -1239,32 +1239,126 @@
 w KNNLearner();%0A
+%09%09%7D else if (name.equals(%22regression.neuralnetwork%22)) %7B%0A%09%09%09return new NeuralNetworkLearner();%0A
 %09%09%7D else %7B%0A%09%09%09th

Add Neural Network Regression for LearnerFactory