esda
esda copied to clipboard
geary optimization
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()
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.)
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?
Closed by #114.