-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathrun_prokaryotic.m
71 lines (55 loc) · 1.66 KB
/
run_prokaryotic.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
%
% Run MLRSSC on Prokaryotic dataset. Parameters are optimized over NMI
% measure.
%
%-------------------------------------------------------
clear;
addpath(genpath(cd))
load prokaryotic
X{1} = text;
X{2} = proteome_comp;
X{3} = gene_repert;
k = max(truth); % number of clusters
num_views = 3;
num_iter = 100;
%% Linear kernel multi-view LRSSC
fprintf('\nPairwise multiview LRSSC\n');
opts.mu = 10^3;
lambda1 = 0.7;
lambda3 = 0.7;
opts.lambda = [lambda1 (1-lambda1) lambda3];
opts.noisy = true;
A = pairwise_MLRSSC(X, opts); % joint affinity matrix
[best.CA best.F best.P best.R best.nmi best.AR] = spectral_clustering(A, k, truth);
best
fprintf('\nCentroid multiview LRSSC\n');
opts.mu = 10^2;
lambda1 = 0.9;
lambda3 = 0.7;
opts.lambda = [lambda1 (1-lambda1) lambda3];
A = centroid_MLRSSC(X, opts); % joint affinity matrix
[best.CA best.F best.P best.R best.nmi best.AR] = spectral_clustering(A, k, truth);
best
%% Gaussian kernel multi-view LRSSC
opts.kernel = 'Gaussian';
opts.err_thr = 10^(-5);
for v=1:num_views
sigma(v) = opt_sigma(X{v});
end
opts.sigma = [10*sigma(1) 5*sigma(2) 1*sigma(3)];
fprintf('\nKernel pairwise multiview LRSSC\n');
opts.mu = 10^4;
lambda1 = 0.3;
lambda3 = 0.5;
opts.lambda = [lambda1 (1-lambda1) lambda3];
A = pairwise_MLRSSC(X, opts); % joint affinity matrix
[best.CA best.F best.P best.R best.nmi best.AR] = spectral_clustering(A, k, truth);
best
fprintf('\nKernel centroid multiview LRSSC\n');
opts.mu = 10^4;
lambda1 = 0.3;
lambda3 = 0.5;
opts.lambda = [lambda1 (1-lambda1) lambda3];
A = centroid_MLRSSC(X, opts); % joint affinity matrix
[best.CA best.F best.P best.R best.nmi best.AR] = spectral_clustering(A, k, truth);
best