Ruben Martinez-Cantin avatar Ruben Martinez-Cantin committed 200768b

Improvements in documentation. Install in nondefault dirs. Adding Sobol based sampling for initialization.

Comments (0)

Files changed (11)

 SET(UTILS_SRC
   ./utils/parser.cpp
   ./utils/ublas_extra.cpp
+  ./sobol/sobol.cpp
   )
 
 SET(WRAPPPERS_SRC 
 
 INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include 
                      ${CMAKE_SOURCE_DIR}/wrappers
-		     ${CMAKE_SOURCE_DIR}/utils )
+		     ${CMAKE_SOURCE_DIR}/utils
+		     ${CMAKE_SOURCE_DIR}/sobol )
 
 
 LINK_DIRECTORIES( ${CMAKE_SOURCE_DIR}/lib )
 The online HTML version of these docs:
 <http://rmcantin.bitbucket.org/html/>
 
+Bayesian optimization uses a distribution over functions to build a
+model of the unknown function for we are looking the extrema, and then
+apply some active learning strategy to select the query points that
+provides most potential interest or improvement. Thus, it is a
+sampling efficient method for nonlinear optimization, design of
+experiments or bandits-like problems.
+
+
+Getting and installing BayesOpt
+-------------------------------
+
+The library can be download from any of this sources:
+
 - Download: <https://bitbucket.org/rmcantin/bayesopt>
 - Mirror: <https://github.com/rmcantin/bayesopt>
+- Mirror: <http://mloss.org/software/view/453/>
 
-Bayesian optimization uses a distribution over functions to build a
-metamodel of the unknown function for we are looking the extrema,
-and then apply some active learning strategy to select the query
-points that provides most potential interest for the seek. For that
-reason, it has been traditionally intended for optimization of
-expensive function. However, the efficiency of the library make it
-also interesting for many types of functions.
+The install guide for Windows, Linux and MacOS:
+- [Install guide](http://rmcantin.bitbucket.org/html/install.html) or \ref install
 
-It is intended to be both fast and clear for development and
-research. At the same time, it does everything the "right way". For
-example:
+For a complete description of supported systems:
+- [Supported OS, compilers, versions...](https://bitbucket.org/rmcantin/bayesopt/wiki/Compatibility)
 
-- latin hypercube sampling is used for the preliminary design step,
-- extensive use of Cholesky decomposition and related tecniques to 
-  improve numeral stability and reduce computational cost,
-- kernels, criteria and parametric functions can be combined to 
-  produce more advanced functions,
-- etc.
 
-The documentation can be found in:
+Using BayesOpt
+--------------
 
-- [Install guide](http://rmcantin.bitbucket.org/html/install.html) and \ref install
-- [Reference manual](http://rmcantin.bitbucket.org/html/reference.html)  and \ref reference
-- [Bayesian optimization](http://rmcantin.bitbucket.org/html/bopttheory.html) and \ref bopttheory
-- [Models and functions](http://rmcantin.bitbucket.org/html/modelopt.html) and \ref modelopt
-- [Demos and examples](http://rmcantin.bitbucket.org/html/demos.html) and \ref demos
-- [Supported OS, compilers, versions...](https://bitbucket.org/rmcantin/bayesopt/wiki/Compatibility)
+If you just want to use BayesOpt as a library for nonlinear optimization:
+- [Reference manual](http://rmcantin.bitbucket.org/html/reference.html) or \ref reference
+- [Demos and examples](http://rmcantin.bitbucket.org/html/demos.html) or \ref demos
+
+If you want to understand what is Bayesian optimization:
+- [Bayesian optimization](http://rmcantin.bitbucket.org/html/bopttheory.html) or \ref bopttheory
+- [Models and functions](http://rmcantin.bitbucket.org/html/modelopt.html) or \ref modelopt
+
+
+Getting involved
+----------------
+
+The best place to ask questions and discuss about BayesOpt is the [bayesopt-discussion mailing list](https://groups.google.com/forum/#!forum/bayesopt-discussion). Alternatively, you may directly contact Ruben Martinez-Cantin <rmcantin@unizar.es>.
+
+Please file bug reports at: https://bitbucket.org/rmcantin/bayesopt/issues
 
 You can also find more details at the [proyect
 wiki](http://bitbucket.org/rmcantin/bayesopt/wiki/Home) or subscribe
 to the [bayesopt-discussion mailing
 list](https://groups.google.com/forum/#!forum/bayesopt-discussion).
 
-**Important:** This code is free to use. However, if you are using the
-library, specially if it is for research or academic purposes, please
-send me an email at <rmcantin@unizar.es> with your name, institution
-and a brief description of your interest for this code (one or two
-lines).
 
-If you use BayesOpt in a work that leads to a scientific publication,
-we would appreciate it if you would kindly cite BayesOpt in your
-manuscript. Cite BayesOpt as something like:
+Using BayesOpt for academic or commercial purposes
+--------------------------------------------------
 
-----------------------------------------------------------------------
+This code is licensed under the GPL and it is free to use. However,
+please consider these recomentations when using BayesOpt:
 
-Ruben Martinez-Cantin, **BayesOpt: a toolbox for
-nonlinear-optimization, experimental design and stochastic bandits**,
-<http://bitbucket.org/rmcantin/bayesopt>
+- If you are using the library for research or academic purposes,
+please send me an email at <rmcantin@unizar.es> with your name,
+institution and a brief description of your interest for this code
+(one or two lines).
+
+- If you use BayesOpt in a work that leads to a scientific
+publication, we would appreciate it if you would kindly cite BayesOpt
+in your manuscript. If you use a specific algorithm, please also cite
+the corresponding work. The reference for each specific algorithm can
+be found in the documentation. Cite BayesOpt as something like:
+
+> Ruben Martinez-Cantin, **BayesOpt: a toolbox for
+> nonlinear-optimization, experimental design and stochastic bandits**,
+> <http://bitbucket.org/rmcantin/bayesopt>
+
+Commercial applications may also adquire a commercial license which
+allows more flexible terms than GPL. Please contact
+<rmcantin@unizar.es> for details.
+
 
 ----------------------------------------------------------------------
 

doxygen/install.dox

 /*! \page install Installing BayesOpt
 \tableofcontents
 
-BayesOpt uses standard C/C++ code (C++98) and it can be compiled in
-different platforms and used from different languages.
+The core of BayesOpt uses standard C/C++ code (C++98) and it can be
+compiled in different platforms and used from different languages
+thanks to the wrappers provided.
 
 \section unixinst Installing in Linux/MacOS:
 
 interfaces, debug/release mode or if you want to use shared libraries
 or not. \b Shared libraries are required to run the Python interface.
 
+\subsubsection instpath Install the library in a different path
+
+CMake allows to select the install path during compilation. You just
+need to change the CMAKE_INSTALL_PREFIX variable.  This can be done
+directly from the command line with the -D option, like this:
+
+\verbatim
+>> cmake -DCMAKE_INSTALL_PREFIX=/your/desired/path .
+\endverbatim
+
+or if you use ccmake, just modify the value of the variable with the
+corresponding path.
 
 \subsubsection docbuild Building the documentation
 

doxygen/reference.dox

 /*! \page reference Reference Manual
 \tableofcontents
 
+The library is intended to be both fast and clear for development and
+research. At the same time, it does everything the "right way". For
+example:
+
+- latin hypercube sampling is used for the preliminary design step,
+- extensive use of Cholesky decomposition and related tecniques to 
+  improve numeral stability and reduce computational cost,
+- kernels, criteria and parametric functions can be combined to 
+  produce more advanced functions,
+- etc.
+
+
 \section testing Testing the installation.
 
 The library includes several test program that can be found in the \em

matlab/demo_rembo.m

 
 n = 2;          % number of low dims (effective)
 nh = 1000;      % number of actual dims
-nreembo = 10;    % number of reembo iterations
+nreembo = 5;    % number of reembo iterations
 
 
 global MATRIX_A
 end;
 
 [foo,id] = min(values);
+disp('Final result');
 disp(points(id,:));

matlab/testfunctions/braninhighdim.m

 % ------------------------------------------------------------------------
 %
 
-function y = branin(x)
+function y = braninhighdim(x)
 %Bounds [0,1]^2
 % Min = 0.1239 0.8183
 % Min = 0.5428 0.1517  => 0.3979

python/demo_cam.py

 import numpy as np
 import bayesopt
 from time import sleep
+
 # Initialize the camera
 cam = Camera()
 cost = np.zeros(256)
     return ((countW-countB)/float(mat.size))**2
 
 params = bayesopt.initialize_params()
-params['n_iterations'] = 20
-params['n_init_samples'] = 10
-params['sigma_s'] = 1
-params['crit_name'] = "cEI"
-params['kernel_name'] = "kMaternISO3"
-params['mean_name'] = "mOne"
+params['n_iterations'] = 15
+params['n_init_samples'] = 5
 
 valid_values = np.transpose(np.array(range(256), dtype=float, ndmin=2))
 mvalue, x_out, error = bayesopt.optimize_discrete(costImage,
 print x_out
 img1 = img.binarize(x_out)
 
-# Loop to continuously get images
-for i in range(256):
-    cost[i] = costImage(i)
-
-minid = np.argmin(cost)
-
-print minid, cost[minid]
-img3 = img.binarize(np.argmin(cost))
-
 img1 = img.sideBySide(img1).sideBySide(img2)
 img1.drawText("Threshold: "+str(x_out))
 img1.show()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.