protected void calculateAverageContingencyMatrix() {
		
		// Initialize the matrix
		double[][] newMatrix = new double[super.classesNumber()][super.classesNumber()];
		for(int i = 0; i < newMatrix.length; ++i)
			for(int j = 0; j < newMatrix[0].length; ++j)
				newMatrix[i][j] = 0.0;
		
		// Sum all the performances matrixes
		Iterator<PType> iter = this.performances.iterator();
		while( iter.hasNext()) {
			PType perf = iter.next();
			
			double[][] matrix = perf.getContingencyMatrix();
			for(int i = 0; i < newMatrix.length; ++i) {
				String valI = super.indexToValue(i);
				for(int j = 0; j < newMatrix[0].length; ++j)
					newMatrix[i][j] += matrix[perf.valueToIndex(valI)][perf.valueToIndex(super.indexToValue(j))];
			}
		}
		// Make the average
		for(int i = 0; i < newMatrix.length; ++i)
			for(int j = 0; j < newMatrix[0].length; ++j)
				newMatrix[i][j] /= this.performances.size();
		
		super.setContingencyMatrix(newMatrix);
		this.contincencyMatrixSet = true;
	}