Step 2 adds one player to each combination.
Using the output of the ShapleyGenerateCombination function, the ShapleyAddOnePlayer function computes the divisor value by adding one player to each combination. The divisor is key to the calculation of the final Shapley numbers.
SQL Call
CREATE MULTISET TABLE project_addone_cost AS ( SELECT * FROM ShapleyAddOnePlayer ( ON project_comb_cost USING CombinationColumn('comb') SizeColumn('size') ValueColumn('value') NumPlayers(3) )AS dt ) WITH DATA;
Output
select * from project_addone_cost order by 1;
comb1 comb2 player size value divisor ----- ----- ------ ---- ------- ------- NULL 2 2 0 0.0 1 NULL 3 3 0 0.0 1 NULL 1 1 0 0.0 1 1 1 3 3 1 3000.0 2 1 1 2 2 1 3000.0 2 1 2 1 2 3 3 2 14000.0 1 1 3 1 2 3 2 2 13000.0 1 2 1 2 1 1 13000.0 2 2 2 3 3 1 13000.0 2 2 3 1 2 3 1 2 19000.0 1 3 2 3 2 1 10000.0 2 3 1 3 1 1 10000.0 2