Skip to content
Snippets Groups Projects
Commit 0136b3a9 authored by Marina Kreme's avatar Marina Kreme
Browse files

doc

parent eec4f201
No related branches found
No related tags found
No related merge requests found
Pipeline #5947 passed
...@@ -9,8 +9,8 @@ function [t_arrf,t_evdn, t_ut_x, rank_q, s_vec_list, u_mat_list,..., ...@@ -9,8 +9,8 @@ function [t_arrf,t_evdn, t_ut_x, rank_q, s_vec_list, u_mat_list,...,
% %
% Inputs: % Inputs:
% - x_mix: mixtures of signals with wideband and localized spectrograms % - x_mix: mixtures of signals with wideband and localized spectrograms
% -mask_list: list of mask % -mask_list: cell of time -frequency mask
% -gabmul_list: list of Gabor multiplier associated to each mask % -gabmul_list: cell of Gabor multiplier associated to each mask
% - tolerance_arrf: tolearance. see [1] % - tolerance_arrf: tolearance. see [1]
% - proba_arrf: probability of success. see[1] % - proba_arrf: probability of success. see[1]
% Outputs: % Outputs:
...@@ -34,11 +34,9 @@ function [t_arrf,t_evdn, t_ut_x, rank_q, s_vec_list, u_mat_list,..., ...@@ -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); sig_len = length(x_mix);
n_areas = length(mask_list); n_areas = length(mask_list);
r = compute_r(sig_len, sig_len, proba_arrf); r = compute_r(sig_len, sig_len, proba_arrf);
%% %%
t_arrf = zeros(n_areas,1); t_arrf = zeros(n_areas,1);
......
...@@ -8,8 +8,8 @@ function [t_rrf,t_evdn, t_ut_x, s_vec_list, u_mat_list,..., ...@@ -8,8 +8,8 @@ function [t_rrf,t_evdn, t_ut_x, s_vec_list, u_mat_list,...,
% %
% Inputs: % Inputs:
% - x_mix: mixtures of signals with wideband and localized spectrograms % - x_mix: mixtures of signals with wideband and localized spectrograms
% -mask_list: list of mask % -mask_list: cell of time-frequency mask
% -gabmul_list: list of Gabor multiplier associated to each mask % -gabmul_list: cell of Gabor multiplier associated to each mask
% - rank : matrix rank see [1] % - rank : matrix rank see [1]
% Outputs: % Outputs:
% -t_rrf: time for randomized range finder(rrf) % -t_rrf: time for randomized range finder(rrf)
......
...@@ -35,7 +35,7 @@ end ...@@ -35,7 +35,7 @@ end
x = x_mix; x = x_mix;
for k= 1:n_areas 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}); x =x-u_mat_list{k}*(gamma_vec.*ut_x_list{k});
end end
......
...@@ -2,9 +2,11 @@ function [lambda_est, t_est] = compute_lambda(x_mix, mask, dgt_params,..., ...@@ -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,..., signal_params, dgt, s_vec_list, u_mat_list, ut_x_list,...,
gabmul_list, fig_dir, e_target) 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) %% [lambda_est, t_est] = compute_lambda(x_mix, mask, dgt_params,...,
% signal_params, dgt, s_vec_list, u_mat_list, ut_x_list,...,
% This function calculates lambda in algorithmes proposed in [1] % 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: % Inputs:
% -x_mix:mixtures of signals with wideband and localized spectrograms % -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_ ...@@ -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) %% [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] % 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: % Inputs:
% - n_areas: number of regions in mask % - n_areas: number of regions in mask
......
function estimated_energy = estimate_energy_in_mask(x_mix, mask, dgt_params, signal_params, dgt,fig_dir) 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) %%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: % Inputs:
% - x_mix:mixtures of signals with wideband and localized spectrograms % - 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 ...@@ -11,7 +11,7 @@ function estimated_energy = estimate_energy_in_mask(x_mix, mask, dgt_params, sig
% - dgt: Gabor transform operator % - dgt: Gabor transform operator
% - fig_dir: firgures directory % - fig_dir: firgures directory
% Outputs: % Outputs:
% -estimated_energy:estimated energy % -estimated_energy: Estimated energy in each sub-region.
% %
% %
% Author: Marina KREME % Author: Marina KREME
...@@ -54,7 +54,7 @@ figure; ...@@ -54,7 +54,7 @@ figure;
plotdgtreal(sqrt(e_mat), dgt_params.hop, dgt_params.nbins, fs, 'clim', clim); plotdgtreal(sqrt(e_mat), dgt_params.hop, dgt_params.nbins, fs, 'clim', clim);
%title(['Mask filled with average energy (total: ', num2str(estimated_energy,8),')']); %title(['Mask filled with average energy (total: ', num2str(estimated_energy,8),')']);
set(gca, 'FontSize', 20, 'fontName','Times'); 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; ...@@ -64,7 +64,7 @@ figure;
plotdgtreal(x_tf_mat, dgt_params.hop, dgt_params.nbins, fs, 'clim', clim); plotdgtreal(x_tf_mat, dgt_params.hop, dgt_params.nbins, fs, 'clim', clim);
%title(['Mix filled with average energy (total: ', num2str(estimated_energy,8),')']); %title(['Mix filled with average energy (total: ', num2str(estimated_energy,8),')']);
set(gca, 'FontSize', 20, 'fontName','Times'); 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') ...@@ -75,7 +75,7 @@ ylabel('Average energy')
grid on; grid on;
title('Average energy per frequency bin in mix'); title('Average energy per frequency bin in mix');
set(gca, 'FontSize', 20, 'fontName','Times'); 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') ...@@ -89,7 +89,7 @@ title('Average energy per frequency bin in mix')
legend('Before filling', 'After filling') legend('Before filling', 'After filling')
grid on; grid on;
set(gca, 'FontSize', 20, 'fontName','Times'); 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 end
function f_lambda = obj_fun(lambda_coef, x_mix, s_vec_list, ..., function f_lambda = obj_fun(lambda_coef, x_mix, s_vec_list, ...,
u_mat_list, ut_x_list, mask, gab_mul, dgt, e_target) 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) %% 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 % Objecitve function for finding optimal lambda value in algorithms
% proppsed in [1] % proppsed in [1]
% %
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment