CoCalc Logo Icon
StoreFeaturesDocsShareSupport News Sign UpSign In
Project: Testing 18.04
Views: 806
Embed | Download | Raw |
Kernel: Python 3 (Ubuntu Linux)

Scikit Optimize

Scikit-Optimize, or skopt, is a simple and efficient library to minimize (very) expensive and noisy black-box functions. It implements several methods for sequential model-based optimization. skopt is reusable in many contexts and accessible.

import numpy as np from skopt import gp_minimize def f(x): return ( np.sin(5 * x[0]) * (1 - np.tanh(x[0]**2)) * np.random.randn() * 0.1) res = gp_minimize(f, [(-2.0, 2.0)])
from skopt.plots import plot_convergence plot_convergence(res)