def evaluate(self, clustering, matrix):
        # Cluster prototypes (medoids here) must be updated
        update_medoids(clustering, matrix)
        
        # We'll follow the paper expanded formula
        # First we need the global mean of the squared distances
        D = mean(matrix.get_data()**2)
        # A_k calculation
        k = len(clustering.clusters)
        n = matrix.row_length
#         print "WGSS", self.WGSS(clustering.clusters, matrix)
#         print "BGSS", self.BGSS(clustering, D,  matrix)
#         print (self.BGSS(clustering, D,  matrix)/self.WGSS(clustering.clusters, matrix))*(float(n-k)/(k-1))
        A_k = CalinskiHarabaszCalculator.A_k(clustering, D, matrix)
        VRC = (D + (float(n -k) / (k-1))*A_k) / float((D - A_k))
        return VRC
Calculates the index value for a clustering.
dataset/ETHPy150Open victor-gil-sepulveda/pyProCT/pyproct/clustering/evaluation/metrics/calinskiHarabasz.py/CalinskiHarabaszCalculator.evaluate