Alexander Freytag 9 gadi atpakaļ
vecāks
revīzija
dfc5e04b6e
2 mainītis faili ar 7 papildinājumiem un 6 dzēšanām
  1. 2 2
      FMKGPHyperparameterOptimization.cpp
  2. 5 4
      GPHIKRawClassifier.cpp

+ 2 - 2
FMKGPHyperparameterOptimization.cpp

@@ -602,7 +602,7 @@ void FMKGPHyperparameterOptimization::initFromConfig ( const Config *_conf,
   // this->eig = new EigValuesTRLAN();
   // My time measurements show that both methods use equal time, a comparision
   // of their numerical performance has not been done yet  
-  this->eig = new EVArnoldi ( _conf->gB ( _confSection, "eig_verbose", false ) /* verbose flag */, 10 );
+  this->eig = new EVArnoldi ( _conf->gB ( _confSection, "eig_verbose", false ) /* verbose flag */, 10 /*_maxiterations*/);
 
   this->nrOfEigenvaluesToConsider = std::max ( 1, _conf->gI ( _confSection, "nrOfEigenvaluesToConsider", 1 ) );
   
@@ -2064,7 +2064,7 @@ void FMKGPHyperparameterOptimization::restore ( std::istream & _is,
         //TODO eig
         // currently hard coded, since EV does not offer Persistent functionalities and 
         // in addition, we currently have no other choice for EV then EVArnoldi
-        this->eig = new EVArnoldi ( false /*eig_verbose */, 10 );        
+        this->eig = new EVArnoldi ( false /*eig_verbose */, 10 /*_maxiterations*/ );
         _is >> tmp; // end of block 
         tmp = this->removeEndTag ( tmp );
       }     

+ 5 - 4
GPHIKRawClassifier.cpp

@@ -310,8 +310,9 @@ void GPHIKRawClassifier::classify ( const NICE::SparseVector * _xstar,
         for ( std::map<uint, PrecomputedType>::const_iterator i = this->precomputedA.begin() ; i != this->precomputedA.end(); i++ )
         {
           uint classno = i->first;
-          maxClassNo = std::max ( maxClassNo, classno );
-          double beta = 0;
+          maxClassNo   = std::max ( maxClassNo, classno );
+          double beta  = 0;
+
           GMHIKernelRaw::sparseVectorElement **dataMatrix = gm->getDataMatrix();
 
           const PrecomputedType & A = i->second;
@@ -320,11 +321,11 @@ void GPHIKRawClassifier::classify ( const NICE::SparseVector * _xstar,
 
           for (SparseVector::const_iterator i = _xstar->begin(); i != _xstar->end(); i++)
           {
-            uint dim = i->first;
+            uint dim    = i->first;
             double fval = i->second;
 
             uint nnz = this->nnz_per_dimension[dim];
-            uint nz = this->num_examples - nnz;
+            uint nz  = this->num_examples - nnz;
 
             if ( nnz == 0 ) continue;
             // useful