Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MultiRegrMergeMethod.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2003 Carnegie Mellon University.  All Rights Reserved.
00003  *
00004  * Use of the Lemur Toolkit for Language Modeling and Information Retrieval
00005  * is subject to the terms of the software license set forth in the LICENSE
00006  * file included with this software, and also available at
00007  * http://www.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010  */
00011 
00012 // lsi - created
00013 
00014 #ifndef _MULTIREGRMERGEMETHOD_HPP
00015 #define _MULTIREGRMERGEMETHOD_HPP
00016 
00017 #include "Param.hpp"
00018 #include "DistMergeMethod.hpp"
00019 #include "InvFPTypes.hpp"
00020 
00022 #define MINOVERLAPDOCNUM 3 
00023 
00024 #define MINLESSDBPERCEN 0.4
00025 
00026 #define MGETTOPDOCSNUM 10
00027 
00029 namespace MultiRegrMergeMethodParameter {
00030 
00032   static lemur::utility::String csDbDataBaseIndex;
00033 
00035   static void get() {
00036     csDbDataBaseIndex = lemur::api::ParamGetString("csDbDataBaseIndex","");
00037   }
00038 }
00039 
00040 namespace lemur 
00041 {
00042   namespace distrib 
00043   {
00045 
00056     class MultiRegrMergeMethod : public DistMergeMethod {
00057     public:
00059       MultiRegrMergeMethod(double constA=0.714, double constB=0.2857);
00060       ~MultiRegrMergeMethod();
00061 
00066       void mergeScoreSet(const lemur::api::IndexedRealVector &indexset, 
00067                          const DocScoreVector* const* scoreset, 
00068                          DocScoreVector &results);
00069       void calcRegrParams(const lemur::api::IndexedRealVector &indexset, 
00070                           const DocScoreVector* centralscores, 
00071                           const DocScoreVector* const* scoresset);
00072 
00073     protected:
00075       virtual double score(double dbscore, double docscore,int dbIndex) const;
00076       virtual double score(double dbscore, double docscore) const;
00077 
00079       double *parama;
00080       double *paramb;
00081       double defParamA;
00082       double defParamB;
00083     };
00084   }
00085 }
00086 
00087 #endif

Generated on Tue Jun 15 11:02:54 2010 for Lemur by doxygen 1.3.4