I wonder - could this be related to the eigenvalue ratio, as suggested in the F1000 paper?
If it is, it’s not straightforward. Using my real life example, I took some subsets of the data and calculated the aspect ratio with the highest correlation (maxc), what that correlation was (maxcor) and the ratio of eigenvalues. Here’s what I found:
function maxcor(mds, dm; dim1=1, dim2=2, rng = 0.1:0.01:3)
proj = projection(mds)
x, y = (proj[:,i] for i in [dim1, dim2])
e1, e2 = eigvals(mds)[[dim1, dim2]]
res = [getcor(i, dm, x, y) for i in rng]
(mc, i) = findmax(res)
return (maxc = rng[i], maxcor=mc, eigratio=e2/e1)
end
function ploteigs(dm; dims=50, points=200)
c = Float64[]
er = Float64[]
cor = Float64[]
for _ in 1:points
picks = rand(1:size(dm, 1), dims)
subdm = dm[picks, picks]
mds = fit(MDS, subdm, distances=true)
for i in 1:5
mc = maxcor(mds, subdm, dim1=1, dim2=i)
push!(c, mc[:maxc])
push!(er, mc[:eigratio])
push!(cor, mc[:maxcor])
end
end
println(length(c))
scatter(c, er, zcolor=cor)
end
ploteigs(dm)
