[mlpack-svn] r13400 - mlpack/trunk/src/mlpack/methods/neighbor_search
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Wed Aug 15 13:09:12 EDT 2012
Author: rcurtin
Date: 2012-08-15 13:09:11 -0400 (Wed, 15 Aug 2012)
New Revision: 13400
Modified:
mlpack/trunk/src/mlpack/methods/neighbor_search/allknn_main.cpp
Log:
Update documentation for the use of cover trees.
Modified: mlpack/trunk/src/mlpack/methods/neighbor_search/allknn_main.cpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/neighbor_search/allknn_main.cpp 2012-08-15 17:06:23 UTC (rev 13399)
+++ mlpack/trunk/src/mlpack/methods/neighbor_search/allknn_main.cpp 2012-08-15 17:09:11 UTC (rev 13400)
@@ -22,9 +22,10 @@
// Information about the program itself.
PROGRAM_INFO("All K-Nearest-Neighbors",
"This program will calculate the all k-nearest-neighbors of a set of "
- "points. You may specify a separate set of reference points and query "
- "points, or just a reference set which will be used as both the reference "
- "and query set."
+ "points using kd-trees or cover trees (cover tree support is experimental "
+ "and may not be optimally fast). You may specify a separate set of "
+ "reference points and query points, or just a reference set which will be "
+ "used as both the reference and query set."
"\n\n"
"For example, the following will calculate the 5 nearest neighbors of each"
"point in 'input.csv' and store the distances in 'distances.csv' and the "
@@ -53,8 +54,8 @@
PARAM_FLAG("naive", "If true, O(n^2) naive mode is used for computation.", "N");
PARAM_FLAG("single_mode", "If true, single-tree search is used (as opposed to "
"dual-tree search.", "s");
-PARAM_FLAG("cover_tree", "If true, use cover trees to perform the search.",
- "c");
+PARAM_FLAG("cover_tree", "If true, use cover trees to perform the search "
+ "(experimental, may be slow).", "c");
int main(int argc, char *argv[])
{
@@ -236,6 +237,9 @@
}
else // Cover trees.
{
+ // Make sure to notify the user that they are using cover trees.
+ Log::Info << "Using cover trees for nearest-neighbor calculation." << endl;
+
// Build our reference tree.
Log::Info << "Building reference tree..." << endl;
Timer::Start("tree_building");
More information about the mlpack-svn
mailing list