GithubHelp home page GithubHelp logo

science4fun / bayesian-optimization Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thuijskens/bayesian-optimization

0.0 1.0 0.0 695 KB

Python code for bayesian optimization using Gaussian processes

Jupyter Notebook 98.73% Python 1.27%

bayesian-optimization's Introduction

Bayesian optimization with Gaussian processes

This repository contains Python code for Bayesian optimization using Gaussian processes. It contains two directories:

  • python: Contains two python scripts gp.py and plotters.py, that contain the optimization code, and utility functions to plot iterations of the algorithm, respectively.
  • ipython-notebooks: Contains an IPython notebook that uses the Bayesian algorithm to tune the hyperparameters of a support vector machine on a dummy classification task.

The signature of the optimization function is:

bayesian_optimisation(n_iters, sample_loss, bounds, x0=None, n_pre_samples=5,
                      gp_params=None, random_search=False, alpha=1e-5, epsilon=1e-7)

and its docstring is:

bayesian_optimisation

  Uses Gaussian Processes to optimise the loss function `sample_loss`.

  Arguments:
  ----------
      n_iters: integer.
          Number of iterations to run the search algorithm.
      sample_loss: function.
          Function to be optimised.
      bounds: array-like, shape = [n_params, 2].
          Lower and upper bounds on the parameters of the function `sample_loss`.
      x0: array-like, shape = [n_pre_samples, n_params].
          Array of initial points to sample the loss function for. If None, randomly
          samples from the loss function.
      n_pre_samples: integer.
          If x0 is None, samples `n_pre_samples` initial points from the loss function.
      gp_params: dictionary.
          Dictionary of parameters to pass on to the underlying Gaussian Process.
      random_search: integer.
          Flag that indicates whether to perform random search or L-BFGS-B optimisation
          over the acquisition function.
      alpha: double.
          Variance of the error term of the GP.
      epsilon: double.
          Precision tolerance for floats.

bayesian-optimization's People

Contributors

thuijskens 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.