mlpack_allknn(1) - Linux man page
Name
allknn - all k-nearest-neighbors
Synopsis
allknn [-h] [-v] -d string -k int -n string -r string [-c] [-l int] [-N] [-q string] -s
Description
This program will calculate the all k-nearest-neighbors of a set of 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.
For example, the following will calculate the 5 nearest neighbors of eachpoint in 'input.csv' and store the distances in 'distances.csv' and the neighbors in the file 'neighbors.csv':
$ allknn --k=5 --reference_file=input.csv --distances_file=distances.csv --neighbors_file=neighbors.csv
The output files are organized such that row i and column j in the neighbors output file corresponds to the index of the point in the reference set which is the i'th nearest neighbor from the point in the query set with index j. Row i and column j in the distances output file corresponds to the distance between those two points.
Required Options
--distances_file (-d) [string]
- File to output distances into.
- --k (-k) [int]
- Number of furthest neighbors to find.
- --neighbors_file (-n) [string]
- File to output neighbors into.
- --reference_file (-r) [string]
- File containing the reference dataset.
Options
--cover_tree (-c)
- If true, use cover trees to perform the search (experimental, may be slow).
- --help (-h)
- Default help info.
- --info [string]
- Get help on a specific module or option. Default value ''.
- --leaf_size (-l) [int]
- Leaf size for tree building. Default value 20.
- --naive (-N)
- If true, O(n^2) naive mode is used for computation.
- --query_file (-q) [string]
- File containing query points (optional). Default value ''.
- --single_mode (-s)
- If true, single-tree search is used (as opposed to dual-tree search.
- --verbose (-v)
- Display informational messages and the full list of parameters and timers at the end of execution.
Additional Information
For further information, including relevant papers, citations, and theory, consult the documentation found at http://www.mlpack.org or included with your distribution of MLPACK.