For the clusterings from two methods, first the cluster labels are adjusted. Denote \(\mathbf{s_1}\) as the label vector for method 1, \(\mathbf{s_2}\) as the label vector for method 2, and \(\mathbf{s_1}\) as the reference labels, we apply clue::solve_LSAP() function to generate a mapping function \(m()\) between the two sets of labels to maximize \(\sum^n_i I(s_{1i}, m(s_{2i}))\) where \(n\) is the length of \(\mathbf{s_1}\) or \(\mathbf{s_2}\). Denote the adjusted labels for the second method as \(s'_{2i} = m(s_{2i})\), the concordance between the two clusterings are calculated as:

\[ \frac{1}{n}\sum_i^n I(s_{1i}, s'_{2i}) \]

where \(I(x, y)\) is an indicator function with value 1 if \(x = y\) and 0 if \(x \ne y\). A concordance of 1 means the two clusterings are identical.