def consensus_score(a, b, similarity='jaccard'):
 if (similarity == 'jaccard'):
  similarity = _jaccard
 matrix = _pairwise_similarity(a, b, similarity)
 indices = linear_assignment((1.0 - matrix))
 n_a = len(a[0])
 n_b = len(b[0])
 return (matrix[(indices[:, 0], indices[:, 1])].sum() / max(n_a, n_b))

def consensus_score ( a , b , similarity = 'jaccard' ) : if ( similarity == 'jaccard' ) : similarity = _jaccard matrix = _pairwise_similarity ( a , b , similarity ) indices = linear_assignment ( ( 1.0 - matrix ) ) n_a = len ( a [ 0 ] ) n_b = len ( b [ 0 ] ) return ( matrix [ ( indices [ : , 0 ] , indices [ : , 1 ] ) ] . sum ( ) / max ( n_a , n_b ) )
the similarity of two sets of biclusters .