Skip to content


Repository files navigation

Build Status pypi version licence DOI


PyStruct aims at being an easy-to-use structured learning and prediction library. Currently it implements only max-margin methods and a perceptron, but other algorithms might follow.

The goal of PyStruct is to provide a well-documented tool for researchers as well as non-experts to make use of structured prediction algorithms. The design tries to stay as close as possible to the interface and conventions of scikit-learn.

You can install pystruct using

pip install pystruct

Some of the functionality (namely OneSlackSSVM and NSlackSSVM) requires that cvxopt is installed. See the installation instructions for more details.

The full documentation and installation instructions can be found at the website:

You can contact the authors either via the mailing list or on github.

Currently the project is mostly maintained by Andreas Mueller, but contributions are very welcome.

Jean-Luc Meunier (Naver Labs Europe) contributed a new model and did some maintenance, in the course of the EU READ project. See