QuickRank
v2.0
QuickRank: A C++ suite of Learning to Rank algorithms
|
This class implements the main logic of the quickrank application. More...
#include <driver.h>
Public Member Functions | |
Driver () | |
virtual | ~Driver () |
Static Public Member Functions | |
static int | run (ParamsMap &pmap) |
Implements the main logic of the quickrank application, detecting the metrics to adopt and the phases to execute (train/validation/test). More... | |
Static Private Member Functions | |
static void | training_phase (std::shared_ptr< learning::LTR_Algorithm > algo, std::shared_ptr< metric::ir::Metric > train_metric, std::shared_ptr< quickrank::data::Dataset > training_dataset, std::shared_ptr< quickrank::data::Dataset > validation_dataset, const std::string output_filename, const size_t npartialsave) |
Runs train/validation of algo by optimizing train_metric and then measures test_metric on the test data. More... | |
static void | optimization_phase (std::shared_ptr< quickrank::optimization::Optimization > opt_algorithm, std::shared_ptr< learning::LTR_Algorithm > ranking_algo, std::shared_ptr< metric::ir::Metric > train_metric, std::shared_ptr< quickrank::data::Dataset > training_dataset, std::shared_ptr< quickrank::data::Dataset > validation_dataset, std::string training_partial_filename, std::string validation_partial_filename, const std::string output_filename, const std::string opt_algo_model_filename, const size_t npartialsave) |
Runs train/validation of algo by optimizing train_metric and then measures test_metric on the test data. More... | |
static void | testing_phase (std::shared_ptr< learning::LTR_Algorithm > algo, std::shared_ptr< metric::ir::Metric > test_metric, std::shared_ptr< quickrank::data::Dataset > test_dataset, const std::string scores_filename, const bool detailed_testing) |
Runs the learned or loaded model on the test data and then measures test_metric on the test data. More... | |
static std::shared_ptr< quickrank::data::Dataset > | load_dataset (const std::string dataset_filename, const std::string dataset_label) |
static std::shared_ptr< data::Dataset > | extract_partial_scores (std::shared_ptr< learning::LTR_Algorithm > algo, std::shared_ptr< data::Dataset > input_dataset) |
This class implements the main logic of the quickrank application.
quickrank::driver::Driver::Driver | ( | ) |
|
virtual |
|
staticprivate |
|
staticprivate |
|
staticprivate |
Runs train/validation of algo by optimizing train_metric and then measures test_metric on the test data.
algo | The L-T-R algorithm to be tested. |
train_metric | The metric optimized during training. |
training_filename | The training dataset. |
validation_filename | The validation dataset. If empty, validation is not used. |
output_filename | Model output file. If empty, no output file is written. |
npartialsave | Allows to save a partial model every given number of iterations. |
|
static |
Implements the main logic of the quickrank application, detecting the metrics to adopt and the phases to execute (train/validation/test).
Returns the exit code of the application
|
staticprivate |
Runs the learned or loaded model on the test data and then measures test_metric on the test data.
algo | The L-T-R algorithm to be tested. |
test_metric | The metric measured on the test data. |
test_filename | The test dataset. If empty, no performance is measured on the test set. |
scores_filename | The output scores file. If set save the scores computed for the test set. |
verbose | If True saves an SVML-like file with the score of each ranker in the ensemble. NB. Works only for ensembles. |
|
staticprivate |
Runs train/validation of algo by optimizing train_metric and then measures test_metric on the test data.
algo | The L-T-R algorithm to be tested. |
train_metric | The metric optimized during training. |
training_filename | The training dataset. |
validation_filename | The validation dataset. If empty, validation is not used. |
output_filename | Model output file. If empty, no output file is written. |
npartialsave | Allows to save a partial model every given number of iterations. |