Market Basket and High Utility Mining
Retail data-mining app with Apriori association rules, high utility itemset mining, a basket recommender and dashboard, written from scratch in Python with Tkinter and SQLite.
- Price: ₹1,999
- Category: AI / ML
- Technology: Python, Tkinter, SQLite, Apriori, Two-Phase high utility mining (own code), Matplotlib
- Includes: Source code + database
- Suitable for: BCA / B.Sc CS, MCA / M.Sc CS, B.E / B.Tech CSE & IT
Project overview
Which products are bought together, and which combinations really make money? This desktop application answers both questions on retail transaction data. It implements two data-mining algorithms from scratch: Apriori, which finds frequent itemsets and association rules with support, confidence and lift, and the Two-Phase high utility algorithm, which uses the quantity and profit of every item so that a rarely bought but valuable combination is not missed. On the 1,000 demo transactions at the default settings it finds 200 association rules (for example Banana + Curd -> Apple with lift 9.8) and 96 high utility itemsets, 11 of which are not frequent at all - such as Cereal + Coffee + Honey - and shows them in orange so the difference between frequency and profit is obvious. A basket recommender suggests what to offer next, the dashboard shows the best sellers by units and by profit, and products, profits and transactions can be edited, generated or imported from CSV. Both algorithms are checked against brute-force calculation in the tests, which makes the project easy to explain in a viva.
Modules
- Login: Admin login with a salted password hash; change the password from the side menu.
- Dashboard: Transactions, products, average basket, units sold and total profit; top 10 items by units and by profit.
- Transactions: Generate demo baskets (count, seed), import / export CSV (tid, item, qty), browse and clear.
- Products: Item list with category, price and profit per unit; add, edit and delete (profit drives the utility).
- Association Rules: Apriori: minimum support, confidence, lift and itemset size; rules table and a support-vs-confidence chart; CSV export.
- High Utility: Two-Phase mining with a minimum utility given as a share of total profit; profitable-but-rare itemsets highlighted; chart and CSV export.
- Recommender: Pick the items in a basket and get items to offer, ranked by confidence and lift, with the rule that explains each one.
Requirements
- Python 3.11
- Internet once, to install the libraries (about 2 minutes)
- Windows 10 / 11
How to run this project
- Install Python 3.11 from python.org and tick "Add python.exe to PATH" during setup.
- Extract the zip and open the project folder (STUDENT_GUIDE.md explains every step in simple words).
- Double-click `1_INSTALL.bat` once and wait until it says [OK] (about 2 minutes; it downloads the libraries into a private .venv folder).
- Double-click `2_RUN.bat` to start the project. If it does not start, double-click `CHECK_SETUP.bat` and read what it says.
- Log in with admin / admin123.
- Open High Utility and click 'Find high utility itemsets': the orange rows (for example Cereal + Coffee + Honey) are very profitable but not frequent. Open Recommender, choose Bread in the basket and click 'Suggest items to offer'; then open Products, change the profit of Cheese and mine again.