Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 129 lines (83 sloc) 3.092 kB

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

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 Optunity library is implemented in Python and allows straightforward integration in other machine learning environments. Optunity is currently also supported in |wrapper-r|, |wrapper-matlab|, |wrapper-octave| and Java through Jython.

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 |examples|.

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

Jaak Simm

  • communication protocol design
  • R wrapper

Dusan Popovic

  • code examples

Indices and tables

Jump to Line
Something went wrong with that request. Please try again.