I have ecommerce data with about 6000 SKUs and 250,000 obs. Simple version below but a lot more sparse. There is only one SKU per line as each line is a transaction. What I have: I want to create a weighted undirected adjacency matrix so that I can do some graph analysis on the market baskets. It would look like

# Tag: adjacency-matrix

## Iterate through an adjacency matrix with a list

So I have a n x n adjacency matrix, N x N NumPy array, where the i-th row and the j-th column is the distance between the i-th and j-th cities. I also have list, in a specific order in which I have to visit the cities and and add the distances together. The list items are pointing to row/column

## Construct graph connectivity matrices in COO format

I have faced the following subtask while working with graph data: I need to construct graph connectivity matrices in COO format for graphs with several fully-connected components from arrays of “border” indices. As an example, given array the resulting COO matrix should be That is, borders array contains ranges of nodes that should form fully-connected subgraphs (starting index included and