-
Notifications
You must be signed in to change notification settings - Fork 0
/
distatis_demo.m
43 lines (40 loc) · 1.37 KB
/
distatis_demo.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
%% Data
matA(:,:,1) = [0 0.112 0.148 0.083 0.186 0.11
0.112 0 0.152 0.098 0.158 0.134
0.146 0.152 0 0.202 0.285 0.249
0.083 0.098 0.202 0 0.131 0.11
0.186 0.158 0.285 0.131 0 0.155
0.11 0.134 0.249 0.11 0.155 0];
matA(:,:,2) = [0 0.6 1.98 0.42 0.14 0.58
0.6 0 2.1 0.78 0.42 1.34
1.98 2.1 0 2.02 1.72 2.06
0.42 0.78 2.02 0 0.5 0.88
0.14 0.42 1.72 0.5 0 0.3
0.58 1.34 2.06 0.88 0.3 0];
matA(:,:,3) = [0 0.54 1.39 5.78 10.28 6.77
0.54 0 1.06 3.8 6.83 4.71
1.39 1.06 0 8.01 11.03 5.72
5.78 3.8 8.01 0 2.58 6.09
10.28 6.83 11.03 2.58 0 3.53
6.77 4.71 5.72 6.09 3.53 0];
matA(:,:,4) = [0 0.014 0.159 0.004 0.001 0.002
0.014 0 0.018 0.053 0.024 0.004
0.159 0.018 0 0.271 0.067 0.053
0.004 0.053 0.271 0 0.001 0.008
0.001 0.024 0.067 0.001 0 0.007
0.002 0.004 0.053 0.008 0.007 0];
% row = object; col = assessor
sortData = [1 4 3 4 1 1 2 2 1 3
4 5 2 5 2 3 1 1 4 3
3 1 2 3 2 4 3 1 1 2
4 2 3 3 1 1 1 2 1 4
1 5 3 5 2 1 1 2 1 3
2 3 1 1 3 5 4 4 3 1
1 4 3 4 1 1 2 2 2 4
5 2 4 2 4 2 5 3 4 5];
distData = distatis_s2d(sortData);
%% DISTATIS
[eigval,eigvector,fscore] = distatis(matA);
[eigval,eigvector,fscore] = distatis(distData);
% Plot options
[eigval,eigvector,fscore] = distatis(matA,3,[1 1 2 2], [1 0 0; 0 1 0], 'x.',[3 10],{'pixels','measures','ratings','pairwise'},[1 1 1 2 2 2],'br','x.',[8 4],{'M1','M2','M3','F1','F2','F3'});