public static void main(String[] args) throws Exception {
		Options opts = new Options();
		CmdLineParser parser = new CmdLineParser(AdditiveGrovesLearner.class, opts);
		SimpleMetric metric = null;
		try {
			parser.parse(args);
			if ("rmse".startsWith(opts.metric)) {
				metric = new RMSE();
			} else if ("auc".startsWith(opts.metric)) {
				metric = new AUC();
			}
		} catch (IllegalArgumentException e) {
			parser.printUsage();
			System.exit(1);
		}

		Random.getInstance().setSeed(opts.seed);

		Instances trainSet = InstancesReader.read(opts.attPath, opts.trainPath);
		Instances validSet = InstancesReader.read(opts.attPath, opts.validPath);

		AdditiveGrovesLearner learner = new AdditiveGrovesLearner();
		learner.setBaggingIters(opts.baggingIters);
		learner.setNumTrees(opts.n);
		learner.setMinAlpha(opts.a);
		learner.setMetric(metric);
		learner.setVerbose(opts.verbose);

		long start = System.currentTimeMillis();
		AdditiveGroves ag = learner.buildRegressor(trainSet, validSet);
		long end = System.currentTimeMillis();
		System.out.println("Time: " + (end - start) / 1000.0);

		if (opts.outputModelPath != null) {
			PredictorWriter.write(ag, opts.outputModelPath);
		}
	}