We present a tree data structure for fast
nearest neighbor operations in general n-
point metric spaces (where the data set con-
sists of n points). The data structure re-
quires O(n) space regardless of the met-
ric's structure yet maintains all performance
properties of a navigating net [KL04a]. If
the point set has a bounded expansion con-
stant c, which is a measure of the intrinsic
dimensionality (as defined in [KR02]), the
cover tree data structure can be constructed
in O(c^6 n log n) time. Furthermore, nearest
neighbor queries require time only logarith-
mic in n, in particular O(c^{12} log n) time.
Our experimental results show speedups
over the brute force search varying between
one and several orders of magnitude on nat-
ural machine learning datasets.