[scikit-learn] Nearest neighbor search with 2 distance measures
Rohin Kumar
yrohinkumar at gmail.com
Tue Aug 1 07:48:23 EDT 2017
Dear Jake,
Thanks for your response. I meant to group/count pairs in boxes (using two
arrays simultaneously-hence needing 2 metrics) instead of one distance
array as the binning parameter. I don't know if the algorithm supports such
a thing. For now, I am proceeding with your suggestion of two ball trees at
huge computational cost. I hope I am able to frame my question properly.
Thanks & Regards,
Rohin.
On Mon, Jul 31, 2017 at 8:16 PM, Jacob Vanderplas <jakevdp at cs.washington.edu
> wrote:
> On Sun, Jul 30, 2017 at 11:18 AM, Rohin Kumar <yrohinkumar at gmail.com>
> wrote:
>
>> *update*
>>
>> May be it doesn't have to be done at the tree creation level. It could be
>> using loops and creating two different balltrees. Something like
>>
>> tree1=BallTree(X,metric='metric1') #for x-z plane
>> tree2=BallTree(X,metric='metric2') #for y-z plane
>>
>> And then calculate correlation functions in a loop to get tpcf(X,r1,r2)
>> using tree1.two_point_correlation(X,r1) and tree2.two_point_correlation(
>> X,r2)
>>
>
> Hi Rohin,
> It's not exactly clear to me what you wish the tree to do with the two
> different metrics, but in any case the ball tree only supports one metric
> at a time. If you can construct your desired result from two ball trees
> each with its own metric, then that's probably the best way to proceed,
> Jake
>
>
>>
>> _______________________________________________
>> scikit-learn mailing list
>> scikit-learn at python.org
>> https://mail.python.org/mailman/listinfo/scikit-learn
>>
>>
>
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20170801/9b61e2a9/attachment-0001.html>
More information about the scikit-learn
mailing list