private static Predictor train(List<Instance> instances, String algorithm) throws Exception {
		Predictor p;
		if (algorithm.equals("even_odd")) {
			p = new EvenOddClassifier();
		}
		else if (algorithm.equals("majority")) {
			p = new MajorityClassifier();
		}
		else if (algorithm.equals("logistic_regression")) {
			p = new LogisticClassifier();
		}
		else if (algorithm.equals("margin_perceptron")) {
			p = new MarginPerceptron();
		}
		else if (algorithm.equals("perceptron_linear_kernel")) {
			p = new MarginKernelPerceptron(algorithm);
		}
		else if (algorithm.equals("perceptron_polynomial_kernel")) {
			p = new MarginKernelPerceptron(algorithm);
		}
		else if (algorithm.equals("mira")) {
			p = new MIRA();
		}
		else if (algorithm.equals("lambda_means")) {
			p = new LambdaMeansPredictor(instances);
		}
		else if (algorithm.equals("ska")) {
			p = new StochasticKMeansPredictor(instances);
		}
		else {
			throw new Exception("The algorithm is not supported");
		}
		p.train(instances);
		AccuracyEvaluator e = new AccuracyEvaluator();
		System.out.println("The accuracy is: "+ e.evaluate(instances, p));
		return p;
	}