Skip to main content

Module compressed_sensing

Module compressed_sensing 

Source
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§

BasisPursuit
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.
MriCompressedSensing
Compressed sensing reconstruction for MRI-like k-space data.
OrthogonalMatchingPursuit
Orthogonal Matching Pursuit (OMP) for sparse signal recovery.
RandomMeasurementMatrix
A random Gaussian measurement matrix for compressed sensing.
RecoveryGuarantee
Theoretical guarantees for exact sparse recovery.
SparseSignal
Utility for generating and manipulating synthetic sparse signals.
SparsityMetrics
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 a via power iteration.