Эх сурвалжийг харах

clean-up and consistency in FMKGPHyp

Alexander Freytag 10 жил өмнө
parent
commit
e2f171e157

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 183 - 174
FMKGPHyperparameterOptimization.cpp


+ 19 - 12
FMKGPHyperparameterOptimization.h

@@ -56,11 +56,11 @@ class FMKGPHyperparameterOptimization : public NICE::Persistent, public NICE::On
     ///////////////////////////////////
     
     /** verbose flag */
-    bool verbose;    
+    bool b_verbose;    
     /** verbose flag for time measurement outputs */
-    bool verboseTime;        
+    bool b_verboseTime;        
     /** debug flag for several outputs useful for debugging*/
-    bool debug;    
+    bool b_debug;    
     
     //////////////////////////////////////
     // classification related variables //
@@ -77,10 +77,10 @@ class FMKGPHyperparameterOptimization : public NICE::Persistent, public NICE::On
     
     
     /** upper bound for hyper parameters (ParameterizedFunction) to optimize */
-    double parameterUpperBound;
+    double d_parameterUpperBound;
     
     /** lower bound for hyper parameters (ParameterizedFunction) to optimize */
-    double parameterLowerBound;
+    double d_parameterLowerBound;
     
     /** the parameterized function we use within the minimum kernel */
     NICE::ParameterizedFunction *pf;
@@ -103,9 +103,9 @@ class FMKGPHyperparameterOptimization : public NICE::Persistent, public NICE::On
     NICE::Vector labels; 
     
     //! store the class number of the positive class (i.e., larger class no), only used in binary settings
-    int binaryLabelPositive;
+    int i_binaryLabelPositive;
     //! store the class number of the negative class (i.e., smaller class no), only used in binary settings
-    int binaryLabelNegative;
+    int i_binaryLabelNegative;
     
     //! contains all class numbers of the currently known classes
     std::set<int> knownClasses;
@@ -269,7 +269,7 @@ class FMKGPHyperparameterOptimization : public NICE::Persistent, public NICE::On
     * @author Alexander Freytag
     * @param b_performRegression
     */
-    FMKGPHyperparameterOptimization( const bool & b_performRegression );
+    FMKGPHyperparameterOptimization( const bool & _performRegression );
 
     /**
     * @brief recommended constructor, only calls this->initialize with same input arguments
@@ -278,7 +278,9 @@ class FMKGPHyperparameterOptimization : public NICE::Persistent, public NICE::On
     * @param confSection
     *
     */
-    FMKGPHyperparameterOptimization( const Config *conf, const std::string & confSection = "FMKGPHyperparameterOptimization" );
+    FMKGPHyperparameterOptimization( const Config *_conf, 
+                                     const std::string & _confSection = "FMKGPHyperparameterOptimization" 
+                                   );
     
     
     /**
@@ -289,7 +291,10 @@ 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 = "FMKGPHyperparameterOptimization" );
+    FMKGPHyperparameterOptimization( const Config *_conf, 
+                                     FastMinKernel *_fmk, 
+                                     const std::string & _confSection = "FMKGPHyperparameterOptimization" 
+                                   );
       
     /**
     * @brief standard destructor
@@ -301,7 +306,9 @@ 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 = "FMKGPHyperparameterOptimization" );
+    void initFromConfig( const Config *_conf, 
+                         const std::string & _confSection = "FMKGPHyperparameterOptimization" 
+                       );
     
     
     ///////////////////// ///////////////////// /////////////////////
@@ -330,7 +337,7 @@ class FMKGPHyperparameterOptimization : public NICE::Persistent, public NICE::On
      * @author Alexander Freytag
      * @date 05-02-2014 (dd-mm-yyyy)
      */
-    void setPerformRegression ( const bool & b_performRegression );
+    void setPerformRegression ( const bool & _performRegression );
     
     /**
      * @brief Set the FastMinKernel object. Only allowed if not trained. Otherwise, exceptions will be thrown...

+ 1 - 1
FastMinKernel.h

@@ -127,7 +127,7 @@ namespace NICE {
       * @param X vector of sparse vector pointers
       * @param noise GP noise
       */
-      FastMinKernel( const std::vector< const NICE::SparseVector * > & X, 
+      FastMinKernel( const std::vector< const NICE::SparseVector * > & _X, 
                      const double _noise, 
                      const bool _debug = false, 
                      const bool & dimensionsOverExamples=false, 

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно