IntPair getBestParameters() {
			int bestT = 0;
			int bestA = 0;
			double bestPerf = metric.worstValue();
			if (verbose) {
				System.out.println("Perf Matrix:");
				for (int i = 0; i < perf.length; i++) {
					double[][] tOutter = perf[i];
					for (int j = 0; j < tOutter.length; j++) {
						double[] tInner = tOutter[j];
						double p = tInner[tInner.length - 1];
						System.out.print(p + " ");
						if (metric.isFirstBetter(p, bestPerf)) {
							bestT = i;
							bestA = j;
							bestPerf = p;
						}
					}
					System.out.println();
				}
				System.out.println("Best perf on validation set = " + bestPerf);
			}
			return new IntPair(bestT, bestA);
		}