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

PLSAParam.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2001 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 #ifndef _PLSAPARAMETER_HPP
00013 #define _PLSAPARAMETER_HPP
00014 
00015 #include "Param.hpp"
00017 namespace PLSAParam {
00019 
00020 
00021   static std::string databaseIndex;
00023   static int numCats;
00025   static double beta, betaMin;
00027   static double eta;
00029   static double annealcue;
00031   static int numIters;
00033   static int numRestarts;
00035   static int testPercentage;
00037   static bool doTrain;
00039 
00040   static void get() {
00041     databaseIndex = lemur::api::ParamGetString("index","");
00042     numCats = lemur::api::ParamGetInt("numCats", 20);
00043     beta = lemur::api::ParamGetDouble("beta", 1);
00044     betaMin = lemur::api::ParamGetDouble("betaMin", 0.6);
00045     eta = lemur::api::ParamGetDouble("eta", 0.92);
00046     annealcue = lemur::api::ParamGetDouble("annealcue", 0);
00047     numIters = lemur::api::ParamGetInt("numIters", 100);
00048     numRestarts = lemur::api::ParamGetInt("numRestarts", 1);
00049     testPercentage = lemur::api::ParamGetInt("testPercentage", 10);
00050     std::string s = lemur::api::ParamGetString("doTrain", "true");
00051     doTrain = (s == "true");
00052   }
00053 };
00054 #endif

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