API Documentation

The safeopt package implements tools for Safe Bayesian optimization.

Main classes

These classes provide the main functionality for Safe Bayesian optimization. SafeOpt implements the exact algorithm, which is very inefficient for large problems. SafeOptSwarm scales to higher-dimensional problems by relying on heuristics and adaptive swarm discretization.

SafeOpt(gp, parameter_set, fmin[, …]) A class for Safe Bayesian Optimization.
SafeOptSwarm(gp, fmin, bounds[, beta, …]) SafeOpt for larger dimensions using a Swarm Optimization heuristic.

Utilities

The following are utilities to make testing and working with the library more pleasant.

sample_gp_function(kernel, bounds, …[, …]) Sample a function from a gp with corresponding kernel within its bounds.
linearly_spaced_combinations(bounds, num_samples) Return 2-D array with all linearly spaced combinations with the bounds.
plot_2d_gp(gp, inputs[, predictions, …]) Plot a 2D GP with uncertainty.
plot_3d_gp(gp, inputs[, predictions, …]) Plot a 3D gp with uncertainty.
plot_contour_gp(gp, inputs[, predictions, …]) Plot a 3D gp with uncertainty.