MB Affinity Tool

The MB Affinity tool takes "transaction" data and constructs a matrix where each row is a transaction and the columns are the set of "items" that could appear in the transaction. If an item was present in a transaction, it has a value of 1 in the matrix, and 0 if it did not. The matrix is then used to construct a matrix of affinity measures between different items with respect to their likelihood of being in the same transaction. As a result, if there are 500 items, the resulting matrix will have 500 rows and columns. The available affinity measures are cosine similarity, cosine distance, and co-occurrence counts (e.g., the number of times two items appeared in the same transaction).

This tool scales with the number of transactions records, but is limited in the number of unique items it can handle. Under common laptop and desktop configurations, the limit is likely to be between 3000 and 5000 unique items.

This tool uses the R programming language. Go to Options > Download Predictive Tools to install R and the packages used by the R Tool.

Configuration Properties

  1. Select the transaction key field: The selected field must be numeric and should contain IDs for the transactions.

  2. Select the field that contains the item identifier: The selected field should contain names or IDs for the items (to be compared)
  3. Affinity measure
  4. Number of records per data chunk: Maximum number of records to be processed simultaneou.sly.

*https://en.wikipedia.org/wiki/Cosine_similarity