Driver file for dualtree KDE algorithm. More...
Go to the source code of this file.
Functions | |
void | FixedBandwidthKde (Matrix &queries, Matrix &references, Matrix &reference_weights, bool queries_equal_references, struct datanode *kde_module) |
int | main (int argc, char *argv[]) |
Main function which reads parameters and determines which algorithms to run. | |
void | VariableBandwidthKde (Matrix &queries, Matrix &references, Matrix &reference_weights, bool queries_equal_references, struct datanode *kde_module) |
Driver file for dualtree KDE algorithm.
Definition in file dualtree_kde_main.cc.
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Main function which reads parameters and determines which algorithms to run.
In order to compile this driver, do: fl-build dualtree_kde_bin --mode=fast
In order to run this driver for the fast KDE algorithms, type the following (which consists of both required and optional arguments) in a single command line:
./dualtree_kde_bin --data=name_of_the_reference_dataset --dwgts=name_of_the_reference_weight_dataset --query=name_of_the_query_dataset --kde/kernel=gaussian --kde/bandwidth=0.0130619 --kde/scaling=range --kde/multiplicative_expansion --kde/fast_kde_output=fast_kde_output.txt --kde/naive_kde_output=naive_kde_output.txt --kde/do_naive --kde/relative_error=0.01
Explanations for the arguments listed with possible values:
1. data (required): the name of the reference dataset
2. dwgts (optional): the name of the reference weight dataset. If missing, then assumes a uniformly weighted kernel density estimation.
3. query (optional): the name of the query dataset (if missing, the query dataset is assumed to be the same as the reference dataset)
4. kde/kernel (optional): kernel function to use
5. kde/bandwidth (required): smoothing parameter used for KDE; this has to be positive.
6. kde/scaling (optional): whether to prescale the dataset
7. kde/multiplicative_expansion (optional): If this flag is present, the series expansion for the Gaussian kernel uses O(p^D) expansion. Otherwise, the Gaussian kernel uses O(D^p) expansion. See kde.h for details.
8. kde/do_naive (optional): run the naive algorithm after the fast algorithm.
9. kde/fast_kde_output (optional): if this flag is present, the approximated density estimates are output to the filename provided after it.
10. kde/naive_kde_output (optional): if this flag is present, the exact density estimates computed by the naive algorithm are output to the filename provided after it. This flag is not ignored if --kde/do_naive flag is not present.
11. kde/relative_error (optional): relative error criterion for the fast algorithm; default value is 0.1 (10 percent relative error for all query density estimates).
Definition at line 268 of file dualtree_kde_main.cc.
References fx_done(), fx_param_exists(), fx_param_str(), fx_param_str_req(), fx_root, fx_submodule(), data::Load(), DatasetScaler::ScaleDataByMinMax(), and DatasetScaler::StandardizeData().