Dear Experts,
I have a two columns table and want to transpose to a symmetric matrix. Thank you very much for your help.
- The diagonal in the transposed symmetric matrix is the total number of products for each product purchased by all customers;
- The other part is the sum of minimum value cross all customers when customers purchase both products. For example: purchase both product#1 and product#2, 2 is minimum value for customer#1; 0 is minimum value for customer#2;1 is minimum value for customer#3, so the total is 3=2+0+1 in the symmetric matrix for both product#1 and product#2.
Original table:
Customer#1 Customer#2 Customer#3
Product#1 5 0 1
Product#2 2 1 2
Product#3 1 3 0
Product#4 0 2 1
Transposed symmetric matrix:
Product#1 Product#2 Product#3 Product#4
Product#1 =5+0+1 =2+0+1 =1+0+0 =0+0+1
Product#2 =2+0+1 =2+1+2 =1+1+0 =0+1+1
Product#3 =1+0+0 =1+1+0 =1+3+0 =0+2+0
Product#4 =0+0+1 =0+1+1 =0+2+0 =0+2+1

I have a two columns table and want to transpose to a symmetric matrix. Thank you very much for your help.
- The diagonal in the transposed symmetric matrix is the total number of products for each product purchased by all customers;
- The other part is the sum of minimum value cross all customers when customers purchase both products. For example: purchase both product#1 and product#2, 2 is minimum value for customer#1; 0 is minimum value for customer#2;1 is minimum value for customer#3, so the total is 3=2+0+1 in the symmetric matrix for both product#1 and product#2.
Original table:
Customer#1 Customer#2 Customer#3
Product#1 5 0 1
Product#2 2 1 2
Product#3 1 3 0
Product#4 0 2 1
Transposed symmetric matrix:
Product#1 Product#2 Product#3 Product#4
Product#1 =5+0+1 =2+0+1 =1+0+0 =0+0+1
Product#2 =2+0+1 =2+1+2 =1+1+0 =0+1+1
Product#3 =1+0+0 =1+1+0 =1+3+0 =0+2+0
Product#4 =0+0+1 =0+1+1 =0+2+0 =0+2+1
