Giter Club home page Giter Club logo

bayesian-optimization's Introduction

Bayesian-Optimization

Many optimization problems in Machine learning are black-box problems where the objective function f(x) is a black-box.Evaluation of the function is restricted to sampling at a point x and getting a possibly noisy response. It becomes easy to evaluate the function if the data points are ver less or the dimension seems to be low using the standard adn powerful search technique's like Random search which randomnly searches the hyperparameter domain space and output the best hyperparameter which optimizes the function.

Bayesian Optimization is a powerfull technique when it comes to evaluate the objective function on a high dimensional data set(large number of variables) or the sample performance takes a long to evaluate.

This is the domain where Bayesian optimization techniques are most useful. They attempt to find the global optimimum in a minimum number of steps. Bayesian optimization incorporates prior belief about f and updates the prior with samples drawn from f to get a posterior that better approximates f. The model used for approximating the objective function is called surrogate model. Bayesian optimization also uses an acquisition function that directs sampling to areas where an improvement over the current best observation is likely.

Surrogate Model

A popular surrogate model for Bayesian optimization are Gaussian processes (GPs).GPs define a prior over functions and we can use them to incorporate prior beliefs about the objective function (smoothness, โ€ฆ). The GP posterior is cheap to evaluate and is used to propose points in the search space where sampling is likely to yield an improvement.

Acquisition Function

Proposing sampling points in the search space is done by acquisition functions. They trade off exploitation and exploration. Exploitation means sampling where the surrogate model predicts a high objective and exploration means sampling at locations where the prediction uncertainty is high. Both correspond to high acquisition function values and the goal is to maximize the acquisition function to determine the next sampling point.Expected imrovement acquisition function used to formalize what constitutes a "best guess".

Approach

In this approach we would be dealing with 4 parts:

  • Optimizing the objective function (Minimizing the validation error)
  • Domain Space - Set of Hyperparameters space
  • Optimization algorithm - Surrogate model to find the next best point to evaluate the model.
  • Storing the outcomes from the evaluation of the objective function consisting of hyperparameters and validation error.

Libraries used

There are multiple libraries available based on the acquisition functions. Some of them are listed below.

  • Hyperopt (using TPE : Tree parzen estimator) Our focus will be using this.
  • Spearmint (GP Surrogate)
  • SMAC (Random Forest regression)

Detail of the algorithms can be find here : https://papers.nips.cc/paper/4443-algorithms-for-hyper-parameter-optimization.pdf

bayesian-optimization's People

Contributors

ankit013 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.