Step 4 computes the augmented characteristic value table (ACVS).
CREATE MULTISET TABLE attrib_acvs AS ( SELECT * FROM ShapleyAddOnePlayer ( ON attrib_cvs USING CombinationColumn ('comb') SizeColumn ('size') ValueColumn ('value') NumPlayers (5) ) AS dt ) WITH DATA;
This query returns the following table:
SELECT * FROM attrib_acvs ORDER BY comb1,comb2;
comb1 | comb2 | player | size | value | divisor |
---|---|---|---|---|---|
NULL | 1 | 1 | 0 | 0.0 | 1 |
NULL | 2 | 2 | 0 | 0.0 | 1 |
NULL | 3 | 3 | 0 | 0.0 | 1 |
NULL | 4 | 4 | 0 | 0.0 | 1 |
NULL | 5 | 5 | 0 | 0.0 | 1 |
1 | 1 2 | 2 | 1 | 0.800000011920929 | 4 |
1 | 1 3 | 3 | 1 | 0.800000011920929 | 4 |
1 | 1 4 | 4 | 1 | 0.800000011920929 | 4 |
1 | 1 5 | 5 | 1 | 0.800000011920929 | 4 |
1 2 | 1 2 3 | 3 | 2 | 0.800000011920929 | 6 |
1 2 | 1 2 4 | 4 | 2 | 0.800000011920929 | 6 |
1 2 | 1 2 5 | 5 | 2 | 0.800000011920929 | 6 |
1 2 3 | 1 2 3 4 | 4 | 3 | 0.699999988079071 | 4 |
1 2 3 | 1 2 3 5 | 5 | 3 | 0.699999988079071 | 4 |
1 2 3 4 | 1 2 3 4 5 | 5 | 4 | 0.8999999761581421 | 1 |
1 2 3 5 | 1 2 3 4 5 | 4 | 4 | 0.800000011920929 | 1 |
1 2 4 | 1 2 3 4 | 3 | 3 | 1.0 | 4 |
... | ... | ... | ... | ... | ... |