Skip to content

Latest commit



executable file
159 lines (103 loc) · 4.07 KB


File metadata and controls

executable file
159 lines (103 loc) · 4.07 KB



Documentation Status



Optunity is a library containing various optimizers for hyperparameter tuning. Hyperparameter tuning is a recurrent problem in many machine learning tasks, both supervised and unsupervised.This package provides several distinct approaches to solve such problems including some helpful facilities such as cross-validation and a plethora of score functions.

Getting started

Obtaining Optunity

  • at (releases)
  • at (development)

From an optimization point of view, the tuning problem can be considered as follows: the objective function is non-convex, non-smooth and typically expensive to evaluate. Tuning examples include optimizing regularization or kernel parameters.

The figure below shows an example response surface, in which we optimized the hyperparameters of an SVM with RBF kernel. This specific example is available at /notebooks/notebooks/local-optima.

SVM hyperparameter response surface

The Optunity library is implemented in Python and allows straightforward integration in other machine learning environments. Optunity is currently also supported in , , and Java through Jython.

If you have any problems, comments or suggestions you can get in touch with us at gitter:

Join the chat at

Optunity is free software, using a BSD-style license.


As a simple example of Optunity's features, the code below demonstrates how to tune an SVM with RBF kernel using Optunity and scikit-learn. This involves optimizing the hyperparameters gamma and C:


For more examples, please see our .

Quick setup

Issue the following commands to get started on Linux:

git clone
export PYTHONPATH=$PYTHONPATH:$(pwd)/optunity/

Afterwards, importing optunity should work in Python:

python -c 'import optunity'

For a proper installation, run the following:

python optunity/ install

or, if you have pip:

pip install optunity

Installation may require superuser priviliges.

Developer Guide


Optunity is developed at the STADIUS lab of the dept. of electrical engineering at KU Leuven (ESAT). The main contributors to Optunity are:

Marc Claesen

  • Python package
  • framework design & implementation
  • solver implementation
  • communication protocol design & implementation
  • MATLAB wrapper
  • Octave wrapper
  • Python, MATLAB and Octave examples

Jaak Simm

  • communication protocol design
  • R wrapper
  • R examples

Vilen Jumutc

  • Julia wrapper

Indices and tables

  • genindex
  • modindex
  • search

/user/installation /user/index /examples/index /notebooks/index /wrappers/index /api/optunity