You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it gives me all possible itemsets.
What I want is a function that accepts an item and returns all its pairs (excluding itself) sorted in order of support
getRelatedItems(item, maxItems?)
Currently it gives me all possible itemsets.
What I want is a function that accepts an item and returns all its pairs (excluding itself) sorted in order of support
getRelatedItems(item, maxItems?)
var transactions = [
[1, 3, 4],
[2, 3, 5],
[1, 2, 3, 5],
[2, 5],
[1, 2, 3, 5]
];
getRelatedItems(1) // Output: [3, 5, 2]
getRelatedItems(2) // Output: [5, 3, 1]
getRelatedItems(3) // Output: [5, 2, 1]
getRelatedItems(4) // Output: []
getRelatedItems(5) // Output: [2, 3, 1]
The text was updated successfully, but these errors were encountered: