CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Avatar for Testing 18.04.

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Project: Testing 18.04
Views: 1000
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.

https://scikit-optimize.github.io/

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)])
/usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated " /usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated " /usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated " /usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated " /usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated " /usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated " /usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated " /usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated " /usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated " /usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated " /usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated " /usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated " /usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated " /usr/local/lib/python3.6/dist-packages/skopt/optimizer/optimizer.py:399: UserWarning: The objective has been evaluated at this point before. warnings.warn("The objective has been evaluated "
res
WARNING: Some output was deleted.
from skopt.plots import plot_convergence plot_convergence(res)
Image in a Jupyter notebook