A computation class for FFT based kernel density estimation. More...
Public Member Functions | |
void | Compute () |
Compute density estimates using FFT after initialization. | |
FFTKde () | |
Constructor - does not do anything. | |
void | get_density_estimates (Vector *results) |
Get the density estimates. | |
void | Init (Matrix &qset, Matrix &rset, struct datanode *module_in) |
Initialize the FFT KDE object with the query and the reference datasets with the parameter lists. | |
void | PrintDebug () |
Output KDE results to a stream. | |
~FFTKde () | |
Destructor - does not do anything. |
A computation class for FFT based kernel density estimation.
This class is only inteded to compute once per instantiation.
Example use:
FFTKde fft_kde; struct datanode* fft_kde_module; Vector results; fft_kde_module = fx_submodule(NULL, "kde", "fft_kde_module"); fft_kde.Init(queries, references, fft_kde_module); fft_kde.Compute(); // important to make sure that you don't call Init on results! fft_kde.get_density_estimates(&results);
Definition at line 77 of file fft_kde.h.
FFTKde::FFTKde | ( | ) | [inline] |
FFTKde::~FFTKde | ( | ) | [inline] |
void FFTKde::Compute | ( | ) | [inline] |
Compute density estimates using FFT after initialization.
Definition at line 802 of file fft_kde.h.
References ArrayList< TElem >::begin(), fx_timer_start(), fx_timer_stop(), GenVector< T >::ptr(), and GenVector< T >::SetZero().
Referenced by main().
void FFTKde::get_density_estimates | ( | Vector * | results | ) | [inline] |
Get the density estimates.
results | An uninitialized vector which will be initialized with the computed density estimates. |
Definition at line 745 of file fft_kde.h.
References GenVector< T >::Init(), and GenVector< T >::length().
Referenced by main().
void FFTKde::Init | ( | Matrix & | qset, | |
Matrix & | rset, | |||
struct datanode * | module_in | |||
) | [inline] |
Initialize the FFT KDE object with the query and the reference datasets with the parameter lists.
qset | The column-oriented query dataset. | |
rset | The column-oriented reference dataset. | |
module_in | The module containing the parameters for execution. |
Definition at line 760 of file fft_kde.h.
References fx_param_double_req(), fx_param_int(), fx_timer_start(), fx_timer_stop(), ArrayList< TElem >::Init(), and GenVector< T >::Init().
Referenced by main().
void FFTKde::PrintDebug | ( | ) | [inline] |
Output KDE results to a stream.
If the user provided "--fft_kde_output=" argument, then the output will be directed to a file whose name is provided after the equality sign. Otherwise, it will be provided to the screen.
Definition at line 863 of file fft_kde.h.
References fx_param_str().
Referenced by main().