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 00029 00030 #define MINOVERLAPDOCNUM 3 00031 00032 #define MINLESSDBPERCEN 0.4 00033 00034 #define MGETTOPDOCSNUM 10 00035 00036 #include "Param.hpp" 00037 #include "DistMergeMethod.hpp" 00038 #include "InvFPTypes.hpp" 00039 00040 00041 namespace MultiRegrMergeMethodParameter { 00042 00044 00045 static String csDbDataBaseIndex; 00047 00049 static void get() { 00050 csDbDataBaseIndex = ParamGetString("csDbDataBaseIndex",""); 00051 } 00052 }; 00053 00054 00055 class MultiRegrMergeMethod : public DistMergeMethod { 00056 public: 00058 MultiRegrMergeMethod(double constA=0.714, double constB=0.2857); 00059 ~MultiRegrMergeMethod(); 00060 00065 void mergeScoreSet(const IndexedRealVector &indexset, 00066 const DocScoreVector* const* scoreset, 00067 DocScoreVector &results); 00068 void calcRegrParams(const IndexedRealVector &indexset, 00069 const DocScoreVector* centralscores, 00070 const DocScoreVector* const* scoresset); 00071 00072 protected: 00074 virtual double score(double dbscore, double docscore,int dbIndex) const; 00075 virtual double score(double dbscore, double docscore) const; 00076 00078 double *parama; 00079 double *paramb; 00080 double defParamA; 00081 double defParamB; 00082 }; 00083 00084 #endif