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
-
docid Identifier of the document.
Constructor.
- Parameters
-
docid Identifier of the document. fdbk Feedback type. done Date.
~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
-
fdbk Feedback.
- Returns
- int
int Compare | ( | const size_t | id | ) | const |
Compare the document assessed with another document using their identifiers.
- See also
- R::RContainer
- Parameters
-
id Identifier of the document.
- Returns
- int
Associate a new feedback to the current document.
- Parameters
-
fdbk Feedback type. date Date.
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 |
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
-
fdbk Original feedback type. PercErr Percentage of error. rand Pointer to the random number generator to use.
- Returns
- a feedback feedback type.
Member Data Documentation
|
private |
Identifier of the document.
|
private |
Type of the feedback.
|
private |
When the feedback was done.