Reranker Framework (ReFr)
Reranking framework for structure prediction and discriminative language modeling
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
reranker::DirectLossScoreComparator Class Reference

A class to do “direct loss minimization” by considering the score of a candidate to be its raw score plus its loss insofar as candidate ordering is concerned. More...

#include <mira-style-model.H>

Inheritance diagram for reranker::DirectLossScoreComparator:
reranker::Candidate::Comparator reranker::FactoryConstructible

Public Member Functions

virtual int Compare (const Model &model, const Candidate &c1, const Candidate &c2)
 Returns 0 if the two candidates’ scores are equal, less than zero if the score of c1 is less than that of c2 and more than 0 if the score of c1 is greater than that of c2. More...
 
- Public Member Functions inherited from reranker::FactoryConstructible
virtual ~FactoryConstructible ()
 
virtual void RegisterInitializers (Initializers &initializers)
 
virtual void Init (const Environment *env, const string &arg)
 

Detailed Description

A class to do “direct loss minimization” by considering the score of a candidate to be its raw score plus its loss insofar as candidate ordering is concerned.

Definition at line 57 of file mira-style-model.H.

Member Function Documentation

virtual int reranker::DirectLossScoreComparator::Compare ( const Model model,
const Candidate c1,
const Candidate c2 
)
inlinevirtual

Returns 0 if the two candidates’ scores are equal, less than zero if the score of c1 is less than that of c2 and more than 0 if the score of c1 is greater than that of c2.

A candidate’s score is the sum of its raw score plus its loss, as far as this overridden method is concerned.

Implements reranker::Candidate::Comparator.

Definition at line 64 of file mira-style-model.H.


The documentation for this class was generated from the following file: