pipeline/evaluate.py
def sim_matrix(found_list, ground_list, metric):
    """Calculate pairwise similarity of found/ground communities using the given
    metric.
    """
    # TODO: declare types and remove boundschecking and wrapping with Cython.
    sims = np.zeros((len(found_list), len(ground_list)))
    for i, found in enumerate(found_list):
        sims[i] = [metric(ground, found) for ground in ground_list]
    return sims
Calculate pairwise similarity of found/ground communities using the given
    metric.
    
Calculate pairwise similarity of found/ground communities using the given
metric.
Calculate pairwise similarity of found / ground communities using the given metric .
def sim_matrix(found_list, ground_list, metric):
    sims = np.zeros((len(found_list), len(ground_list)))
    for i, found in enumerate(found_list):
        sims[i] = [metric(ground, found) for ground in ground_list]
    return sims
def sim_matrix ( found_list , ground_list , metric ) : sims = np . zeros ( ( len ( found_list ) , len ( ground_list ) ) ) for i , found in enumerate ( found_list ) : sims [ i ] = [ metric ( ground , found ) for ground in ground_list ] return sims
Calculate pairwise similarity of found/ground communities using the given
metric.
Calculate pairwise similarity of found / ground communities using the given metric .
"""Calculate pairwise similarity of found/ground communities using the given
    metric.
    """ # TODO: declare types and remove boundschecking and wrapping with Cython.
found_list
ground_list
metric