cr.sparse.RecoveryPerformance

class cr.sparse.RecoveryPerformance(Phi, y, x, x_hat=None, sol=None)[source]

Performance of a sparse signal recovery operation

  • Synthesis \(y = \Phi x + e\)

  • Recovery: \(y = \Phi \hat{x} + r\)

  • Representation error: \(h = x - \hat{x}\)

  • Residual: \(y - \Phi \hat{x}\)

__init__(Phi, y, x, x_hat=None, sol=None)[source]

Computes all parameters related to the quality of reconstruction

Methods

__init__(Phi, y, x[, x_hat, sol])

Computes all parameters related to the quality of reconstruction

print([details])

Prints metrics related to reconstruction quality

Attributes

K

Number of non-zero entries in \(x\)

M

Signal/Measurement space dimension, number of rows in \(\Phi\)

N

Representation space dimension, number of atoms/columns in \(\Phi\)

R0

Index set of K largest (magnitude) entries in the reconstruction \(\hat{x}\)

T0

The index set of K non-zero coefficients in \(x\)

h

Recovery/reconstruction error \(h = x - \hat{x}\)

h_norm

Norm of reconstruction error \(h\)

measurement_snr

Measurement SNR (dB) in measurement/signal space \(20 \log (\| y \|_2 / \| r \|_2)\)

num_correct_atoms

Number of entries in the overlap, i.e. number of indices of the support correctly recovered.

overlap

Indices overlapping between T0 and R0 \(T_0 \cap R_0\)

perfect_support_recovery

Returns if the support has been recovered perfectly

r

The residual \(r = y - \Phi \hat{x}\)

r_norm

Norm of the residual

recovery_snr

Reconstruction/recovery SNR (dB) in representation space \(20 \log (\| x \|_2 / \| h \|_2)\)

success

Returns True if more than 75% indices are correctly identified and recovery SNR is high (> 30 dB)

support_recovery_ratio

Returns the ratio of correctly recovered atoms

x_dr

Dynamic range of x

x_hat_dr

Dynamic range of x_hat

x_hat_norm

norm of the reconstruction \(\hat{x}\)

x_norm

norm of representation \(x\)

y_dr

Dynamic range of y

y_norm

norm of measurement/signal \(y\)