private static void evaluateAndSavePredictions(Predictor predictor,
			List<Instance> instances, String predictions_file)
			throws IOException {
		PredictionsWriter writer = new PredictionsWriter(predictions_file);
		// TODO Evaluate the model if labels are available.

		Boolean isLabelOn = true;

		for (Instance instance : instances) {
			if (instance.getLabel() == null) {
				isLabelOn = false;
			}
			Label label = predictor.predict(instance);
			writer.writePrediction(label);
		}

		// Print the evaluation label to System.out
		if (isLabelOn) {
			AccuracyEvaluator eval = new AccuracyEvaluator();
			double accuracy = eval.evaluate(instances, predictor);

			// HERE! Print out the accuracy to System.out
			System.out.println("Accuracy: " + accuracy + " (" + eval.getCount()
					+ "/" + eval.getSize() + ")");

		}
		writer.close();

	}