mlpack_kfn(1)

okay bestie, welcome to mlpack_kfn(1), a User Commands page from the mlpack fam. Yes it's a manpage, no it is not boring, let's GO πŸ¦‹


✨ NAME ✨

mlpack_kfn β€” k-furthest-neighbors search. that's it, that's the job, and she does it gorgeously πŸ’…


🌸 SYNOPSIS 🌸

mlpack_kfn [-a string] [-e double] [-m unknown] [-k int] [-l int] [-p double] [-q unknown] [-R bool] [-r unknown] [-s int] [-t string] [-D unknown] [-T unknown] [-V bool] [-d unknown] [-n unknown] [-M unknown] [-h -v]

πŸ‘‘ DESCRIPTION πŸ‘‘

so this little icon computes the k-furthest-neighbors of a set of points. no cap. and you get choices, because you always deserve choices: you can hand her a separate set of reference points and query points, OR you can just give her a reference set and she'll lowkey use it as both the reference AND the query set. one set, two jobs, main character energy fr fr ✨

for example, this right here computes the 5 furthest neighbors of each point in 'input.csv', drops the distances into 'distances.csv' and the neighbors into 'neighbors.csv':

$ mlpack_kfn --k 5 --reference_file input.csv --distances_file distances.csv --neighbors_file neighbors.csv

now let's talk about how the output files are organized, because this part is giving ✨structure✨:

  • in the neighbors output matrix, row i and column j = the index of the point in the reference set that is the j'th furthest neighbor from the point in the query set with index i 🌈
  • in the distances output file, row i and column j = the distance between those two points πŸ’«

like... the way that maps out perfectly? obsessed.


πŸ’œ OPTIONAL INPUT OPTIONS πŸ’œ

  • --algorithm (-a) [string] β€” type of neighbor search: 'naive', 'single_tree', 'dual_tree', 'greedy'. default value is 'dual_tree'. pick your fighter πŸ₯Š
  • --epsilon (-e) [double] β€” if you specify this, she'll do approximate furthest neighbor search with the given relative error. must be in the range [0,1). default value 0. (yes, open on the right, do NOT come in here with a 1 πŸ™ˆ)
  • --help (-h) [bool] β€” default help info. your girl is helpful πŸ’–
  • --info [string] β€” print help on a specific option. default value ''. very "let me explain myself" of her.
  • --input_model_file (-m) [unknown] β€” pre-trained kFN model. bring your own, king πŸ‘‘
  • --k (-k) [int] β€” number of furthest neighbors to find. default value 0. (zero is a choice, bestie, but ok)
  • --leaf_size (-l) [int] β€” leaf size for tree building (used for kd-trees, vp trees, random projection trees, UB trees, R trees, R* trees, X trees, Hilbert R trees, R+ trees, R++ trees, and octrees). default value 20. that's a whole list of trees and she's not skipping a single one 🌳
  • --percentage (-p) [double] β€” if specified, she'll do approximate furthest neighbor search. must be in the range (0,1] (decimal form, so like, write it like a decimal pls). resultant neighbors will be at least (p*100) % of the distance as the true furthest neighbor. default value 1.
  • --query_file (-q) [unknown] β€” matrix containing query points (optional). optional!! you have options, love that for you πŸŽ€
  • --random_basis (-R) [bool] β€” before tree-building, project the data onto a random orthogonal basis. chaotic but in a computational way πŸ’…
  • --reference_file (-r) [unknown] β€” matrix containing the reference dataset.
  • --seed (-s) [int] β€” random seed (if 0, std::time(NULL) is used). default value 0.
  • --tree_type (-t) [string] β€” type of tree to use: 'kd', 'vp', 'rp', 'max-rp', 'ub', 'cover', 'r', 'r-star', 'x', 'ball', 'hilbert-r', 'r-plus', 'r-plus-plus', 'oct'. default value 'kd'. fourteen trees, fourteen vibes, periodt.
  • --true_distances_file (-D) [unknown] β€” matrix of true distances to compute the effective error (average relative error) (it is printed when -v is specified).
  • --true_neighbors_file (-T) [unknown] β€” matrix of true neighbors to compute the recall (it is printed when -v is specified).
  • --verbose (-v) [bool] β€” display informational messages and the full list of parameters and timers at the end of execution. she will tell you EVERYTHING and honestly? we love a transparent queen.
  • --version (-V) [bool] β€” display the version of mlpack.

πŸŽ€ OPTIONAL OUTPUT OPTIONS πŸŽ€

  • --distances_file (-d) [unknown] β€” matrix to output distances into.
  • --neighbors_file (-n) [unknown] β€” matrix to output neighbors into.
  • --output_model_file (-M) [unknown] β€” if specified, the kFN model will be output here. save her for later, she's worth it 🫢

🌈 ADDITIONAL INFORMATION 🌈

for further information β€” like relevant papers, citations, and theory β€” consult the documentation found at http://www.mlpack.org or the docs included with your distribution of mlpack. go read, bestie, it's giving ✨academic✨.


and that's the page!! this was mlpack-4.8.0, dated 22 June 2026, from the mlpack_kfn(1) manual. mwah, slay, go find your furthest neighbors fr fr πŸ’–βœ¨πŸ¦‹πŸ’…

πŸ“¦ where this page comes from