|
mlpack
|
Nearest neighbor search with L_p distance. More...
#include <lmetric_search.hpp>
Public Types | |
| using | NeighborSearchType = neighbor::NeighborSearch< neighbor::NearestNeighborSort, metric::LMetric< TPower, true > > |
Public Member Functions | |
| LMetricSearch (const arma::mat &referenceSet) | |
| void | Search (const arma::mat &query, const size_t k, arma::Mat< size_t > &neighbors, arma::mat &similarities) |
| Given a set of query points, find the nearest k neighbors, and return similarites. More... | |
Nearest neighbor search with L_p distance.
An example of how to use LMetricSearch in CF is shown below:
| TPower | Power of metric. |
|
inline |
| referenceSet | Set of reference points. |
|
inline |
Given a set of query points, find the nearest k neighbors, and return similarites.
Similarities are non-negative and no larger thant one.
| query | A set of query points. |
| k | Number of neighbors to search. |
| neighbors | Nearest neighbors. |
| similarities | Similarities between query point and its neighbors. |
1.8.13