Skip to content

Matrix-free implementation of accelerated projected gradient descent for large-scale non-negative least-squares problems.

License

Notifications You must be signed in to change notification settings

FabianKP/matrix_free_nnls

Repository files navigation

matrix_free_nnls

This repository contains code to solve non-negative least-squares problems of the form

min x 0 | | A x b | | 2 2

using the accelerated projected gradient descent method with restart described here.

The matrix A can be provided by the user as numpy.ndarray or as scipy.sparse.linalg.LinearOperator. The latter is recommended for large-scale problems.

image

Usage

import numpy as np
from matrix_free_nnls import solve_nnls

a = np.random.randn(100, 100)
b = np.random.randn(100)

x, res = solve_nnls(a, b)

Installation

You can download the wheel file matrix_free_nnls-1.0-py3-none-any.whl and then pip-install:

pip install matrix_free_nnls-1.0-py3-none-any.whl

About

Matrix-free implementation of accelerated projected gradient descent for large-scale non-negative least-squares problems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages