49 #ifndef _CINVERTEDFILEQUERY 50 #define _CINVERTEDFILEQUERY 51 #include "libGIFTQuInvertedFile/include/uses-declarations.h" 54 #include "libMRML/include/CSelfDestroyPointer.h" 55 #include "libMRML/include/CRelevanceLevelList.h" 56 #include "libMRML/include/CIDRelevanceLevelPairList.h" 57 #include "libGIFTQuInvertedFile/include/CWeightingFunctionPointerList.h" 58 #include "libGIFTQuInvertedFile/include/CWeightingFunctionPointerHash.h" 59 #include "libMRML/include/CAlgorithm.h" 60 #include "libMRML/include/CQuery.h" 61 #include "libGIFTAcInvertedFile/include/CAcInvertedFile.h" 62 #include "libGIFTQuInvertedFile/include/CWeightingFunction.h" 63 #include "libGIFTQuInvertedFile/include/CQueryNormalizer.h" 64 #include "libGIFTAcInvertedFile/include/WeightingFunctionsAndNormalizers.h" 68 #include "libGIFTQuInvertedFile/include/CWeighter.h" 128 const CWeightingFunctionPointerList& inFeatures,
129 bool lPositive)
const;
137 double keepScorePruning(
CScoreBoard& inoutScoreBoard,
138 const CWeightingFunctionPointerList& inFeatures,
140 int inDesiredNumberOfDocuments)
const;
153 outQueryFeatureWeighters)
const;
160 void buildNormalizedQueryList(
double inPositiveRelevanceSum,
161 double inNegativeRelevanceSum,
164 CWeightingFunctionPointerList&
172 void buildNormalizedQueryHash(
double inPositiveRelevanceSum,
173 double inNegativeRelevanceSum,
212 virtual bool setAlgorithm(
CAlgorithm& inAlgorithm);
224 int inNumberOfInterestingImages,
225 double inDifferenceToBest);
234 int inNumberOfInterestingImages,
235 double inDifferenceToBest);
242 double DIDToScore(TID inDID,
251 double URLToScore(
const string& inURL,
259 double FeatureListToScore(TID inDID,
269 outQueryFeatureWeighters)
const;
275 static const int MAXIMUMNUMBEROFEATUREGROUPS=50;
279 bool mBlockingArray[MAXIMUMNUMBEROFEATUREGROUPS];
287 void activateBlockingFeatures();
294 void releaseBlockingFeatures();
301 bool featuresBlocked()
const;
308 void blockFeatureGroup(
const int featureNumber);
315 void unblockFeatureGroup(
const int featureNumber);
322 bool isBlocked(
const int featureNumber)
const;
330 static const int MAX_SCOREBOARD_PRUNINGS=10;
356 mScoreBoardPruningArray[MAX_SCOREBOARD_PRUNINGS];
361 bool mFeaturePruningUsed;
366 bool mTimePruningUsed;
373 bool mEvaluateAfterPruning;
381 void releaseAllPrunings();
391 void useFeaturePruning(
double percentage);
399 void releaseFeaturePruning();
407 void useTimePruning(
double inTimeCutoffPoint);
415 void releaseTimePruning();
423 void useScoreBoardPruning(
double inCutAfterFraction,
424 double inReduceToFactor);
432 void releaseScoreBoardPruning();
440 void useEvaluateAfterPruning();
448 void releaseEvaluateAfterPruning();
~CWeighterFactory()
Destructor deletes the content it points to.
CSelfDestroyPointer< CWeightingFunctionPointerHash > mQueryFeatureWeighters
object of this type to have a list of the features with the weights
Definition: CQInvertedFile.h:119
Definition: CIDRelevanceLevelPairList.h:52
int mModuloClass
Every lModulo-th feature, starting at lModuloClass.
Definition: CQInvertedFile.h:106
CWeighter * newWeighter(const string &inID) const
clones a weighter from the factory and sets the pointers in a way, that normalizers etc...
CWeighterFactory()
constructor: initializes everything fills the map etc.
double mStoppingTime
Henning Müller
Definition: CQInvertedFile.h:368
int mNumberofUsedScoreBoardPrunings
Henning Müller
Definition: CQInvertedFile.h:358
This class captures the structure of an XML element.
Definition: CXMLElement.h:51
A factory for weighting functions with associated normalizers.
Definition: CQInvertedFile.h:74
A list of Document Frequency Elements (the main part of an inverted file)
Definition: CDocumentFrequencyList.h:58
CRELEVANCELEVEL.
Definition: CRelevanceLevel.h:60
int mModulo
You can choose to use only every lModulo-th feature.
Definition: CQInvertedFile.h:104
The Query manager for Queries on inverted Files.
Definition: CQInvertedFile.h:96
CSelfDestroyPointer< CWeighter > mWeighter
The weighter currently used.
Definition: CQInvertedFile.h:115
Definition: CScoreBoard.h:60
An algorithm is a CXMLElement which is linked to a CSessionManager together they are able to build CQ...
Definition: CAlgorithm.h:43
The Query manager for Queries on inverted Files.
Definition: CQuery.h:73
An accessor to an inverted file.
Definition: CAcInvertedFile.h:83
Definition: CRelevanceLevelList.h:48
This is in fact a collection of collections.
Definition: CAccessorAdminCollection.h:39
CWeighterFactory mWeighterFactory
This is a factory for weighters.
Definition: CQInvertedFile.h:111
A weighter is a set of WeightingFunction and normalizers which are going to be used together...
Definition: CWeighter.h:41
double reduceTo
reduce the scoreboard to a factor of the number of images you want to retrieve
Definition: CQInvertedFile.h:352
double mPercentageofFeatures
Henning Müller
Definition: CQInvertedFile.h:363
bool mScoreBoardPruningUsed
true if the scoreboardis Pruned
Definition: CQInvertedFile.h:338
double stopAfterFeature
this marks a fraction of the number of features used
Definition: CQInvertedFile.h:347
bool mPruningUsed
Shows if any pruning is used.
Definition: CQInvertedFile.h:334
Parameters for scoreboard pruning.
Definition: CQInvertedFile.h:343
A hash of weighting function pointers.
Definition: CWeightingFunctionPointerHash.h:59