|
33 | 33 | # |
34 | 34 | # This code is based on the papers: |
35 | 35 | # |
| 36 | +# Fast Euclidean Minimum Spanning Tree: Algorithm, analysis, and applications |
| 37 | +# William B. March, Parikshit Ram, Alexander Gray |
| 38 | +# Conference: Proceedings of the 16th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining |
| 39 | +# 2010 |
36 | 40 | # |
37 | | -# |
38 | | -# |
39 | | -# |
| 41 | +# Tree-Independent Dual-Tree Algorithms |
| 42 | +# Ryan R. Curtin, William B. March, Parikshit Ram, David V. Anderson, Alexander G. Gray, Charles L. Isbell Jr |
| 43 | +# 2013, arXiv 1304.4327 |
40 | 44 | # |
41 | 45 | # As per the sklearn BallTree and KDTree implementations we make use of |
42 | 46 | # the rdist, which is a faster to compute notion of distance (for example |
|
48 | 52 | # we can perform more specific optimizations here for what |
49 | 53 | # is a simpler version of the structure. |
50 | 54 |
|
51 | | -cimport cython |
52 | | - |
53 | | -import numpy as np |
54 | 55 | cimport numpy as np |
55 | 56 |
|
56 | 57 | from libc.float cimport DBL_MAX |
57 | | -from libc.math cimport fabs, sqrt, exp, cos, pow |
| 58 | +from libc.math cimport fabs, pow |
58 | 59 |
|
59 | | -# from scipy.spatial.distance import cdist, pdist, squareform |
60 | 60 | from sklearn.neighbors import KDTree, BallTree |
61 | 61 |
|
62 | | -import dist_metrics as dist_metrics |
63 | 62 | cimport dist_metrics as dist_metrics |
64 | 63 |
|
65 | 64 | from sklearn.externals.joblib import Parallel, delayed |
66 | 65 |
|
67 | | -from libc.math cimport fabs, sqrt, exp, cos, pow, log |
68 | | - |
69 | 66 | cdef np.double_t INF = np.inf |
70 | 67 |
|
71 | 68 | # Define the NodeData struct used in sklearn trees for faster |
@@ -812,7 +809,7 @@ cdef class BallTreeBoruvkaAlgorithm (object): |
812 | 809 | n_jobs : int (default 4) |
813 | 810 | The number of parallel jobs used to compute core distances. |
814 | 811 |
|
815 | | - **kwargs : |
| 812 | + **kwargs : |
816 | 813 | Keyword args passed to the metric. |
817 | 814 | """ |
818 | 815 |
|
|
0 commit comments