Open ceciledebezenac opened 4 years ago
Yes! Rad! This would be wonderful; I'm a big fan of the paper :grin:
Taking a look at some small things that might help w/ maintenance, integration, & api consistency, we might want to make a few adjustments? It's real well documented & the code is very clean, so I think it should be simple to change a few things over.
Not sure how @renanxcortes or @knaaptime feel, but I spot these things we'd wanna do for integration/consistency. Renan/Eli, you know better about the actual API of the functions, which we might want to also make consistent w/ the other measures.
scipy
more fully
scipy.spatial.distance.pdist
or sklearn.metrics.pairwise_distances
?, allowing us to use a more generic metric='euclidean'
specification & use faster vectorized distance computations. method
argument of set_neighborhood_type
kl_div
, which might use scipy.special.kl_div
for nan filtering & vectorized computationpysal
where possible
pysal.weights.Rook
if when we integrate, or hit the geodata.sindex
at least?warnings.warn
when showing warnings. matplotlib is already a dependency, but might be good to move seaborn into the function
Hello all, Thank you for going through the code so quickly! I totally agree with all that has been said, I paid very little attention to performance for computing the neighbourhood structure... I used pickle for my own analysis, but left it in the cleaner version for no particular reason. The scipy.special.kl_div method is great and would make the code a lot simpler. Please let me know if there are other parts of it that are obscure...
Happy to help get this done :) this would be an awesome addition to the library!
also i just realized seaborn is a dependency elsewhere in the pysal stack (spvcm) so i'd be fine including it as a hard dependency here as well
Hello I am just opening this issue following a discussion with @darribas to contribute into segregation the statistic proposed in the following paper: (Olteanu and al. 2019) I have a working version in another repository here I and I just wanted to kick off the discussion on how to integrate it in, and have your advice on the process.