Giter Site home page Giter Site logo

albo's Introduction

ALBO is an experimental application of Augmented Lagrangians for constrained Bayesian Optimization implemented in BoTorch

Toy problem from Gramacy et al. 2016

Test problem from Gramacy2016

Simulation 1 from Gardner et al. 2014

Test problem from Gardner2014

Algorithm

See report draft for details

Installation

git clone https://github.com/stys/albo
cd albo
conda env create -f environment.yml
conda activate albo
pip install -e .

Usage

This package provides alternatives to ConstrainedMCObjective for constrained optimization with Ax and TorchModelBridge.

Step 1: choose one of available ALBO objectives, i.e. ClassicAlboMCObjective

from albo.objective import ClassicAlboMCObjective

Step 2: create an instance AlboAcquisitionFactory which implements the inner loop of ALBO algorithm and use it to combine ALBO objective with one of the common acquisition functions. Use qEI for explorative phase of optimization and then use qSR for a few steps to drill to the optimal point (usually at the border of the constraints).

from albo.acquisition import AlboAcquisitionFactory

acqf_constructor = AlboAcquisitionFactory(
    albo_objective_constructor=ClassicAlboMCObjective,
    acquisition_function_name=`qEI`,
    bounds=bounds,
    init_mults=init_mults,
    init_penalty_rate=penalty_rate,
    num_iter=num_iter_inner,
    num_restarts=1
)

Step 3: use this instance as a custom acquisition function constructor with TorchModelBridge

from ax.modelbridge.factory import get_botorch
from ax.models.torch.botorch_defaults import scipy_optimizer

model = get_botorch(
    experiment=experiment,
    search_space=search_space,
    data=exp.fetch_data(),
    acqf_constructor=acqf_constructor,
    acqf_optimizer=partial(scipy_optimizer, method="L-BFGS-B")
)

See examples of full optimization loops: Toy problem from Gramacy2016

albo's People

Contributors

dashasabira avatar stys avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

dashasabira

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.