2026
MerchantLens
Ranks product pairs by lift to distinguish meaningful purchase associations from pairs that are simply popular.
- Role
- Sole engineer
- Stack
- Python, FastAPI, React, TypeScript, Vite
The problem
Raw co-purchase counts tend to favor popular products. MerchantLens uses lift to measure how often two products appear together relative to how often each is purchased independently. The same analysis can also be segmented by customer group to compare how purchasing patterns differ across cohorts.
What it does
- Ranks product pairs by lift after applying a minimum support threshold.
- Shows each product’s price, purchase frequency and associated bundles.
- Runs the same association analysis across six synthetic customer groups.
Decisions
Apply a support floor before ranking lift
Pairs must reach a minimum support of 0.02 by default before they are ranked by lift.
TradeoffThe threshold removes unstable associations caused by very rare purchases, but it can also exclude legitimate niche combinations.
Use reproducible synthetic orders
The demo dataset is generated from a fixed seed so results are reproducible and no customer data is required.
TradeoffPurchase associations are encoded in the generator. The results validate the analysis pipeline rather than demonstrate findings from a real market.
Demo dataset
Seed 42. Synthetic orders generated for the demo.
- Orders
- 2,000
- Products
- 40
- Pairs with support ≥ 0.02 and lift ≥ 1.1
- 19
- Highest liftDish soap and sponge pack
- 3.81
- Customer cohorts
- 6
Limits
- The demo uses synthetic orders and an in-memory data store.
- It is not connected to a live storefront or transaction system.