#include <boost/program_options.hpp>
#include <boost/progress.hpp>
#include <boost/format.hpp>
#include <boost/timer.hpp>
#include <lshkit.h>
Functions | |
int | main (int argc, char *argv[]) |
This program uses sketch filtering to accelerate K-NN search. The idea is to first search against a dataset of sketches and keep the top C*K points as candidates. The candidates are than ranked using the raw feature vectors. The sketch database can be viewed as a index.
In this program, we use 2-stable LSH based sketch. Each sketch is a bit-vector of M bits, and each bit is produced by a independent hash function from the family DeltaLSB<GaussianLsh>.
The program reconstruct the sketches by default. You can give the --index option to make the program save the sketches. The next time you run the program with the same --index option, the program will try to load the previously saved sketches. When a saved sketch database is used, you need to make sure that the dataset and other parameters match the previous run. However, the benchmark file, Q and K can be different.
Allowed options: -h [ --help ] produce help message. -W [ -- ] arg (=1) -M [ -- ] arg (=1) skech size / byte -C [ -- ] arg (=10) # candidates = C x K -Q [ -- ] arg (=100) # queries to use -K [ -- ] arg (=50) K-NNs retrieved -D [ --data ] arg data file -B [ --benchmark ] arg benchmark file --index arg sketch file --asym Asymmetric distance estimation