public void calcRandIndex() {
	final Map<Integer, Integer> docIndexToGoldCluster = new HashMap<Integer, Integer>();
	final Map<Integer, Integer> docIndexToRegularCluster = new HashMap<Integer, Integer>();

	for (int i = 0; i < this.docs.size(); i++) {
	    final int goldStadartClusterNum = this.docs.get(i).getDocGoldStadartCluster();
	    docIndexToGoldCluster.put(i, goldStadartClusterNum);
	}

	for (int i = 0; i < this.docs.size(); i++) {
	    final int regularClusterNum = this.docs.get(i).getDocCluster();
	    docIndexToRegularCluster.put(i, regularClusterNum);
	}

	double a = 0, b = 0, c = 0, d = 0;

	for (int i = 0; i < this.docs.size(); i++) {
	    for (int j = i; j < this.docs.size(); j++) {
		final Integer goldClusterFirst = docIndexToGoldCluster.get(i);
		final Integer goldClusterSecond = docIndexToGoldCluster.get(j);

		final Integer regularClusterFirst = docIndexToRegularCluster.get(i);
		final Integer regularClusterSecond = docIndexToRegularCluster.get(j);

		if (goldClusterFirst == goldClusterSecond) {
		    if (regularClusterFirst == regularClusterSecond) {
			a++;
		    } else {
			c++;
		    }
		} else {
		    if (regularClusterFirst == regularClusterSecond) {
			d++;
		    } else {
			b++;
		    }
		}

	    }
	}

	this.randIndex = (a + b) / (a + b + c + d);

    }