Sfoglia il codice sorgente

minor changes for debugging GPHIKRaw object

Alexander Freytag 9 anni fa
parent
commit
f016cfde07
3 ha cambiato i file con 15 aggiunte e 4 eliminazioni
  1. 1 2
      GPHIKClassifier.cpp
  2. 13 1
      GPHIKRawClassifier.cpp
  3. 1 1
      GPHIKRawClassifier.h

+ 1 - 2
GPHIKClassifier.cpp

@@ -451,7 +451,6 @@ void GPHIKClassifier::predictUncertainty( const NICE::SparseVector * _example,
     }
     case APPROXIMATE_FINE:
     {
-      std::cerr << "gphyper->computePredictiveVarianceApproximateFine" << std::endl;
       this->gphyper->computePredictiveVarianceApproximateFine( *_example, _uncertainty );
       break;
     }    
@@ -743,4 +742,4 @@ void GPHIKClassifier::addMultipleExamples( const std::vector< const NICE::Sparse
   {
     this->gphyper->addMultipleExamples( _newExamples, _newLabels, _performOptimizationAfterIncrement );     
   }
-}
+}

+ 13 - 1
GPHIKRawClassifier.cpp

@@ -83,7 +83,8 @@ GPHIKRawClassifier::GPHIKRawClassifier( const Config *_conf,
 
 GPHIKRawClassifier::~GPHIKRawClassifier()
 {
-  delete solver;
+  delete this->solver;
+  this->solver = NULL;
 }
 
 void GPHIKRawClassifier::initFromConfig(const Config *_conf,
@@ -109,6 +110,17 @@ void GPHIKRawClassifier::initFromConfig(const Config *_conf,
                                                        ils_min_delta,
                                                        ils_min_residual
                                                      );
+  if ( this->b_verbose )
+  {
+      std::cerr << "GPHIKRawClassifier::initFromConfig " <<std::endl;
+      std::cerr << "   confSection " << confSection << std::endl;
+      std::cerr << "   d_noise " << d_noise << std::endl;
+      std::cerr << "   f_tolerance " << f_tolerance << std::endl;
+      std::cerr << "   ils_max_iterations " << ils_max_iterations << std::endl;
+      std::cerr << "   ils_min_delta " << ils_min_delta << std::endl;
+      std::cerr << "   ils_min_residual " << ils_min_residual << std::endl;
+      std::cerr << "   ils_verbose " << ils_verbose << std::endl;
+  }
 }
 
 ///////////////////// ///////////////////// /////////////////////

+ 1 - 1
GPHIKRawClassifier.h

@@ -107,7 +107,7 @@ class GPHIKRawClassifier //: public NICE::Persistent
      * @brief standard constructor
      */
     GPHIKRawClassifier( const NICE::Config *_conf ,
-                     const std::string & s_confSection = "GPHIKClassifier"
+                     const std::string & s_confSection = "GPHIKRawClassifier"
                    );
 
     /**