Giter Club home page Giter Club logo

sot's Introduction

DOI

SOT

This is a repository for a C++11 implementation of the surrogate based optimization algorithms in https://github.com/dme65/pySOT. SOT is designed for global deterministic optimization of computationally expensive black-box objective functions with continuous variables where the number of evaluations is limited.

Surrogate optimization algorithms generally consist of four components:

  1. The optimization problem: All of the available information about the optimization problem, e.g., dimensionality, variable types, objective function, etc.
  2. Surrogate model: Approximates the underlying objective function. Common choices are RBFs, Kriging, MARS, etc.
  3. Experimental design: Generates an initial set of points for building the initial surrogate model
  4. Adaptive sampling: Method for choosing evaluations after the experimental design has been evaluated.

SOT provides abstract classes that describe how these components should be implemented and the SOT strategies expect the implementations to use these abstract classes as base classes. This is an easy way to guarantee that the necessary functionality exists.

SOT currently supports synchronous parallel versions of the algorithms given in [1], [2], [3]. Paper [1] introduces the immensely popular stochastic optimization algorithm SRBF. Paper [2] introduces the DYCORS algorithm that is useful for high-dimensional problems. Paper [3] introduces DDS that is efficient for separable problems, which doesn't use any surrogate model.

Installation

The easiest way to install SOT is using CMake. SOT is a header-only library so no .so is being built, but it comes with a set of CMake tests that will be compiled. Installing SOT can be done using the following five steps:

cmake .
make
make doc
make install
make test

The first line generates the necessary makefiles and finds all of the SOT dependencies. Armadillo is currently the only SOT dependency and it can be built through most package managers or from the source available at: http://arma.sourceforge.net. We recommend that you build Armadillo with a fast BLAS library, such as OpenBLAS. CMake should be able to find both the library and the header files once Armadillo has been built. The second line will compile all of the SOT tests. SOT is a header-only library so no .so will be generated by make. The third line is optional and will generate the Doxygen documentation. The fourth line will move the header files to the default location for include, which is /usr/local/include on most UNIX systems. The fifth line will run the compiled SOT tests and they should all pass.

Note that the fact that SOT is a header-only library makes it possible to include the headers directly into your project.

The SOT tests seem to build without any issues on both Ubuntu, Linux, OS X, and on Windows under Cygwin.

Dependencies

SOT currently depends on BLAS, LAPACK, and Armadillo. You need Doyxgen if you want to generate the documentation. Armadillo should be linked with a fast BLAS library for maximum speed. More information can be found in the Armadillo documentation.

Developers

Examples

The following example code shows how to run SOT with the default methods:

#include <sot.h>
using namespace sot;

int main(int argc, char** argv) {
    int dim = 10;
    int maxEvals = 500; // Evaluation budget
    setSeedRandom(); // Set the SOT seed ramdomly

    std::shared_ptr<Problem> data(std::make_shared<Ackley>(dim));
    std::shared_ptr<ExpDesign> slhd(std::make_shared<SLHD>(2*(dim+1), dim));
    std::shared_ptr<Surrogate> rbf(std::make_shared<CubicRBF>(maxEvals, dim, data->lBounds(), data->uBounds()));
    std::shared_ptr<Sampling> dycors(std::make_shared<DYCORS<>>(data, rbf, 100*dim, maxEvals - slhd->numPoints()));

    Optimizer opt(data, slhd, rbf, dycors, maxeval);
    Result res = opt.run();

    std::cout << "Best value found: " << res.fBest() << std::endl;
    std::cout << "Best solution found: " << res.xBest().t() << std::endl;
}

SOT expects shared pointers for the base class objects that point to implementations of these base classes. Ackley is a popular test problem and Ackley implements the base class Problem. The SLHD (symmetric Latin hypercube design) is one of the most popular experimental designs, the Cubic RBF is a very popular surrogate model, and DYCORS is a popular adaptive sampling method. In addition to these four objects SOT only needs to know the evaluation budget in order to run the optimization strategy. The results from the run are returned in a separate result class.

Next features to be added

  • More surrogate models
  • Support for integer variables
  • Support for combining adaptive sampling methods
  • Support for ensemble surrogate models

References

[1] Rommel G Regis and Christine A Shoemaker. A stochastic radial basis function method for the global optimization of expensive functions. INFORMS Journal on Computing, 19(4): 497โ€“509, 2007.

[2] Rommel G Regis and Christine A Shoemaker. Combining radial basis function surrogates and dynamic coordinate search in high-dimensional expensive black-box optimization. Engineering Optimization, 45(5): 529โ€“555, 2013.

[3] Tolson, Bryan A., and Christine A. Shoemaker. Dynamically dimensioned search algorithm for computationally efficient watershed model calibration. Water Resources Research 43.1 (2007).

sot's People

Contributors

dme65 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.