private static Dataset gen(int rows, int cols, int numClasses) {
	Random rand = new Random(1);
	float[][] data = new float[rows][cols];
	int[][] labels = new int[numClasses][rows];
	int pos = rows/2;
	int negs = rows - pos;
	for(int i = 0; i < labels.length; ++i) {
	    for(int j =0; j < labels[i].length; ++j) {
		labels[i][j] = -1;
	    }
	}
	for(int i = 0; i < pos; ++i) {
	    for(int j = 0; j < cols; ++j) {
		if(rand.nextDouble() >0.9)
		    data[i][j] = Float.NEGATIVE_INFINITY;
		else {
		    data[i][j] = (rand.nextFloat() + 0.5f);
		}
	    }
	    for(int k = 0; k < numClasses; ++k) {
		if(rand.nextDouble() > 0.2) {
		    labels[k][i] = 1;
		}


	    }
	}
	for(int i = pos; i < rows; ++i) {
	    for(int j = 0; j < cols; ++j) {
		data[i][j] = rand.nextFloat();
	    }
	}
	return new Dataset(data, labels);

    }