@classmethod
    def ch_cluster_term(cls, cluster, global_mean_distance, matrix):
        # Calculate cluster mean distance
        n = len(cluster.all_elements)
        try:
            cluster_mean_distance = mean(numpy.array(get_intra_cluster_distances( cluster, matrix))**2)
        except SingularClusterException:
            cluster_mean_distance = 0
            
        return (n-1) * (global_mean_distance - cluster_mean_distance)
Assert articles in need of review are labeled as such.
dataset/ETHPy150Open victor-gil-sepulveda/pyProCT/pyproct/clustering/evaluation/metrics/calinskiHarabasz.py/CalinskiHarabaszCalculator.ch_cluster_term--crossover with--dataset/ETHPy150Open mozilla/kitsune/kitsune/dashboards/tests/test_readouts.py/MostVisitedTranslationsTests.test_unreviewed