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

useless file deletion

parent cd7f2510
Branches
Tags
No related merge requests found
clc; clear; close all;
%%
pwd;
pathname ='figures_JSTSP';
if ~exist('figures_JSTSP','dir')
mkdir('figures_JSTSP');
end
addpath('figures_JSTSP')
%%
ind_loc = 5;
ind_wd = 3;
deb_ind_loc = 0;
deb_ind_wd=0;
resampling_fs = 8000;
sig_len = 16384;
%% DGT params - signals - mask
param_gauss = get_win_gauss_param();
win_len = param_gauss.win_len;
win_type = param_gauss.win_type;
alpha = param_gauss.alpha;
seuil = param_gauss.seuil;
radius = param_gauss.radius;
[signals, dgt_params, signal_params, mask, dgt,idgt ] = get_mix(ind_loc, ...,
ind_wd, deb_ind_loc, deb_ind_wd, resampling_fs, sig_len,...,
win_len, win_type, alpha, seuil, radius);
%%
% compute dgt
tf_mat_engine = compute_dgt(signals.target, dgt );
tf_mat_bird = compute_dgt(signals.noise, dgt );
tf_mat_mix = compute_dgt(signals.mix, dgt );
% mix -sdr
sdr_mix = sdr(signals.target, signals.mix);
fprintf('The SDR of the mixture is : %e\n', sdr_mix)
%%
figure('name','engine');
plot_spectrogram(mask,dgt_params, signal_params, dgt);
title('Source')
set(gca, 'FontSize', 20, 'fontName','Times');
%%
%% generate Gabor mutliplier
gab_mul = gen_gabmul_operator(dgt, idgt, mask);
%% evd via halko
% halko parameters
tolerance_arrf = 1e-3;
proba_arrf = 0.9999;
r = compute_r(signal_params.sig_len, signal_params.sig_len, proba_arrf);
% stage 1 Halko
tic;
q_mat = adaptative_randomized_range_finder(gab_mul, signal_params.sig_len, tolerance_arrf, r);
t_arrf = toc;
fprintf('Q shape : %.f %.f\n', size(q_mat));
% stage 2 : Halko
% Evd decomposition via Nystrom
tic;
evdn = EVD_nystrom(gab_mul, q_mat);
t_evdn = toc;
%% evd via eigs
[U, D] = eigs(gab_mul, signal_params.sig_len, size(q_mat,2)) ;
%%
figure; semilogy(diag(D),'r-','LineWidth',2); hold on;
semilogy(diag(evdn.D),'b-o','LineWidth',2);
%% similarit valeurs propres
abs_err = abs(diag(evdn.D)-diag(D))./abs(diag(D));
%%
figure; semilogy(abs_err,'LineWidth',2);
grid on;
set(gca, 'FontSize', 20, 'fontName','Times');
axis square;
xlabel('$k$','Interpreter','latex');
ylabel('Relative absolute error')
saveas(gcf,fullfile(pathname, 'relerror_eigs_sevd_gauss.png'));
saveas(gcf,fullfile(pathname, 'relerror_eigs_sevd_gauss.fig'));
%% Correlations
Gram_mat =abs( evdn.U.*U);
figure; imagesc(Gram_mat)
corr = max(Gram_mat, [], 2);
%%
figure;
semilogy(sort(corr,'descend'),'LineWidth',2);
% grid on;
% axis square;
% xlabel('$k$','Interpreter','latex');
% ylabel('Correlation');
% set(gca, 'FontSize', 20, 'fontName','Times');
% saveas(gcf,fullfile(pathname, 'correlation_eigs_sevd_gauss.png'));
%%
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment