Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
skmad-suite
tff2020
Commits
0136b3a9
Commit
0136b3a9
authored
Nov 22, 2020
by
Marina Kreme
Browse files
doc
parent
eec4f201
Pipeline
#5947
passed with stage
in 5 minutes and 18 seconds
Changes
7
Pipelines
1
Show whitespace changes
Inline
Side-by-side
matlab/tfgm/tf_fading/compute_decomposition.m
View file @
0136b3a9
...
@@ -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
);
...
...
matlab/tfgm/tf_fading/compute_decomposition_fixed_rank.m
View file @
0136b3a9
...
@@ -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)
...
...
matlab/tfgm/tf_fading/compute_estimate.m
View file @
0136b3a9
...
@@ -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
...
...
matlab/tfgm/tf_fading/compute_lambda.m
View file @
0136b3a9
...
@@ -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
...
...
matlab/tfgm/tf_fading/compute_lambda_oracle_sdr.m
View file @
0136b3a9
...
@@ -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
...
...
matlab/tfgm/tf_fading/estimate_energy_in_mask.m
View file @
0136b3a9
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 t
he
mask
% Functions that estimates energy in t
ime-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:
e
stimated
energy
% -estimated_energy:
E
stimated 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_m
ask
.pdf'
));
saveas
(
gcf
,
fullfile
(
fig_dir
,
'filled_m
ix_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
matlab/tfgm/tf_fading/obj_fun.m
View file @
0136b3a9
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]
%
%
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment