esda icon indicating copy to clipboard operation
esda copied to clipboard

geary optimization

Open ljwolf opened this issue 6 years ago • 2 comments

we should be able to exploit numpy.subtract.outer and elementwise matrix multiplication to do the Geary statistic in a much faster fashion than our current list comprehension. Something like:

numerator = (numpy.subtract.outer(y,y)**2).multiply(w.sparse).sum()

ljwolf avatar Nov 15 '18 15:11 ljwolf

or, even better, use sklearn.metrics.pairwise and we might be able to get something like to @lanselin's multivariate geary with minimal change (though still might need to extend the permutation inference stuff for it.)

ljwolf avatar Nov 15 '18 15:11 ljwolf

we should be able to exploit numpy.subtract.outer and elementwise matrix multiplication to do the Geary statistic in a much faster fashion than our current list comprehension. Something like:

numerator = (numpy.subtract.outer(y,y)**2).multiply(w.sparse).sum()

the outer will generate a dense nxn matrix though?

sjsrey avatar Apr 18 '20 19:04 sjsrey

Closed by #114.

jGaboardi avatar Nov 25 '22 16:11 jGaboardi