Update FAR vs PD

This commit is contained in:
Ksyer
2024-07-16 15:56:53 +08:00
parent 9556bdf832
commit 5ac5ef1787
4 changed files with 133 additions and 39 deletions
+9 -1
View File
@@ -25,6 +25,14 @@ function x_hat = recovery(A, y_noise)
x_d_CROD = x_LASSO + A'*(y_noise - A*x_LASSO)/Q_hat;
x_hat = x_d_CROD;
RSS = 1/sz(2) * norm(y_noise - A * x_LASSO, 2)^2;
noise_sigma_2 = 1e-4;
P_fa = normcdf(1, 0, 1);
sigma_w_2 = (gamma * (1-gamma)) / ((gamma - Rho)^2) * RSS + noise_sigma_2;
k_d = -sigma_w_2 * log(P_fa);
fprintf("%f %f %f\n", gamma, sigma_w_2, k_d);
elseif method == "LASSO"
sz = size(A);
N = sz(2);
@@ -47,7 +55,7 @@ function x_hat = recovery(A, y_noise)
cvx_end
else
global lambda tau iter_max;
[x_hat, z_hat_d] = cVAMPro(y_noise, A, lambda, tau, iter_max);
[x_hat, x_hat_d] = cVAMPro(y_noise, A, lambda, tau, iter_max);
end
end