Need help with polylearn?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

228 Stars 40 Forks BSD 2-Clause "Simplified" License 56 Commits 8 Opened issues


A library for factorization machines and polynomial networks for classification and regression in Python.

Services available


Need anything else?

Contributors list

.. -- mode: rst --


A library for factorization machines and polynomial networks for classification and regression in Python.

Github repository. 

.. image:: :target:

.. image:: :target:

.. image:: :target:

.. image:: :target:

Factorization machines and polynomial networks are machine learning models that can capture feature interaction (co-occurrence) through polynomial terms. Because feature interactions can be very sparse, it's common to use low rank, factorized representations; this way, we can learn weights even for feature co-occurrences that haven't been observed at training time.

Factorization machines are popular for recommender systems, as they are a generalization of matrix completion models.

This package provides:

  • coordinate descent algorithm for fitting factorization machines of degree 2 or 3,
  • coordinate descent algorithm for fitting polynomial networks of arbitrary degree,
  • scikit-learn 
    _-compatible API,
  • Cython 
    _ implementations for computationally intensive parts.


Binary packages are not yet available.

The development version of polylearn can be installed from its git repository. In this case it is assumed that you have a working C++ compiler.

  1. Obtain the sources by::

    git clone

or, if

is unavailable,
download as a ZIP from GitHub 
  1. Install the dependencies::

    via pip

    pip install numpy scipy scikit-learn nose pip install sklearn-contrib-lightning

    via conda

    conda install numpy scipy scikit-learn nose conda install -c conda-forge sklearn-contrib-lightning

  2. Build and install polylearn::

    cd polylearn python build sudo python install


The solvers implemented are introduced in [1]. Factorization machines are introduced in [2] and polynomial networks in [3]_.

.. [1] Mathieu Blondel, Masakazu Ishihata, Akinori Fujino, Naonori Ueda. Polynomial Networks and Factorization Machines: New Insights and Efficient Training Algorithms. In: Proc. of ICML 2016. [


.. [2] Steffen Rendle. Factorization machines. In: Proc. of IEEE ICDM 2010. [


.. [3] Roi Livni, Shai Shalev-Shwartz, Ohad Shamir. On the computational efficiency of training neural networks. In: Proc. of NIPS 2014. [



  • Vlad Niculae, 2016-present

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.