Feedback on a Document. More...

#include <gfdbk.h>

Public Member Functions

 GFdbk (size_t docid)
 
 GFdbk (size_t docid, tFdbkType fdbk, const R::RDate &done)
 
int Compare (const GFdbk &fdbk) const
 
int Compare (const size_t id) const
 
void NewFdbk (tFdbkType fdbk, const R::RDate &date)
 
tFdbkType GetFdbk (void) const
 
size_t GetDocId (void) const
 
R::RDate GetDone (void) const
 
 ~GFdbk (void)
 

Static Public Member Functions

static tFdbkType ErrorFdbk (tFdbkType fdbk, double PercErr, R::RRandom &rand)
 

Private Attributes

size_t DocId
 
tFdbkType Fdbk
 
R::RDate Done
 

Detailed Description

Feedback on a Document.

The GFdbk class provides a representation for feedback on a document. It can be an explicit assessment of a user on the relevance on a document, a computed assessment or a relation.

Constructor & Destructor Documentation

GFdbk ( size_t  docid)

Constructor.

Parameters
docidIdentifier of the document.
GFdbk ( size_t  docid,
tFdbkType  fdbk,
const R::RDate done 
)

Constructor.

Parameters
docidIdentifier of the document.
fdbkFeedback type.
doneDate.
~GFdbk ( void  )

Destruct the feedback.

Member Function Documentation

int Compare ( const GFdbk fdbk) const

Compare two assessments to order them using the document identifier.

See also
R::RContainer
Parameters
fdbkFeedback.
Returns
int
int Compare ( const size_t  id) const

Compare the document assessed with another document using their identifiers.

See also
R::RContainer
Parameters
idIdentifier of the document.
Returns
int
void NewFdbk ( tFdbkType  fdbk,
const R::RDate date 
)

Associate a new feedback to the current document.

Parameters
fdbkFeedback type.
dateDate.
tFdbkType GetFdbk ( void  ) const
Returns
the feedback type over the document.
size_t GetDocId ( void  ) const
Returns
the identifier of the document.
R::RDate GetDone ( void  ) const
Returns
the date of the feedback on the document.
static tFdbkType ErrorFdbk ( tFdbkType  fdbk,
double  PercErr,
R::RRandom rand 
)
static

Create an "erroneous feedback" with a given percentage. The percentage represents the number of feedbacks that will be changed in comparison to the original.

The changed feedback depends on the original feedback:

  • If the original feedback is relevant, the changed feedback has a probability of 0.75 to be fuzzy relevant and a probability of 0.25 to be irrelevant.
  • If the original feedback is fuzzy relevant, the changed feedback has a probability of 0.5 to be relevant and a probability of 0.5 to be irrelevant.
  • If the original feedback is irrelevant, the changed feedback has a probability of 0.75 to be fuzzy relevant and a probability of 0.25 to be relevant.
    Parameters
    fdbkOriginal feedback type.
    PercErrPercentage of error.
    randPointer to the random number generator to use.
    Returns
    a feedback feedback type.

Member Data Documentation

size_t DocId
private

Identifier of the document.

tFdbkType Fdbk
private

Type of the feedback.

R::RDate Done
private

When the feedback was done.