Giter Club home page Giter Club logo

cusprec's Introduction

cuda_sprec

A sparse signal recovery library written in PyCUDA.

Overview

Sparse recovery algorithms attempt to solve problems in which you have an undetermined system of linear equations, but there the solution is known to be sparse. This can be formalized as follows:

Let $A$ be an $m \times n$ (with $m < n$) matrix and $b \in \mathbb{R}^m$ be a vector. Find a vector $x \in \mathbb{R}^n$ such that $Ax=b$ and $x$ has the smallest possible number of non-zero entries (l0 minimization problem, NP-hard).

  • $A$ is the measurement matrix that models the transformation of a high-dimensional signal to an observed lower-dimensional signal, $b$.
  • $x$ is the original high-dimensional and sparse signal to recover.
    • This may be a high-dimensional signal where only a few frequency bands are activate, and it's usually represented by a vector where most entries are 0.
    • $x = [0,0,3,0,0,-2,0,0,0,1,0,0,0,0,0]$ is 15-dimensional, and only 3 frequencies are active.

The measurement matrix $A$ can be referred to as a "dictionary". A dictionary is a set of "atoms" or basis vectors (columns of $A$) from which signals can be reconstructed. If $x$ is sparse, this means the signal can be approximately reconstructed from a small number of these atoms.

Greedy Algorithms

These algorithms iteratively select the dictionary (measurement matrix) element that best correlates with the current residual, i.e., the difference between the observed vector $b$ and the vector formed by multiplying $A$ and the current estimate of $x$. The residual at any iteration $i$ is defined as $r=b-Ax^{(i)}$.

Orthogonal Matching Pursuit (OMP)

At ech iteration, select the column of $A$ most correlated with the current residual, add it to the support of the solution, an dadjust the current solution to be the least squares solution consistent with the current support.

  1. Initialize $r=b,S=[]$ (support)
  2. Iterate until the correlated with the current residual, add it to the support of the solution, an dadjust the current solution to be the least squares solution consistent with the current support.
  3. Iterate until a stopping condition is met:
    • $i=\text{argmax}_j|<r,A_j>|$
    • $S=S\cup {i}$
    • $x_S=\text{argmin}_x|b-A_Sx|_2$
    • $r=b-A_Sx_S$

cusprec's People

Contributors

camille-004 avatar

Watchers

 avatar

Forkers

mfkiwl

cusprec's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.