-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtestHouse.m
68 lines (57 loc) · 2.11 KB
/
testHouse.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
% Testing the performance of different graph matching methods on the CMU House dataset.
% This is the same function used for reporting (Fig. 4) the first experiment (Sec 5.1) in the CVPR 2013 paper.
%
% History
% create - Feng Zhou ([email protected]), 09-01-2011
% modify - Feng Zhou ([email protected]), 05-08-2013
clear variables;
prSet(3);
%% save flag
svL = 1; % change svL = 1 if you want to re-run the experiments.
%% algorithm parameter
tagAlg = 2;
[~, algs] = gmPar(tagAlg);
%% run 1 (perfect graphs, no noise)
tagSrc = 1;
[~, val1s] = cmumAsgPair(tagSrc);
wsRun1 = cmumAsgRun(tagSrc, tagAlg, 'svL', svL);
[Me1, Dev1, ObjMe1, ObjDev1] = stFld(wsRun1, 'Me', 'Dev', 'ObjMe', 'ObjDev');
%% run 2 (randomly remove nodes)
tagSrc = 2;
[~, val2s] = cmumAsgPair(tagSrc);
wsRun2 = cmumAsgRun(tagSrc, tagAlg, 'svL', svL);
[Me2, Dev2, ObjMe2, ObjDev2] = stFld(wsRun2, 'Me', 'Dev', 'ObjMe', 'ObjDev');
%% show accuracy & objective
rows = 1; cols = 5;
Ax = iniAx(1, rows, cols, [250 * rows, 250 * cols]);
shCur(Me1, Dev1, 'ax', Ax{1}, 'dev', 'y');
xticks = 1 : 3 : size(Me1, 2);
setAxTick('x', '%d', xticks, val1s(xticks));
set(gca, 'ylim', [.27 1.05], 'ytick', .2 : .2 : 1, 'xlim', [.5, size(Me1, 2) + .5]);
axis square;
xlabel('baseline');
ylabel('accuracy');
shCur(ObjMe1, ObjDev1, 'ax', Ax{2}, 'dev', 'y');
xticks = 1 : 3 : size(ObjMe1, 2);
setAxTick('x', '%d', xticks, val1s(xticks));
set(gca, 'ylim', [.3 1.05], 'ytick', .2 : .2 : 1, 'xlim', [.5, size(Me1, 2) + .5]);
axis square;
xlabel('baseline');
ylabel('objective');
shCur(Me2, Dev2, 'ax', Ax{3}, 'dev', 'y');
xticks = 1 : 3 : size(Me2, 2);
setAxTick('x', '%d', xticks, val1s(xticks));
set(gca, 'ylim', [.27 1.05], 'ytick', .2 : .2 : 1, 'xlim', [.5, size(Me1, 2) + .5]);
axis square;
xlabel('baseline');
ylabel('accuracy');
shCur(ObjMe2, ObjDev2, 'ax', Ax{4}, 'dev', 'y');
xticks = 1 : 3 : size(ObjMe1, 2);
setAxTick('x', '%d', xticks, val1s(xticks));
set(gca, 'ylim', [.3 1.05], 'ytick', .2 : .2 : 1, 'xlim', [.5, size(Me1, 2) + .5]);
axis square;
xlabel('baseline');
ylabel('objective');
shCur(Me1, Dev1, 'ax', Ax{5}, 'dev', 'n', 'algs', algs);
set(Ax{5}, 'visible', 'off');
cla;