mlpack
Functions
fastmks_main.cpp File Reference
#include <mlpack/prereqs.hpp>
#include <mlpack/core/util/io.hpp>
#include <mlpack/core/util/mlpack_main.hpp>
#include "fastmks.hpp"
#include "fastmks_model.hpp"
Include dependency graph for fastmks_main.cpp:
This graph shows which files directly or indirectly include this file:

Functions

 BINDING_NAME ("FastMKS (Fast Max-Kernel Search)")
 
 BINDING_SHORT_DESC ("An implementation of the single-tree and dual-tree fast max-kernel search" " (FastMKS) algorithm. Given a set of reference points and a set of query" " points, this can find the reference point with maximum kernel value for " "each query point; trained models can be reused for future queries.")
 
 BINDING_LONG_DESC ("This program will find the k maximum kernels of a set of points, " "using a query set and a reference set (which can optionally be the same " "set). More specifically, for each point in the query set, the k points in" " the reference set with maximum kernel evaluations are found. The kernel " "function used is specified with the "+PRINT_PARAM_STRING("kernel")+" parameter.")
 
 BINDING_EXAMPLE ("For example, the following command will calculate, for each point in the " "query set "+PRINT_DATASET("query")+", the five points in the " "reference set "+PRINT_DATASET("reference")+" with maximum kernel " "evaluation using the linear kernel. The kernel evaluations may be saved " "with the "+PRINT_DATASET("kernels")+" output parameter and the " "indices may be saved with the "+PRINT_DATASET("indices")+" output " "parameter." "\"+PRINT_CALL("fastmks", "k", 5, "reference", "reference", "query", "query", "indices", "indices", "kernels", "kernels", "kernel", "linear")+"\" "The output matrices are organized such that row i and column j in the " "indices matrix corresponds to the index of the point in the reference set " "that has j'th largest kernel evaluation with the point in the query set " "with index i. Row i and column j in the kernels matrix corresponds to the" " kernel evaluation between those two points." "\" "This program performs FastMKS using a cover tree. The base used to build " "the cover tree can be specified with the "+PRINT_PARAM_STRING("base")+" parameter.")
 
 BINDING_SEE_ALSO ("Fast max-kernel search tutorial (fastmks)", "@doxygen/fmkstutorial.html")
 
 BINDING_SEE_ALSO ("k-nearest-neighbor search", "#knn")
 
 BINDING_SEE_ALSO ("Dual-tree Fast Exact Max-Kernel Search (pdf)", "http://mlpack.org/papers/fmks.pdf")
 
 BINDING_SEE_ALSO ("mlpack::fastmks::FastMKS class documentation", "@doxygen/classmlpack_1_1fastmks_1_1FastMKS.html")
 
 PARAM_MATRIX_IN ("reference", "The reference dataset.", "r")
 
 PARAM_STRING_IN ("kernel", "Kernel type to use: 'linear', 'polynomial', " "'cosine', 'gaussian', 'epanechnikov', 'triangular', 'hyptan'.", "K", "linear")
 
 PARAM_DOUBLE_IN ("base", "Base to use during cover tree construction.", "b", 2.0)
 
 PARAM_DOUBLE_IN ("degree", "Degree of polynomial kernel.", "d", 2.0)
 
 PARAM_DOUBLE_IN ("offset", "Offset of kernel (for polynomial and hyptan " "kernels).", "o", 0.0)
 
 PARAM_DOUBLE_IN ("bandwidth", "Bandwidth (for Gaussian, Epanechnikov, and " "triangular kernels).", "w", 1.0)
 
 PARAM_DOUBLE_IN ("scale", "Scale of kernel (for hyptan kernel).", "s", 1.0)
 
 PARAM_MODEL_IN (FastMKSModel, "input_model", "Input FastMKS model to use.", "m")
 
 PARAM_MODEL_OUT (FastMKSModel, "output_model", "Output for FastMKS model.", "M")
 
 PARAM_MATRIX_IN ("query", "The query dataset.", "q")
 
 PARAM_INT_IN ("k", "Number of maximum kernels to find.", "k", 0)
 
 PARAM_FLAG ("naive", "If true, O(n^2) naive mode is used for computation.", "N")
 
 PARAM_FLAG ("single", "If true, single-tree search is used (as opposed to " "dual-tree search.", "S")
 
 PARAM_MATRIX_OUT ("kernels", "Output matrix of kernels.", "p")
 
 PARAM_UMATRIX_OUT ("indices", "Output matrix of indices.", "i")
 

Detailed Description

Author
Ryan Curtin

Main executable for maximum inner product search.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.