@SuppressWarnings("deprecation")
	public static void main(String args[]) throws Exception
	{
		Random r = new Random();
		long seed = r.nextLong();
		//		seed = 8069103409826870036L;
		System.out.println("seed " + seed);
		r = new Random(seed);

		for (int x = 0; x < 1000; x++)
		{
			FastVector<NominalPrediction> preds = new FastVector<NominalPrediction>();

			double d[] = new double[2];
			for (int i = 0; i < 2; i++)
			{
				double activeIs1;
				if (i == 0)
					activeIs1 = 0.8;
				else
					activeIs1 = 0.2;

				FastVector<NominalPrediction> preds_i = new FastVector<NominalPrediction>();

				for (int j = 0; j < 100; j++)
				{
					double actual = r.nextDouble() < activeIs1 ? 1 : 0;
					double predicted = r.nextDouble() < activeIs1 ? 1 : 0;
					double conf = actual == predicted ? Math.min(1.0, r.nextDouble() * 1.1) : r.nextDouble() * 0.9;

					preds.add(createPrediction(actual, predicted, conf));
					preds_i.add(createPrediction(actual, predicted, conf));
				}
				d[i] = computeAUC(preds_i, false);
				System.out.println("auc " + d[i]);
			}
			double cummulative = computeAUC(preds, false);
			System.out.println("cumm=micro auc " + cummulative);

			double mean = Utils.mean(d);
			System.out.println("mean=macro auc " + mean);

			//		System.out.println(Math.abs(cummulative - mean));

			if (cummulative > d[0] && cummulative > d[1])
				break;
		}
	}