34 #include "paramsmap/paramsmap.h" 52 static int run(ParamsMap &pmap);
67 std::shared_ptr<learning::LTR_Algorithm> algo,
68 std::shared_ptr<metric::ir::Metric> train_metric,
69 std::shared_ptr<quickrank::data::Dataset> training_dataset,
70 std::shared_ptr<quickrank::data::Dataset> validation_dataset,
71 const std::string output_filename,
72 const size_t npartialsave);
86 std::shared_ptr<quickrank::optimization::Optimization> opt_algorithm,
87 std::shared_ptr<learning::LTR_Algorithm> ranking_algo,
88 std::shared_ptr<metric::ir::Metric> train_metric,
89 std::shared_ptr<quickrank::data::Dataset> training_dataset,
90 std::shared_ptr<quickrank::data::Dataset> validation_dataset,
91 std::string training_partial_filename,
92 std::string validation_partial_filename,
93 const std::string output_filename,
94 const std::string opt_algo_model_filename,
95 const size_t npartialsave);
109 std::shared_ptr<learning::LTR_Algorithm> algo,
110 std::shared_ptr<metric::ir::Metric> test_metric,
111 std::shared_ptr<quickrank::data::Dataset> test_dataset,
112 const std::string scores_filename,
113 const bool detailed_testing);
115 static std::shared_ptr<quickrank::data::Dataset>
load_dataset(
116 const std::string dataset_filename,
117 const std::string dataset_label);
120 std::shared_ptr<learning::LTR_Algorithm> algo,
121 std::shared_ptr<data::Dataset> input_dataset);
This class implements the main logic of the quickrank application.
Definition: driver.h:42
Definition: dataset.cc:28
virtual ~Driver()
Definition: driver.cc:41
static int run(ParamsMap &pmap)
Implements the main logic of the quickrank application, detecting the metrics to adopt and the phases...
Definition: driver.cc:44
static std::shared_ptr< data::Dataset > extract_partial_scores(std::shared_ptr< learning::LTR_Algorithm > algo, std::shared_ptr< data::Dataset > input_dataset)
Definition: driver.cc:384
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...
Definition: driver.cc:312
Driver()
Definition: driver.cc:38
static std::shared_ptr< quickrank::data::Dataset > load_dataset(const std::string dataset_filename, const std::string dataset_label)
Definition: driver.cc:360
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 da...
Definition: driver.cc:218
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 da...
Definition: driver.cc:237