Association analysis is one of those problems that sounds deceptively simple: you take a bunch of groups, lists, or baskets and ask: “What tends to show up together?” Sounds like a casual supermarket observation, but behind it lurks some very serious maths. The classic story here is basket analysis: if someone buys bread, they’re oddly more likely to grab butter too. Mathematically, that’s a rule of the form: “If X, then Y”.
Omniscope’s Basket analysis block makes this digestible with three friendly statistics:
Support - how often items actually appear together (raw popularity score).
Confidence - how often “If X, then Y” holds true.
Lift - how much more likely items are together than by pure chance
An article explaining this block in more detail can be found here.
Today's challenge is to visualise these relationships, because nothing brings a dataset to life like a well-chosen chart...
The same logic applies to call patterns in telecom, symptom–diagnosis links in healthcare, even supply chain logistics. In our demo dataset, though, we’ll keep it simple: just two columns - a Basket ID and a list of items inside it.
Step one: split the list. Using Omniscope’s De-tokenise block, we break out every item (using commas as separators) while keeping the connection to its basket. This will obviously increase the record count.
Step two: make the data talk to itself: we merge the dataset with itself, creating a Cartesian product. This gives us those useful From - To relationships: “For product A, which products tend to be found together, and how often?”
This step produces duplicates (like Peppers ↔ Peppers), but don’t toss them out yet. They’re actually useful for heat maps, since they reveal how many baskets contain each product on its own. Grapes with Grapes may sound like a redundant friendship, but it still counts.
Now the fun bit: visualisation.
With a Dependency Wheel (Linked network type) each product becomes a segment, and the links show how frequently it pairs up with others.
By carefully defining product links and using a formula for Link weight and colour, we make sure nothing gets double-counted.
SUBSET_UNIQUECOUNT([BasketID])
Alternatively, with a Pivot view, we place From on x axis, To on y, and use the same cell formula measure SUBSET_UNIQUECOUNT([BasketID])
to see how many baskets each combination pops up in.
We colour it using the same formula and voilà: you’ve got a heat map of product chemistry.
The catch? Popular products will naturally hog the spotlight. To avoid being fooled, use the Basket analysis block to calculate support, confidence and lift. That way you’ll spot the gems, like oysters and lemons: oysters purchases may be rare, but when they do appear, they’re almost always paired with lemons - proving some relationships are truly destined...
You can download and import this IOZ file to plug and transform your data, alternatively you can see a live demo here
https://public.omniscope.me/Public/Basket+analysis.iox/r/Report
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article