Commit 0136b3a9 authored by Marina Kreme's avatar Marina Kreme
Browse files

doc

parent eec4f201
Pipeline #5947 passed with stage
in 5 minutes and 18 seconds
......@@ -9,8 +9,8 @@ function [t_arrf,t_evdn, t_ut_x, rank_q, s_vec_list, u_mat_list,...,
%
% Inputs:
% - x_mix: mixtures of signals with wideband and localized spectrograms
% -mask_list: list of mask
% -gabmul_list: list of Gabor multiplier associated to each mask
% -mask_list: cell of time -frequency mask
% -gabmul_list: cell of Gabor multiplier associated to each mask
% - tolerance_arrf: tolearance. see [1]
% - proba_arrf: probability of success. see[1]
% Outputs:
......@@ -34,11 +34,9 @@ function [t_arrf,t_evdn, t_ut_x, rank_q, s_vec_list, u_mat_list,...,
sig_len = length(x_mix);
n_areas = length(mask_list);
r = compute_r(sig_len, sig_len, proba_arrf);
%%
t_arrf = zeros(n_areas,1);
......
......@@ -8,8 +8,8 @@ function [t_rrf,t_evdn, t_ut_x, s_vec_list, u_mat_list,...,
%
% Inputs:
% - x_mix: mixtures of signals with wideband and localized spectrograms
% -mask_list: list of mask
% -gabmul_list: list of Gabor multiplier associated to each mask
% -mask_list: cell of time-frequency mask
% -gabmul_list: cell of Gabor multiplier associated to each mask
% - rank : matrix rank see [1]
% Outputs:
% -t_rrf: time for randomized range finder(rrf)
......
......@@ -35,7 +35,7 @@ end
x = x_mix;
for k= 1:n_areas
gamma_vec = lambda_coef(k)*s_vec_list{k}./(1-(1-lambda_coef(k))*s_vec_list{k});
gamma_vec = lambda_coef(k)*s_vec_list{k}./(1-(1-lambda_coef(k)).*s_vec_list{k});
x =x-u_mat_list{k}*(gamma_vec.*ut_x_list{k});
end
......
......@@ -2,9 +2,11 @@ function [lambda_est, t_est] = compute_lambda(x_mix, mask, dgt_params,...,
signal_params, dgt, s_vec_list, u_mat_list, ut_x_list,...,
gabmul_list, fig_dir, e_target)
%% [lambda_est, t_est] = compute_lambda(x_mix, mask, dgt_params, signal_params, dgt, s_vec_list, u_mat_list, ut_x_list,gabmul_list, fig_dir, e_target)
% This function calculates lambda in algorithmes proposed in [1]
%% [lambda_est, t_est] = compute_lambda(x_mix, mask, dgt_params,...,
% signal_params, dgt, s_vec_list, u_mat_list, ut_x_list,...,
% gabmul_list, fig_dir, e_target)
% This function estimates the hyperparameters $\lambda$ from target energy
% in each sub-region as we proposed in [1].
%
% Inputs:
% -x_mix:mixtures of signals with wideband and localized spectrograms
......
......@@ -2,6 +2,10 @@ function [lambda_oracle, t_oracle] = compute_lambda_oracle_sdr(n_areas, x_wb, x_
%% [lambda_oracle, t_oracle] = compute_lambda_oracle_sdr(n_areas,x_wb, x_rec)
% Function that calculates the estimated lambda using the true energy. see[1]
% Compute oracle value for hyperparameter $\lambda_k$ from true solution.
%
% If only one region is considered, *fmincon* is used.
% If multiple sub-regions are considered *fminbnd* is used
%
% Inputs:
% - n_areas: number of regions in mask
......
function estimated_energy = estimate_energy_in_mask(x_mix, mask, dgt_params, signal_params, dgt,fig_dir)
%%estimated_energy = estimate_energy_in_mask(x_mix, mask, dgt_params, signal_params, dgt,fig_dir)
% Functions that estimates energy in the mask
% Functions that estimates energy in time-frequency mask
%
% Inputs:
% - x_mix:mixtures of signals with wideband and localized spectrograms
......@@ -11,7 +11,7 @@ function estimated_energy = estimate_energy_in_mask(x_mix, mask, dgt_params, sig
% - dgt: Gabor transform operator
% - fig_dir: firgures directory
% Outputs:
% -estimated_energy:estimated energy
% -estimated_energy: Estimated energy in each sub-region.
%
%
% Author: Marina KREME
......@@ -54,7 +54,7 @@ figure;
plotdgtreal(sqrt(e_mat), dgt_params.hop, dgt_params.nbins, fs, 'clim', clim);
%title(['Mask filled with average energy (total: ', num2str(estimated_energy,8),')']);
set(gca, 'FontSize', 20, 'fontName','Times');
saveas(gcf,fullfile(fig_dir, 'filled_mask.pdf'));
saveas(gcf,fullfile(fig_dir, 'mask_filled__with_energy.pdf'));
%
......@@ -64,7 +64,7 @@ figure;
plotdgtreal(x_tf_mat, dgt_params.hop, dgt_params.nbins, fs, 'clim', clim);
%title(['Mix filled with average energy (total: ', num2str(estimated_energy,8),')']);
set(gca, 'FontSize', 20, 'fontName','Times');
saveas(gcf,fullfile(fig_dir, 'filled_mask.pdf'));
saveas(gcf,fullfile(fig_dir, 'filled_mix_with_average_energy.pdf'));
%
......@@ -75,7 +75,7 @@ ylabel('Average energy')
grid on;
title('Average energy per frequency bin in mix');
set(gca, 'FontSize', 20, 'fontName','Times');
saveas(gcf,fullfile(fig_dir, 'average_energy.pdf'));
saveas(gcf,fullfile(fig_dir, 'average_energy_per_freq_bin.pdf'));
%%
......@@ -89,7 +89,7 @@ title('Average energy per frequency bin in mix')
legend('Before filling', 'After filling')
grid on;
set(gca, 'FontSize', 20, 'fontName','Times');
saveas(gcf,fullfile(fig_dir, 'average_energy_check.pdf'));
saveas(gcf,fullfile(fig_dir, 'average_energy_per_freq_bin_mix.pdf'));
end
function f_lambda = obj_fun(lambda_coef, x_mix, s_vec_list, ...,
u_mat_list, ut_x_list, mask, gab_mul, dgt, e_target)
%% 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
%% 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
% proppsed in [1]
%
%
% Inputs:
% -lambda_coef: hyperparameters
% - x_mix: mixtures of signals with wideband and localized spectrograms
......@@ -15,16 +17,16 @@ function f_lambda = obj_fun(lambda_coef, x_mix, s_vec_list, ...,
% - gab_mul:Gabor multiplier
% - dgt: Gabor transform operator
% - e_target: estimated energy in Omega region
%
%
% Output:
% - f_lambda: objective function
%
%
%
%
%
%
% Reference:
% [1]Time-frequency fading algorithms based on Gabor multipliers,2020.
%
%
%
%
% Author: Marina KREME
%%
x =compute_estimate(lambda_coef, x_mix, s_vec_list, u_mat_list, ut_x_list);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment