In [1]:
from __future__ import division
import numpy as np
from locore import AnalysisSparse
In [2]:
n = 10
q = 7
D = np.eye(n)
Phi = np.random.randn(q,n)
sp = AnalysisSparse(D, Phi)
In [3]:
x = zeros((n,1))
x[1] = 1
x[5] = 1
In [4]:
sp.tangent_model(x)
Out[4]:
In [5]:
sp.ic(x)
Out[5]:
In [6]:
plt.plot(sp.linearized_precertificate(x))
Out[6]:
In [7]:
sigma = 0.05
y = np.dot(Phi, x) + sigma * np.random.randn(q,1)
plot(y)
Out[7]:
In [8]:
sp.solve_l2(1.5 * sigma, y)
Out[8]:
In [9]:
sp.solve_noiseless(y)
Out[9]: