Add support for nan_euclidean distance metric
Really excited to work with this repo! Thanks for all the work, maintainers!
I'm interested in adapting the KNNImputer of sklearn to get some benefit from pynndescent, if possible. It uses a metric it calls nan_euclidean:
https://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.nan_euclidean_distances.html
Would it be welcome (or even sensible, because maybe there's no benefit here) for someone to submit a PR to bring a version of nan_euclidean into pynndescent?
Thanks!
That would definitely make sense to have in pynndescent as an option. I would welcome a PR. It shouldn't be too hard to implement: if you look at how the euclidean (and squared euclidean) distances are implemented you can likely adjust that accordingly for a nan_euclidean version. Beyond that you just need to make sure the named distances dictionaries are updated so that it know which function (or fast alternative) to call given the name "nan_euclidean". Is this something you think you could take on yourself?
Thanks Leland! I'm eager to find time to get around to this. Thanks for the encouraging response :)