Skip to content

Some useful mathematical solvers for mainly non-negative least squares. Aside from using them solely in my project, I also hope it can help more people, so I create this repository for sharing.

License

Notifications You must be signed in to change notification settings

VEXLife/solvers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solvers

Test codecov

Here are my implementation of some useful solvers for mainly optimization problems in different programming languages. I hope you find them helpful.

Problem definition

  • Scalar equation: $f(x) = 0$
  • Linear system: $\mathbf{A}\mathbf{x} = \mathbf{b}$
  • Non-negative linear system: $\mathbf{A}\mathbf{x} = \mathbf{b}$ subject to $\mathbf{x} \succeq 0$
  • Non-negative least squares: $\min_{\mathbf{x}} \frac{1}{2}|\mathbf{A}\mathbf{x} - \mathbf{b}|_2^2$ subject to $\mathbf{x} \succeq 0$
  • Non-negative quadratic programming: $\min_{\mathbf{x}} \frac{1}{2}\mathbf{x}^\top\mathbf{Q}\mathbf{x} + \mathbf{c}^\top\mathbf{x}$ subject to $\mathbf{x} \succeq 0$

List of solvers

  • Scalar equation solver (MATLAB)
    • Algorithm: Bisection method
    • Self-contained
  • Non-negative linear system solver (MATLAB)
    • Optimization object: KL-Divergence
    • Algorithm: Fixed-point iteration
    • Extra requirement: The matrix $\mathbf{A}$ must be non-negative
    • Self-contained
  • Non-negative linear system solver (MATLAB)
    • Optimization object: Least Squares
    • Algorithm: Fixed-point iteration
    • Self-contained
  • Non-negative linear system solver (MATLAB)
    • Optimization object: KL-Divergence
    • Algorithm: Gradient Descent
    • Extra requirement: The matrix $\mathbf{A}$ must be non-negative
    • Self-contained
  • Non-negative linear system solver (MATLAB)
    • Optimization object: Least Squares
    • Algorithm: Projected Gradient Descent
    • Self-contained
  • Non-negative quadratic programming solver (MATLAB)
    • Algorithm: Projected Gradient Descent
    • Self-contained
  • Non-negative quadratic programming solver (MATLAB)
    • Algorithm: Multiplicative update
    • Self-contained
  • Linear system solver (MATLAB)
    • Algorithm: Jacobi iteration
    • Self-contained
  • Linear system solver (MATLAB)
    • Algorithm: Gauss-Seidel iteration
    • Self-contained
  • Linear system solver (MATLAB)
    • Algorithm: SOR iteration
    • Self-contained

Usage

MATLAB

Clone the repository or download the source code from release and add the path to the MATLAB environment. Alternatively, you can add this repository as a Git submodule to your project.

Performance

Non-negative linear system solvers Iterative linear system solvers Scalar equation solvers

About

Some useful mathematical solvers for mainly non-negative least squares. Aside from using them solely in my project, I also hope it can help more people, so I create this repository for sharing.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages