Skip to content

python wrapper for the ensmallen c++ library for numerical optimization

License

Notifications You must be signed in to change notification settings

apoorvalal/pyensmallen

Repository files navigation

pyensmallen: python bindings for the ensmallen library for numerical optimization

Very minimal python bindings for ensmallen library. Currently supports

  • L-BFGS, with intended use for optimisation of smooth objectives for m-estimation
  • ADAM (and variants with different step-size routines) - makes use of ensmallen's templatization.
  • Frank-Wolfe, with intended use for constrained optimization of smooth losses
    • constraints are either lp-ball (lasso, ridge, elastic-net) or simplex

See ensmallen docs for details.

Installation:

from pypi

pip install pyensmallen

from source

  1. Install armadillo and ensmallen for your system (build from source, or via conda-forge; I went with the latter)
  2. git clone this repository
  3. pip install -e .
  4. Profit? Or at least minimize loss?

from wheel

  • download the appropriate .whl for your system from the more recent release listed in Releases and run pip install ./pyensmallen... OR
  • copy the download url and run pip install https://github.com/apoorvalal/pyensmallen/releases/download/<version>/pyensmallen-<version>-<pyversion>-linux_x86_64.whl