@Override
    public void evaluateClustering(Clustering clustering, Clustering trueClustering, ArrayList<DataPoint> points) throws Exception {

        this.points = points;
        this.clustering = clustering;
        numPoints = points.size();
        numFClusters = clustering.size();
        numDims = points.get(0).numAttributes() - 1;


        int totalRedundancy = 0;
        int trueCoverage = 0;
        int totalCoverage = 0;

        int numNoise = 0;
        for (int p = 0; p < numPoints; p++) {
            int coverage = 0;
            for (int c = 0; c < numFClusters; c++) {
                //contained in cluster c?
                if (clustering.get(c).getInclusionProbability(points.get(p)) >= pointInclusionProbThreshold) {
                    coverage++;
                }
            }

            if (points.get(p).classValue() == -1) {
                numNoise++;
            } else {
                if (coverage > 0) trueCoverage++;
            }

            if (coverage > 0) totalCoverage++;  //points covered by clustering (incl. noise)
            if (coverage > 1) totalRedundancy++; //include noise
        }

        addValue("Redundancy", ((double) totalRedundancy / (double) numPoints));
        addValue("GPrecision", (totalCoverage == 0 ? 0 : ((double) trueCoverage / (double) (totalCoverage))));
        addValue("GRecall", ((double) trueCoverage / (double) (numPoints - numNoise)));
        addValue("Compactness", computeCompactness());
        addValue("Overlap", computeOverlap());
    }