This application (QueryClarity.cpp) computes clarity scores for a query model which could be an expanded model based on feedback documents and the original query model using the KL-divergence retrieval method. The original query model can be computed based on the original query text (when the parameter "initQuery" is not set, or set to a null string), or based on a previously saved query model (the model is given by the parameter "initQuery"). If the feedbackDocCount==0 then computs the clarity score only for the original or given query files. Clarity scores for each entire query, and each individual term within each query are written to the file specified by the parameter "expandedQuery".
Feedback can be based on true relevance judgments or any previously returned retrieval results.
Two important notes:
index
: The complete name of the index table-of-content file for the database index.
smoothSupportFile
: The name of the smoothing support file (e.g., one generated by GenerateSmoothSupport).
textQuery
: the original query text stream
initQuery
: the file with a saved initial query model. When this parameter is set to a non-empty string, the model stored in this file will be used for expansion; otherwise, the original query text is used the initial query model for expansion.
feedbackDocuments
: the file of feedback documents to be used for feedback. In the case of pseudo feedback, this can be a result file generated from an initial retrieval process. In the case of relevance feedback, this is usually a 3-column relevance judgment file. Note that this means you can NOT use a TREC-style judgment file directly; you must remove the second column to convert it to three-column.
resultFormat
: whether the feedback document file (given by feedbackDocuments
is of the TREC format (i.e., six-column) or just a simple three-column format <queryID, docID, score>. Integer value, zero for non-TREC format, and non-zero for TREC format. Default: 1 (i.e., TREC format). VERY IMPORTANT: For relevance feedback, resultFormat
should always be set to 0, since the judgment file is always a simple format.
expandedQuery
: the file to store the query clarity scores.
feedbackDocCount
: the number of docs to use for pseudo-feedback (0 means no-feedback)
queryUpdateMethod
: feedback method (0, 1, 2, 3, 4 for mixture model, divergence minimization, and Markov chain, relevance model1 and model2 respectively).
For all interpolation-based approaches (i.e., the new query model is an interpolation of the original model with a (feedback) model computed based on the feedback documents), the following four parameters apply:
feedbackCoefficient
: the coefficient of the feedback model for interpolation. The value is in [0,1], with 0 meaning using only the original model (thus no updating/feedback) and 1 meaning using only the feedback model (thus ignoring the original model).
feedbackTermCount
: Truncate the feedback model to no more than a given number of words/terms.
feedbackProbThresh
: Truncate the feedback model to include only words with a probability higher than this threshold. Default value: 0.001.
feedbackProbSumThresh
: Truncate the feedback model until the sum of the probability of the included words reaches this threshold. Default value: 1.
feedbackTermCount
, feedbackProbThresh
, and feedbackProbSumThresh
work conjunctively to control the truncation, i.e., the truncated model must satisfy all the three constraints.
All the three feedback methods also recognize the parameter feedbackMixtureNoise
(default value :0.5), but with <font color=red> different interpretations</font>.
feedbackMixtureNoise
is the collection model selection probability in the mixture model. That is, with this probability, a word is picked according to the collection language model, when a feedback document is "generated". feedbackMixtureNoise
means the weight of the divergence from the collection language model. (The higher it is, the farther the estimated model is from the collection model.) feedbackMixtureNoise
is the probability of not stopping, i.e., 1- alpha
, where alpha is the stopping probability while walking through the chain.
In addition, the collection mixture model also recognizes the parameter emIterations
, which is the maximum number of iterations the EM algorithm will run. Default: 50. (The EM algorithm can terminate earlier if the log-likelihood converges quickly, where convergence is measured by some hard-coded criterion. See the source code in SimpleKLRetMethod.cpp
for details. )