Skip to content

Commit 05f29f0

Browse files
committed
Changes to boruvka
1 parent 2db985f commit 05f29f0

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

hdbscan/_hdbscan_boruvka.pyx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@
3333
#
3434
# This code is based on the papers:
3535
#
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
3640
#
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
4044
#
4145
# As per the sklearn BallTree and KDTree implementations we make use of
4246
# the rdist, which is a faster to compute notion of distance (for example
@@ -48,24 +52,17 @@
4852
# we can perform more specific optimizations here for what
4953
# is a simpler version of the structure.
5054

51-
cimport cython
52-
53-
import numpy as np
5455
cimport numpy as np
5556

5657
from libc.float cimport DBL_MAX
57-
from libc.math cimport fabs, sqrt, exp, cos, pow
58+
from libc.math cimport fabs, pow
5859

59-
# from scipy.spatial.distance import cdist, pdist, squareform
6060
from sklearn.neighbors import KDTree, BallTree
6161

62-
import dist_metrics as dist_metrics
6362
cimport dist_metrics as dist_metrics
6463

6564
from sklearn.externals.joblib import Parallel, delayed
6665

67-
from libc.math cimport fabs, sqrt, exp, cos, pow, log
68-
6966
cdef np.double_t INF = np.inf
7067

7168
# Define the NodeData struct used in sklearn trees for faster
@@ -812,7 +809,7 @@ cdef class BallTreeBoruvkaAlgorithm (object):
812809
n_jobs : int (default 4)
813810
The number of parallel jobs used to compute core distances.
814811
815-
**kwargs :
812+
**kwargs :
816813
Keyword args passed to the metric.
817814
"""
818815

0 commit comments

Comments
 (0)