We should swap our current code where we loop over flattened arrays in Brain_Data.similarity() to scipy.spatial.distance.cdist which is 2 orders of magnitude faster.
For example, correlating a 5,000 x 50,000 Brain with a 11 x 50,000 Brain takes ~2:30 min, but with cdist takes about ~ 12 seconds.
We should swap our current code where we loop over flattened arrays in
Brain_Data.similarity()
toscipy.spatial.distance.cdist
which is 2 orders of magnitude faster.For example, correlating a 5,000 x 50,000 Brain with a 11 x 50,000 Brain takes ~2:30 min, but with
cdist
takes about ~ 12 seconds.