Bill,
thanks for compiling the snippets of code from various contributors and
for starting this topic.
Bill Harris wrote:
Now you can compare
(%+/) power cpm NB. and
(%+/) power errt_auto cpm NB. (not much difference)
I myself am not quite sure how to interpret these differences - both
power and errt_auto seem to work fine. I think it is just a consequence
of initial inconsistent judgements.
It is mildly illuminating to run
errt errt_auto cpm
Yes, it shows that with a complete matrix the preferences can be
corrected in just one iteration.
Here's the code (I really should have put it under revision control and
made it look nicer, but I hope it and its comments are readable)
In my opinion the code is readable.
maci_precomputed =: 1000 maci"0 (3+i.8) NB. Tarmo claims it's exactly 0.5245
for 3
This claim of mine started to nag me and I decided to recheck it.
downup =: 13 : 'y. * |: % y.'
matrices =: 13 : 'downup (x. , x.) $( ( ( (#I.,>/~i.x.) #
#saaty_scale) #: y.) { saaty_scale) (I. , >/~ i. x.) } (*:x.) $ 1'
+result3 =: am ci"2 (3 matrices"0 (i. (#saaty_scale) ^3))
0.524457
So my claim was a bit off.
I also generated all random matrices for 4x4 with a somewhat primitive
approach, each line took about 30 minutes to run in the background:
+result =: am cis =: ci"2 (4 matrices"0 (i. (#saaty_scale) ^5))
1.03721
+result =: am cis =: ci"2 (4 matrices"0 ( (1*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
1.00067
+result =: am cis =: ci"2 (4 matrices"0 ( (2*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
0.962258
+result =: am cis =: ci"2 (4 matrices"0 ( (3*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
0.921762
+result =: am cis =: ci"2 (4 matrices"0 ( (4*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
0.878965
+result =: am cis =: ci"2 (4 matrices"0 ( (5*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
0.833757
+result =: am cis =: ci"2 (4 matrices"0 ( (6*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
0.786489
+result =: am cis =: ci"2 (4 matrices"0 ( (7*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
0.739607
+result =: am cis =: ci"2 (4 matrices"0 ( (8*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
0.709249
+result =: am cis =: ci"2 (4 matrices"0 ( (9*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
0.739607
+result =: am cis =: ci"2 (4 matrices"0 ( (10*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
0.786489
+result =: am cis =: ci"2 (4 matrices"0 ( (11*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
0.833757
+result =: am cis =: ci"2 (4 matrices"0 ( (12*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
0.878965
+result =: am cis =: ci"2 (4 matrices"0 ( (13*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
0.921762
+result =: am cis =: ci"2 (4 matrices"0 ( (14*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
0.962258
+result =: am cis =: ci"2 (4 matrices"0 ( (15*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
1.00067
+result =: am cis =: ci"2 (4 matrices"0 ( (16*(#saaty_scale)^5) + i.
(#saaty_scale) ^5))
1.03721
results17 =: 1.03721 1.00067 0.962258 0.921762 0.878965 0.833757
0.786489 0.739607 0.709249 0.739607 0.786489 0.833757 0.878965 0.921762
0.962258 1.00067 1.03721
am results17
0.884158
So,
maci_precomputed =: 0.524457, 0.884158, 1000 maci"0 (5+i.6)
Actually, what needs to be remembered, is that the maci is dependent on
the scale used and on the chosen eigenvector method. The scale and
method should be the same for random matrices and for the matrix under
analysis. So if we look at Coyle's cpm matrix, it contains only
1,3,5,7,9 and reciprocals. It is not clear whether the initial odd
preferences were rechecked and decided to be accurate enough. Without
the recheck it is more appropriate to use a limited Saaty scale
comprised of only odd numbers. In that case the maci will be slightly
different (here computed only for size 3x3):
+saaty_scale =: \:~ }. (,%)~ >: +: i.5
9 7 5 3 1 0.333333 0.2 0.142857 0.111111
+result3 =: am ci"2 (3 matrices"0 (i. (#saaty_scale) ^3))
0.555033
Anyway, the differences are small and the suggestion to keep cr under
0.1-0.2 is also vague and should be used only to draw attention to
possible inconsistencies.
Best wishes,
Tarmo
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm