Update wide vs narrow code
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
function [LASSO_lambda, recovery_results] = get_lambda(A, x, FAR_N, FAR_M, sigma, lambdas)
|
||||
|
||||
noise = get_noise(sigma, FAR_N, 1);
|
||||
y = A * x;
|
||||
y_noise = y + noise;
|
||||
|
||||
tau = 1e-6;
|
||||
iter_max = 1000;
|
||||
|
||||
recovery_results = zeros(length(lambdas), 1);
|
||||
for lambda_idx = 1: length(lambdas)
|
||||
LASSO_lambda = lambdas(lambda_idx);
|
||||
[x_LASSO, x_hat_d] = cVAMPro(y_noise, A, LASSO_lambda, tau, iter_max);
|
||||
recovery_results(lambda_idx) = sum(real(x_LASSO(FAR_M + 1: 2 * FAR_M)));
|
||||
% if abs(recovery_results(lambda_idx) - FAR_M) / FAR_M < 0.01
|
||||
% return
|
||||
% end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user