Title: | Compressive Sampling: Sparse Signal Recovery Utilities |
---|---|
Description: | Utilities for sparse signal recovery suitable for compressed sensing. L1, L2 and TV penalties, DFT basis matrix, simple sparse signal generator, mutual cumulative coherence between two matrices and examples, Lp complex norm, scaling back regression coefficients. |
Authors: | Mehmet Suzen [aut, cre] |
Maintainer: | Mehmet Suzen <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.3.4 |
Built: | 2024-10-31 20:32:12 UTC |
Source: | CRAN |
Compare L1, L2 and TV on a sparse signal.
CompareL1_L2_TV1(N, M, per)
CompareL1_L2_TV1(N, M, per)
N |
Size of the sparse signal to generate , integer. |
M |
Number of measurements. |
per |
Percentage of spikes. |
Mehmet Suzen
Generate Discrete Fourier Transform Matrix (NxN).
DFTMatrix0(N)
DFTMatrix0(N)
N |
Integer value determines the dimension of the square matrix. |
It returns a NxN square matrix.
Mehmet Suzen
DFTMatrixPlain
DFTMatrix0(2)
DFTMatrix0(2)
Generate plain Discrete Fourier Transform Matrix (NxN) without a coefficient.
DFTMatrixPlain(N)
DFTMatrixPlain(N)
N |
Integer value defines the dimension of the square plain DFT matrix. |
It returns a NxN square matrix.
Mehmet Suzen
DFTMatrixPlain(2)
DFTMatrixPlain(2)
Generate Gaussian Random Matrix ( zero mean and standard deviation one.)
GaussianMatrix(N, M)
GaussianMatrix(N, M)
N |
Integer value determines number of rows. |
M |
Integer value determines number of columns. |
Returns MxN matrix.
Mehmet Suzen
GaussianMatrix(3,2)
GaussianMatrix(3,2)
L-p norm of a given complex vector
Lnorm(X, p)
Lnorm(X, p)
X |
a complex vector, can be real too. |
p |
norm value |
L-p norm of the complex vector
Mehmet Suzen
Generate vector of cumulative mutual coherence of a given matrix up to a given order. \
Mutual Cumulative Coherence of a Matrix A at order k is defined as
mutualCoherence(A, k)
mutualCoherence(A, k)
A |
A matrix. |
k |
Integer value determines number of columns or the order of mutual coherence function to . |
Returns k-vector
Mehmet Suzen
Compressed sensing in diffuse optical tomography \ M. Suzen, A.Giannoula and T. Durduran, \ Opt. Express 18, 23676-23690 (2010) \ J. A. Tropp \ Greed is good: algorithmic results for sparse approximation, \IEEE Trans. Inf. Theory 50, 2231-2242 (2004)
set.seed(42) B <- matrix(rnorm(100), 10, 10) # Gaussian Random Matrix mutualCoherence(B, 3) # mutual coherence up to order k
set.seed(42) B <- matrix(rnorm(100), 10, 10) # Gaussian Random Matrix mutualCoherence(B, 3) # mutual coherence up to order k
1-D Total Variation Penalized Objective Function
objective1TV(x, T, phi, y, lambda)
objective1TV(x, T, phi, y, lambda)
x |
Initial value of the vector to be recovered. Sparse representation of the vector ( N x 1 matrix ) X=Tx, where X is the original vector |
T |
sparsity bases ( N x N matrix ) |
phi |
Measurement matrix (M x N). |
y |
Measurement vector (Mx1). |
lambda |
Penalty coefficient. |
Returns a vector.
Mehmet Suzen
Objective function for ridge L1 penalty
objectiveL1(x, T, phi, y, lambda)
objectiveL1(x, T, phi, y, lambda)
x |
unknown vector |
T |
transform bases |
phi |
measurement matrix |
y |
measurement vector |
lambda |
penalty term |
Thank you Jason Xu of Washington University for pointing out complex number handling
Mehmet Suzen
Objective function for Tikhinov L2 penalty
objectiveL2(x, T, phi, y, lambda)
objectiveL2(x, T, phi, y, lambda)
x |
unknown vector |
T |
transform bases |
phi |
measurement matrix |
y |
measurement vector |
lambda |
penalty term |
Thank you Jason Xu of Washington University for pointing out complex number handling
Mehmet Suzen
Frequency expression for DFT
oo(p, omega)
oo(p, omega)
p |
Exponent |
omega |
Omega expression for DFT |
Mehmet Suzen
Transform back multiple regression coefficients to unscaled regression coefficients Original question posed by Mark Seeto on the R mailing list.
scaleBack.lm(X, Y, betas.scaled)
scaleBack.lm(X, Y, betas.scaled)
X |
unscaled design matrix without the intercept, m by n matrix |
Y |
unscaled response, m by 1 matrix |
betas.scaled |
coefficients vector of multiple regression, first term is the intercept |
2015-04-10
M.Suzen
set.seed(4242) X <- matrix(rnorm(12), 4, 3) Y <- matrix(rnorm(4), 4, 1) betas.scaled <- matrix(rnorm(3), 3, 1) betas <- scaleBack.lm(X, Y, betas.scaled)
set.seed(4242) X <- matrix(rnorm(12), 4, 3) Y <- matrix(rnorm(4), 4, 1) betas.scaled <- matrix(rnorm(3), 3, 1) betas <- scaleBack.lm(X, Y, betas.scaled)
1-D Total Variation Penalized Nonlinear Minimization
solve1TV(phi,y,T,x0,lambda=0.1)
solve1TV(phi,y,T,x0,lambda=0.1)
x0 |
Initial value of the vector to be recovered. Sparse representation of the vector ( N x 1 matrix ) X=Tx, where X is the original vector |
T |
sparsity bases ( N x N matrix ) |
phi |
Measurement matrix (M x N). |
y |
Measurement vector (Mx1). |
lambda |
Penalty coefficient. Defaults 0.1 |
Returns nlm object.
Mehmet Suzen
l1 Penalized Nonlinear Minimization
solveL1(phi,y,T,x0,lambda=0.1)
solveL1(phi,y,T,x0,lambda=0.1)
x0 |
Initial value of the vector to be recovered. Sparse representation of the vector ( N x 1 matrix ) X=Tx, where X is the original vector |
T |
sparsity bases ( N x N matrix ) |
phi |
Measurement matrix (M x N). |
y |
Measurement vector (Mx1). |
lambda |
Penalty coefficient. Defaults 0.1 |
Returns nlm object.
Mehmet Suzen
l2 Penalized Nonlinear Minimization
solveL2(phi,y,T,x0,lambda=0.1)
solveL2(phi,y,T,x0,lambda=0.1)
x0 |
Initial value of the vector to be recovered. Sparse representation of the vector ( N x 1 matrix ) X=Tx, where X is the original vector |
T |
sparsity bases ( N x N matrix ) |
phi |
Measurement matrix (M x N). |
y |
Measurement vector (Mx1). |
lambda |
Penalty coefficient. Defaults 0.1 |
Returns nlm object.
Mehmet Suzen
Sparse digital signal Generator with given thresholds.
sparseSignal(N, s, b = 1, delta = 1e-07, nlev = 0.05, slev = 0.9)
sparseSignal(N, s, b = 1, delta = 1e-07, nlev = 0.05, slev = 0.9)
N |
Number of signal components, vector size. |
s |
Number of spikes, significatn components |
b |
Signal bandwidth, defaults 1. |
delta |
Length of discrete distances among components, defaults 1e-7. |
nlev |
Maximum value of insignificant component, relative to b, defaults to 0.05 |
slev |
Maximum value of significant component, relative to b, defaults to 0.9 |
Mehmet Suzen
1-D total variation of a vector.
TV1(x)
TV1(x)
x |
A vector. |
Mehmet Suzen