The similarity of two sets of biclusters.
Similarity between individual biclusters is computed. Then the best matching between sets is found by solving a linear sum assignment problem, using a modified Jonker-Volgenant algorithm. The final score is the sum of similarities divided by the size of the larger set.
Read more in the User Guide.
Tuple of row and column indicators for a set of biclusters.
Another set of biclusters like a.
May be the string “jaccard” to use the Jaccard coefficient, or any function that takes four arguments, each of which is a 1d indicator vector: (a_rows, a_columns, b_rows, b_columns).
Consensus score, a non-negative value, sum of similarities divided by size of larger set.
See also
scipy.optimize.linear_sum_assignmentSolve the linear sum assignment problem.
>>> from sklearn.metrics import consensus_score >>> a = ([[True, False], [False, True]], [[False, True], [True, False]]) >>> b = ([[False, True], [True, False]], [[True, False], [False, True]]) >>> consensus_score(a, b, similarity='jaccard') np.float64(1.0)
© 2007–2025 The scikit-learn developers
Licensed under the 3-clause BSD License.
https://scikit-learn.org/1.6/modules/generated/sklearn.metrics.consensus_score.html