Source

BayesOpt / python / demo_dimscaling.py

Diff from to

python/demo_dimscaling.py

 #!/usr/bin/env python
 # -------------------------------------------------------------------------
-#    This file is part of BayesOpt, an efficient C++ library for 
+#    This file is part of BayesOpt, an efficient C++ library for
 #    Bayesian optimization.
 #
 #    Copyright (C) 2011-2013 Ruben Martinez-Cantin <rmcantin@unizar.es>
-# 
-#    BayesOpt is free software: you can redistribute it and/or modify it 
+#
+#    BayesOpt is free software: you can redistribute it and/or modify it
 #    under the terms of the GNU General Public License as published by
 #    the Free Software Foundation, either version 3 of the License, or
 #    (at your option) any later version.
 #
-#    BayesOpt is distributed in the hope that it will be useful, but 
+#    BayesOpt is distributed in the hope that it will be useful, but
 #    WITHOUT ANY WARRANTY; without even the implied warranty of
 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 #    GNU General Public License for more details.
 # This example was provided by Janto Dreijer <jantod@gmail.com>
 
 import sys
+#Assume default install.
 sys.path.append('/usr/local/lib')
 
 import numpy as np
 
 mvalue, x_out, error = bayesopt.optimize(func, dim, lb, ub, params)
 
-print mvalue, x_out, error
+print "Result", mvalue, x_out, error
+
+print "Optimal", 0, np.arange(1,1+dim)