@Reference(authors="A. Beygelzimer, S. Kakade, J. Langford", title="Cover trees for nearest neighbor", booktitle="In Proc. 23rd Int. Conf. Machine Learning (ICML 2006)", url="https://doi.org/10.1145/1143844.1143857", bibkey="DBLP:conf/icml/BeygelzimerKL06") public class CoverTree<O> extends AbstractCoverTree<O> implements RangeIndex<O>, KNNIndex<O>
Reference:
 A. Beygelzimer, S. Kakade, J. Langford
 Cover trees for nearest neighbor
 In Proc. 23rd Int. Conf. Machine Learning (ICML 2006)
 
 This implementation uses metrical pruning, and keeps the distances to the
 parent nodes. It thus needs more than twice the memory of
 SimplifiedCoverTree, but computes fewer distances.
 
TODO: allow insertions and removals, as in the original publication.
| Modifier and Type | Class and Description | 
|---|---|
| class  | CoverTree.CoverTreeKNNQueryKNN Query class. | 
| class  | CoverTree.CoverTreeRangeQueryRange query class. | 
| static class  | CoverTree.Factory<O>Index factory. | 
| private static class  | CoverTree.NodeNode object. | 
| Modifier and Type | Field and Description | 
|---|---|
| (package private) static Logging | LOGClass logger. | 
| private CoverTree.Node | rootTree root. | 
distanceFunction, distComputations, expansion, invLogExpansion, scaleBottom, truncaterelation| Constructor and Description | 
|---|
| CoverTree(Relation<O> relation,
         DistanceFunction<? super O> distanceFunction,
         double expansion,
         int truncate)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected CoverTree.Node | bulkConstruct(DBIDRef cur,
             int maxScale,
             double parentDist,
             ModifiableDoubleDBIDList elems)Bulk-load the cover tree. | 
| void | bulkLoad(DBIDs ids)Bulk-load the index. | 
| private void | checkCoverTree(CoverTree.Node cur,
              int[] counts,
              int depth)Collect some statistics on the tree. | 
| KNNQuery<O> | getKNNQuery(DistanceQuery<O> distanceQuery,
           java.lang.Object... hints)Get a KNN query object for the given distance query and k. | 
| protected Logging | getLogger()Get the class logger. | 
| RangeQuery<O> | getRangeQuery(DistanceQuery<O> distanceQuery,
             java.lang.Object... hints)Get a range query object for the given distance query and k. | 
| void | initialize()Initialize the index. | 
collectByCover, distance, distance, distToScale, excludeNotCovered, getLongName, getShortName, logStatistics, maxDistance, scaleToDistclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlogStatisticsgetLongName, getShortNamestatic final Logging LOG
private CoverTree.Node root
public CoverTree(Relation<O> relation, DistanceFunction<? super O> distanceFunction, double expansion, int truncate)
relation - data relationdistanceFunction - distance functionexpansion - Expansion ratetruncate - Truncate branches with less than this number of instances.public void initialize()
Indexinitialize in interface Indexpublic void bulkLoad(DBIDs ids)
ids - IDs to loadprotected CoverTree.Node bulkConstruct(DBIDRef cur, int maxScale, double parentDist, ModifiableDoubleDBIDList elems)
cur - Current routing objectmaxScale - Maximum scaleelems - Candidatesprivate void checkCoverTree(CoverTree.Node cur, int[] counts, int depth)
cur - Current nodecounts - Counter setdepth - Current depthpublic RangeQuery<O> getRangeQuery(DistanceQuery<O> distanceQuery, java.lang.Object... hints)
RangeIndexgetRangeQuery in interface RangeIndex<O>distanceQuery - Distance queryhints - Hints for the optimizernullpublic KNNQuery<O> getKNNQuery(DistanceQuery<O> distanceQuery, java.lang.Object... hints)
KNNIndexgetKNNQuery in interface KNNIndex<O>distanceQuery - Distance queryhints - Hints for the optimizernullprotected Logging getLogger()
AbstractCoverTreegetLogger in class AbstractCoverTree<O>Copyright © 2019 ELKI Development Team. License information.