Expand description
Compressed sensing and sparse signal recovery algorithms.
Provides Discrete Cosine Transform (DCT) bases, random measurement matrices, Basis Pursuit (ISTA/LASSO/FISTA), Orthogonal Matching Pursuit (OMP), sparsity metrics, dictionary learning (K-SVD), sparse coding, FISTA, restricted isometry property (RIP) analysis, Bernoulli measurement matrices, MRI-like signal reconstruction, and theoretical recovery guarantees for compressed sensing problems.
§Overview
Compressed sensing (CS) exploits the sparsity of natural signals to allow faithful reconstruction from far fewer measurements than the Nyquist rate. The key ingredients are:
- A sparsifying basis (DCT, Wavelet, etc.) in which the signal has few non-zero coefficients.
- A measurement matrix (random Gaussian or Bernoulli) that is incoherent with the sparsifying basis.
- A recovery algorithm (Basis Pursuit / ISTA / FISTA / OMP) that finds the sparsest signal consistent with the measurements.
The BasisPursuit struct implements ISTA (slow) and FISTA (fast, with
Nesterov momentum) for L1-regularised least-squares (LASSO) recovery.
OrthogonalMatchingPursuit provides a greedy alternative.
KSvd implements the K-SVD dictionary learning algorithm.
Structs§
- Basis
Pursuit - Basis Pursuit via iterative shrinkage-thresholding (ISTA and FISTA).
- DctBasis
- Discrete Cosine Transform (DCT-II) basis for sparse representation.
- KSvd
- K-SVD dictionary learning algorithm.
- MriCompressed
Sensing - Compressed sensing reconstruction for MRI-like k-space data.
- Orthogonal
Matching Pursuit - Orthogonal Matching Pursuit (OMP) for sparse signal recovery.
- Random
Measurement Matrix - A random Gaussian measurement matrix for compressed sensing.
- Recovery
Guarantee - Theoretical guarantees for exact sparse recovery.
- Sparse
Signal - Utility for generating and manipulating synthetic sparse signals.
- Sparsity
Metrics - Metrics for quantifying signal sparsity and dictionary coherence.
Functions§
- compression_
ratio - Compute the compression ratio
m / n. - l2_norm
- Compute the ℓ₂ norm of a slice.
- mat_
transpose_ vec - Compute the transposed matrix-vector product
y = A^T x. - mat_vec
- Compute the matrix-vector product
y = A x. - normalise
- Normalise a vector to unit ℓ₂ norm in place.
- nyquist_
rate - Compute the Nyquist sampling rate for a band-limited signal.
- soft_
threshold - Apply element-wise soft-thresholding:
sign(x) * max(|x| - lambda, 0). - spectral_
norm - Estimate the spectral norm (largest singular value) of
avia power iteration.