My data in excel look like this.
fi denote some features, IDi denotes customer IDs and the numbers denote the times that a certain feature appeared.
I would like to count the pairs of features that appear together in these IDs and come up with some like this
This matrix is to be interpreted in the following way: (f1,f2) appeared three times together (in ID2,ID3,ID4) (f2,f3) appeared one time together (in ID3) (f1,f4) appeared 3 times together (in ID1, ID2, ID3) and so on