![]() |
QuickRank
v2.0
QuickRank: A C++ suite of Learning to Rank algorithms
|
#include <custom_ltr.h>
Public Member Functions | |
| CustomLTR () | |
| CustomLTR (const pugi::xml_document &model) | |
| virtual | ~CustomLTR () |
| virtual std::string | name () const |
| Returns the name of the ranker. More... | |
| virtual void | learn (std::shared_ptr< data::Dataset > training_dataset, std::shared_ptr< data::Dataset > validation_dataset, std::shared_ptr< metric::ir::Metric > metric, size_t partial_save, const std::string model_filename) |
| Executes the learning process. More... | |
| virtual Score | score_document (const Feature *d) const |
| Returns the score of a given document. More... | |
| virtual pugi::xml_document * | get_xml_model () const |
| Return the xml model representing the current object. More... | |
Public Member Functions inherited from quickrank::learning::LTR_Algorithm | |
| LTR_Algorithm () | |
| LTR_Algorithm (const pugi::xml_document &model) | |
| Generates a LTR_Algorithm instance from a previously saved XML model. More... | |
| virtual | ~LTR_Algorithm () |
| LTR_Algorithm (const LTR_Algorithm &other)=delete | |
| Avoid inefficient copy constructor. More... | |
| LTR_Algorithm & | operator= (const LTR_Algorithm &)=delete |
| Avoid inefficient copy assignment. More... | |
| virtual void | score_dataset (std::shared_ptr< data::Dataset > dataset, Score *scores) const |
| Given and input dateset, the current ranker generates scores for each instance and store the in the scores vector. More... | |
| virtual std::shared_ptr< std::vector< Score > > | partial_scores_document (const Feature *d) const |
| Returns the partial score of a given document, tree by tree. More... | |
| virtual void | save (std::string model_filename, int suffix=-1) const |
| Save the current model to the output_file. More... | |
| virtual void | print_additional_stats (void) const |
| Print additional statistics. More... | |
| virtual bool | update_weights (std::shared_ptr< std::vector< double >> weights) |
| Update the weights for the ensemble models (only). More... | |
| virtual std::shared_ptr< std::vector< double > > | get_weights () const |
| Return the weights for the ensemble models (only). More... | |
Public Attributes | |
| const Score | FIXED_SCORE = 666.0 |
Static Public Attributes | |
| static const std::string | NAME_ = "CUSTOM" |
Private Member Functions | |
| virtual std::ostream & | put (std::ostream &os) const |
| Prints the description of Algorithm, including its parameters. More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const CustomLTR &a) |
| The output stream operator. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from quickrank::learning::LTR_Algorithm | |
| static std::shared_ptr< LTR_Algorithm > | load_model_from_file (std::string model_filename) |
| Load a model from a given XML file. More... | |
| quickrank::learning::CustomLTR::CustomLTR | ( | ) |
|
inline |
|
virtual |
|
virtual |
Return the xml model representing the current object.
Implements quickrank::learning::LTR_Algorithm.
|
virtual |
Executes the learning process.
| training_dataset | The training dataset. |
| validation_dataset | The validation training dataset. |
| metric | The metric to be optimized. |
| partial_save | Allows to save a partial model every given number of iterations. |
| model_filename | The file where the model, and the partial models, are saved. |
Implements quickrank::learning::LTR_Algorithm.
|
inlinevirtual |
Returns the name of the ranker.
Implements quickrank::learning::LTR_Algorithm.
|
privatevirtual |
Prints the description of Algorithm, including its parameters.
Implements quickrank::learning::LTR_Algorithm.
Returns the score of a given document.
Implements quickrank::learning::LTR_Algorithm.
|
friend |
The output stream operator.
|
static |
1.8.11