obj_fun.m 1.14 KB
Newer Older
Marina Kreme's avatar
Marina Kreme committed
1
2
3
function f_lambda = obj_fun(lambda_coef, x_mix, s_vec_list, ...,
    u_mat_list, ut_x_list, mask, gab_mul, dgt, e_target)

Marina Kreme's avatar
doc    
Marina Kreme committed
4
5
6
7
%%  f_lambda = obj_fun(lambda_coef, x_mix, s_vec_list, ...,
%    u_mat_list, ut_x_list, mask, gab_mul, dgt, e_target)
%
% Objecitve function for finding optimal lambda value in algorithms
Marina Kreme's avatar
Marina Kreme committed
8
% proppsed in [1]
Marina Kreme's avatar
doc    
Marina Kreme committed
9
%
Marina Kreme's avatar
Marina Kreme committed
10
11
12
13
14
15
16
17
18
19
% Inputs:
%     -lambda_coef: hyperparameters
%     - x_mix: mixtures of signals with wideband and localized spectrograms
%     - s_vec_list:list of nonnegative and diagonal matrix obtained after diagonalization
%     - u_mat_list: list of orthononmal matrix obtained after diagonalization
%     - ut_x_list: list of each u_mat'*x_mix
%     - mask: mask
%     - gab_mul:Gabor multiplier
%     - dgt: Gabor transform operator
%     - e_target: estimated energy in Omega region
Marina Kreme's avatar
doc    
Marina Kreme committed
20
%
Marina Kreme's avatar
Marina Kreme committed
21
22
% Output:
%     - f_lambda: objective function
Marina Kreme's avatar
doc    
Marina Kreme committed
23
24
25
%
%
%
Marina Kreme's avatar
Marina Kreme committed
26
27
% Reference:
% [1]Time-frequency fading algorithms based on Gabor multipliers,2020.
Marina Kreme's avatar
doc    
Marina Kreme committed
28
29
%
%
Marina Kreme's avatar
Marina Kreme committed
30
31
32
33
34
35
36
37
% Author: Marina KREME
%%
x =compute_estimate(lambda_coef, x_mix, s_vec_list, u_mat_list, ut_x_list);
x_tf_masked = mask.*dgt(gab_mul(x));
e_mask = norm(x_tf_masked, 'fro').^2;
f_lambda = abs(e_target - e_mask);

end