pipeline/evaluate.py
def recall_matrix(found_list, ground_list):
    """Compute pairwise recall for a list of found communities when compared to
    the given ground truth communities.
    """
    gsets = [set(g) for g in ground_list]
    glens = np.array([float(len(g)) for g in ground_list])
    tp_mat = np.zeros((len(found_list), len(ground_list)))
    for i, found in enumerate(found_list):
        tp_mat[i] = [len(ground.intersection(found)) for ground in gsets]
    return (tp_mat / glens)
Compute pairwise recall for a list of found communities when compared to
    the given ground truth communities.
    
Compute pairwise recall for a list of found communities when compared to
the given ground truth communities.
Compute pairwise recall for a list of found communities when compared to the given ground truth communities .
def recall_matrix(found_list, ground_list):
    gsets = [set(g) for g in ground_list]
    glens = np.array([float(len(g)) for g in ground_list])
    tp_mat = np.zeros((len(found_list), len(ground_list)))
    for i, found in enumerate(found_list):
        tp_mat[i] = [len(ground.intersection(found)) for ground in gsets]
    return (tp_mat / glens)
def recall_matrix ( found_list , ground_list ) : gsets = [ set ( g ) for g in ground_list ] glens = np . array ( [ float ( len ( g ) ) for g in ground_list ] ) tp_mat = np . zeros ( ( len ( found_list ) , len ( ground_list ) ) ) for i , found in enumerate ( found_list ) : tp_mat [ i ] = [ len ( ground . intersection ( found ) ) for ground in gsets ] return ( tp_mat / glens )
Compute pairwise recall for a list of found communities when compared to
the given ground truth communities.
Compute pairwise recall for a list of found communities when compared to the given ground truth communities .
"""Compute pairwise recall for a list of found communities when compared to
    the given ground truth communities.
    """
found_list
ground_list