-
Notifications
You must be signed in to change notification settings - Fork 0
/
e_26_07.m
22 lines (18 loc) · 927 Bytes
/
e_26_07.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pdf_gmm = zeros(length(trained_hmm), length(xmesh));
for i=1:length(trained_hmm)
pdf_gmm(i, :) = gmmprob( trained_hmm{i}.mix, xmesh' )';
end
figure;
L = linkage( pdist(pdf_gmm, @(Xi, Xj)Hskld(Xi, Xj)), 'weighted' );
dendrogram(L, length(id_folders), 'Labels', id_folders, 'Orientation', 'right', 'ColorThreshold', 0.3*max(L(:, 3)));
title('Phylloacoustic tree using KDE+SKLD');
figure;
L = linkage( pdist(pdf_gmm, @(Xi, Xj)Hhellinger(Xi, Xj)), 'weighted' );
dendrogram(L, length(id_folders), 'Labels', id_folders, 'Orientation', 'right', 'ColorThreshold', 0.45*max(L(:, 3)));
title('Phylloacoustic tree using KDE+Hellinger distance');
figure;
plot( L(:, 3), (n_species-1):-1:1)
L2 = linkage(squareform(randn(1, n_species * (n_species - 1)/2)), 'average');
figure;
plot( L2(:, 3), (n_species-1):-1:1 )
dendrogram(L2, length(id_folders), 'Labels', id_folders, 'Orientation', 'right', 'ColorThreshold', 0.45*max(L(:, 3)));