min_{a*x=y} +lambda*norm(\hat{a},1)
is the objective function where a
is the vector of coefficients, y
denotes the noisy measurements and x
is the unobserved input signal. I am aware of lasso()
function but I don't prefer to use the inbuilt function since this will not help me to understand the steps.
Can somebody help in implementing the l1
norm optimization?
Mathematically, my model is expressed as a moving average (MA) system: y[k] = a_1*x[k] + a_2*x[k-1] + a_{10}*x[k-9] + n[k]
where n ~ N(0,\sigma^2)
is Additive White Gaussian Noise and x
is a zero mean Gaussian white process of unity variance and a_1,a_2,...,a_10
are the coefficients of the MA model which are known to be sparse. However, I don't know the position of the sparse coefficients.
In this model only 3 coefficients are non-zero whereas the rest are all zero or close to zero. One approach of doing parameter estimation is to construct an inverse filter or also known as the minimizing the prediction error.
By inverse filtering approach, I can create an inverse filter for the MA model which is expressed by: u[k] = x[k]-(\hat{a_2}*x[k-1]+ \hat{a_3}*x[k-3] + \hat{a_{4}}*x[k-4] +\ldots+\hat{a_{10}}*x[k-9] )
.
Therefore, the objective function becomes: J = min_{\hat{a}*x=y} +lambda*norm(\hat{a},1)
wherey
is the observed noisy measurements and \hat{a}*x
is the clean. Let \mathbf{\hat{a}} = {[\hat{a_1},\ldots,\hat{a_{10}}]}^T
represent the estimated coefficient vector.
My approach is to split the objective function J
into 2 parts--the first part being the OLS estimate which is fed into an l1
minimization routine. The output of the l1
minimization gives the sparse coefficients. Is the approach legitimate? If so, I need help on what is the l1
optimizer in Matlab?
The following is the code snippet where I have created the model. But I don't know how to solve the objective function. Please help.
%Generate input
N=500;
x=(randn(1,N)*100);
L = 10;
Num_lags = 1:L-1;
a = 1+randn(L,1);
%Data preparation into regressors
a(rand(L,1)<.9)=0; % 90 of the coefficients are zero
X1 = lagmatrix(x, [0 Num_lags]);