Commits

Ruben Martinez-Cantin committed 377c0f3

Bug in nonparametric process feature initialization

Comments (0)

Files changed (3)

   bopt_params par = initialize_parameters_to_default();
 
   par.kernel.hp_mean[0] = KERNEL_THETA;
-  par.kernel.hp_std[0] = 100.0;
+  par.kernel.hp_std[0] = 1.0;
   par.kernel.n_hp = 1;
-  par.alpha = PRIOR_ALPHA;
-  par.beta = PRIOR_BETA;
   par.mean.coef_mean[0] = 0.0;
   par.mean.coef_std[0] = MEAN_SIGMA;
   par.mean.n_coef = 1;
   par.noise = DEFAULT_NOISE;
-  par.surr_name = S_GAUSSIAN_PROCESS_INV_GAMMA_NORMAL;
+  par.surr_name = S_STUDENT_T_PROCESS_JEFFREYS;
   par.n_iterations = 20;       // Number of iterations
   par.n_init_samples = 20;
   /*******************************************/

python/demo_cam.py

 from SimpleCV import Camera
 import numpy as np
 import bayesopt
+from time import sleep
 # Initialize the camera
 cam = Camera()
 cost = np.zeros(256)

src/nonparametricprocess.cpp

     mMeanV.resize(mMeanV.size()+1);  
     mMeanV(mMeanV.size()-1) = mMean->getMean(x);
 
-    mFeatM.resize(mFeatM.size1(),mFeatM.size2()+1);  
-    column(mFeatM,mFeatM.size2()-1) = mMean->getFeatures(x);
+    vectord feat = mMean->getFeatures(x);
+    mFeatM.resize(feat.size(),mFeatM.size2()+1);  
+    column(mFeatM,mFeatM.size2()-1) = feat;
 
   };