def _jaccard(a_rows, a_cols, b_rows, b_cols):
 intersection = ((a_rows * b_rows).sum() * (a_cols * b_cols).sum())
 a_size = (a_rows.sum() * a_cols.sum())
 b_size = (b_rows.sum() * b_cols.sum())
 return (intersection / ((a_size + b_size) - intersection))

def _jaccard ( a_rows , a_cols , b_rows , b_cols ) : intersection = ( ( a_rows * b_rows ) . sum ( ) * ( a_cols * b_cols ) . sum ( ) ) a_size = ( a_rows . sum ( ) * a_cols . sum ( ) ) b_size = ( b_rows . sum ( ) * b_cols . sum ( ) ) return ( intersection / ( ( a_size + b_size ) - intersection ) )
jaccard coefficient on the elements of the two biclusters .