فهرست منبع

added WeightedDim option in FMKGP, slightly touched default config strings

Alexander Freytag 11 سال پیش
والد
کامیت
52465252f8
2فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 6 0
      FMKGPHyperparameterOptimization.cpp
  2. 3 3
      FMKGPHyperparameterOptimization.h

+ 6 - 0
FMKGPHyperparameterOptimization.cpp

@@ -37,6 +37,7 @@
 #include "gp-hik-core/parameterizedFunctions/PFAbsExp.h"
 #include "gp-hik-core/parameterizedFunctions/PFExp.h"
 #include "gp-hik-core/parameterizedFunctions/PFMKL.h"
+#include "gp-hik-core/parameterizedFunctions/PFWeightedDim.h"
 
 
 
@@ -447,6 +448,11 @@ void FMKGPHyperparameterOptimization::initFromConfig ( const Config *_conf, cons
     std::set<int> steps; steps.insert(4000); steps.insert(6000); //specific for VISAPP
     this->pf = new NICE::PFMKL( steps, parameterLowerBound, parameterUpperBound );
   }
+  else if ( transform == "weightedDim" )
+  {
+    int pf_dim = _conf->gI ( _confSection, "pf_dim", 8 );
+    this->pf = new NICE::PFWeightedDim( pf_dim, parameterLowerBound, parameterUpperBound );
+  }
   else
   {
     fthrow(Exception, "Transformation type is unknown " << transform);

+ 3 - 3
FMKGPHyperparameterOptimization.h

@@ -278,7 +278,7 @@ class FMKGPHyperparameterOptimization : public NICE::Persistent, public NICE::On
     * @param confSection
     *
     */
-    FMKGPHyperparameterOptimization( const Config *conf, const std::string & confSection = "GPHIKClassifier" );
+    FMKGPHyperparameterOptimization( const Config *conf, const std::string & confSection = "FMKGPHyperparameterOptimization" );
     
     
     /**
@@ -289,7 +289,7 @@ class FMKGPHyperparameterOptimization : public NICE::Persistent, public NICE::On
     * @param fmk pointer to a pre-initialized structure (will be deleted)
     * @param confSection
     */
-    FMKGPHyperparameterOptimization( const Config *conf, FastMinKernel *_fmk, const std::string & confSection = "GPHIKClassifier" );
+    FMKGPHyperparameterOptimization( const Config *conf, FastMinKernel *_fmk, const std::string & confSection = "FMKGPHyperparameterOptimization" );
       
     /**
     * @brief standard destructor
@@ -301,7 +301,7 @@ class FMKGPHyperparameterOptimization : public NICE::Persistent, public NICE::On
     * @brief Set variables and parameters to default or config-specified values
     * @author Alexander Freytag
     */       
-    void initFromConfig( const Config *conf, const std::string & confSection = "GPHIKClassifier" );
+    void initFromConfig( const Config *conf, const std::string & confSection = "FMKGPHyperparameterOptimization" );
     
     
     ///////////////////// ///////////////////// /////////////////////