compsense.problems.probCustom

class compsense.problems.probCustom(A, b, x0=None, name='custom')[source]

This class allows the user to define his own problem object based on the problem matrices.

Examples

>>> m, n = (20, 40)
>>> sigma = 0.001
>>> A = np.random.randn(m, n)
>>> x = np.random.randn(n, 1)
>>> x[np.abs(x)<0.5] = 0
>>> b = np.dot(A, x) + sigma * np.random.randn(m, 1)
>>> P = probCustom(A=A, b=b, x0=x)   # Creates a custom problem.
Parameters :

A : array or instance of problemBase subclass,

Standard deviation of the additive noise.

b : array like,

Measurments array

x0 : array like, optional (default=None)

Input signal

name : string, optional (default=’custom’)

Name of problem.

Attributes

A Response of the problem
B Base matrix
M Sampling matrix
b Observation vector
name Name of the problem
signal Signal (Not in sparsifying basis)
signal_shape Shape of the signal
x0 Solution to problem

Previous topic

compsense.problems.problemBase.reconstruct

Next topic

compsense.problems.prob701

This Page