chkothe / proxalgs

Proximal algorithms and operators in python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proximal Algorithms

Proximal algorithms and operators in python

Build Status Coverage Status PyPI

Installation

pip install proxalgs

Overview

Proxalgs is a package for performing convex optimization in python.

Example code for solving l1-regularized least-squares:

>>> from proxalgs import Optimizer
>>> # we want to solve: min ||Ax - b||_2^2 + \gamma ||x||_1
>>> opt = Optimizer('linsys', P=(A.T @ A), q=(A.T @ b))       # main objective (least squares linear system)
>>> opt.add_regularizer('sparse', gamma=0.1)                  # regularizer (l1-norm) with penalty of 0.1
>>> x_hat = opt.minimize(x_init)                              # x_init can be any initialization (e.g. random)

About

Proximal algorithms and operators in python

License:MIT License


Languages

Language:Python 98.0%Language:Makefile 1.0%Language:Shell 0.9%