Hi Nafieseh,
The strength of the BallTree is querying neighbors without actually
computing all distances. If you wish to simply compute distances between
specified points, the better tools are in the pairwise submodule.  For
example:


In [1]: import numpy as np

In [2]: from sklearn.metrics import pairwise

In [3]: X = np.random.random((100, 3)) # 100 pts in 3 dims

In [4]: pairwise.pairwise_distances(X[0], X[1])
Out[4]: array([[ 0.84912197]])

Hope that helps!
   Jake

 Jake VanderPlas
 Director of Research – Physical Sciences
 eScience Institute, University of Washington
 http://www.vanderplas.com

On Tue, May 5, 2015 at 7:41 AM, nafise mehdipoor <mehdipour...@yahoo.com>
wrote:

> Hi,
> Please let me know if there is a way to query the distance between two
> specified points in the BallTree library?
> Thank you
>
> Nafiseh.
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to