Skip to main content

Robust solver plus constraints for ill-conditioned systems linear systems of any shape

Project description

ARLS: Automatically Regularized Linear System Solver

Arls is intended for use in solving linear systems, Ax=b, which other solvers
may not be able to handle. Ill-conditioning is the usual reason for people to seek
alternative solvers such as arls(). In addition, arls() has a rich set of
constraints which can be useful in solving both difficult and easy systems.

All these solvers apply to any shape of the matrix, A. That is, the
system can have more rows than columns (over-determined), or the same number
of rows and columns (square), or fewer rows than columns (under-determined). And the matix
A can be full rank, or have near zero singular values, or exactly zero singular
values of any number.

Please see the in-code comments for details of calls and returns, including example applications for each routine.

Our primary solver is:
x = arls1(A, b)[0]

If you need to solve many systems with the same matrix, A, but different b vectors, use:
x = arlsusv(A, b, U, S, Vt)[0]
See details in the code comments for how to get U, S, Vt.

If you need the solution to be constrained to be non-negative, use:
x = arlsnn(A, b)

If you need to add constraint equations which must be satisfied exactly (such as
"the sum of the solution elements must be 100.0") then put those equation in a
separate system, Ex == f and call:
x = arlseq(A, b, E, f)

If you need to add inequality constraints, such as "x1 + x2 >= 1.0" then
put those equations in a separate system, Gx >= h and call:
x = arlsgt(A, b, G, h)

If you need both equality and inequality constraints, use
x =arlsall(A, b, E, f, G, h)

You can also constrain the shape of the solution with
x = arlshape(A, b, nonneg, slope, curve)
You can constrain the solution to be
(1) nonnegative; and/or
(2) monotonically non-decreasing (i.e., rising)
or monotonically non-increasing (i.e., falling); and/or
(3) concave upward (like y = x*x) or concave downward.
Examples:
x = arlshape(A, b, 1, 1, 0) will force x to be nonnegative and rising.
x = arlshape(A, b, 0, -1, 1) will force x to be falling and concave up.
See details in the code comments.






Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arls-1.0.1.tar.gz (15.5 kB view hashes)

Uploaded Source

Built Distribution

arls-1.0.1-py3-none-any.whl (15.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page