So I have a one-hot encoding called datBaskets. Rows are transactions, and columns are store departments. The ijth entry is true if the ith basket contains an item from the jth department and false otherwise. It looks something like this...
| Cleaning Supplies | Batteries | Food | |
|---|---|---|---|
| 0 | True | True | False |
| 1 | False | True | True |
| 2 | False | False | False |
| 3 | True | False | False |
| 4 | True | False | True |
| 5 | False | True | False |
What I seek is a matrix with departments as both rows and columns that tells me the proportion of all transactions that contain that combination of departments. So the Batteries-Food entry would be 0.167 in this case.