Model similarity matrix
Models
What you’re seeing
Each cell shows the cosine similarity between two models after we:
- extract either the leave / bail rate
\(b_{mc}\) or the refusal rate \(r_{mc}\)
for every fine-grained category \(c\);
- apply the chosen normalisation to obtain
\(\tilde b_{mc}\) or \(\tilde r_{mc}\);
- compute
\[
\mathrm{sim}(a,b)=
\frac{\tilde{\mathbf v}_a\!\cdot\!\tilde{\mathbf v}_b}
{\lVert\tilde{\mathbf v}_a\rVert\,
\lVert\tilde{\mathbf v}_b\rVert},
\]
which equals Pearson correlation when vectors are centred.
Colours follow Plotly’s diverging RdBu
scheme:
red ≈ anti-correlated, white ≈ uncorrelated, blue ≈ strongly correlated.
Normalisation formulas
Let \(\mathbf v_m\) be the raw vector and
\(\bar v_m=\frac{1}{C}\sum_c v_{mc}\).
- Centered rate:
\( \tilde v_{mc}=v_{mc}-\bar v_m\)
- Relative rate:
\( \tilde v_{mc}=v_{mc}/\bar v_m\)
- Log-odds residual:
\( \tilde v_{mc}=\operatorname{logit}(v_{mc})-
\operatorname{logit}(\bar v_m)\)
with \(\operatorname{logit}(p)=\ln\!\bigl(p/(1-p)\bigr)\).