Thanks to visit codestin.com
Credit goes to github.com

Skip to content

This project performs market basket analysis on transaction data using the Apriori algorithm and association rule mining.

Notifications You must be signed in to change notification settings

viznuv/Market-basket-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Market Basket Analysis Using Apriori and Association Rules

This project performs market basket analysis on transaction data using the Apriori algorithm and association rule mining. It processes the data from a CSV file, generates frequent itemsets, and then extracts association rules with various metrics to help identify important relationships between products.

Table of Contents

Overview

This repository contains a Python script designed to analyze transaction data from a CSV file. It performs the following tasks:

  • Reads and preprocesses transaction data.
  • Converts transactions into a one-hot encoded format suitable for analysis.
  • Applies the Apriori algorithm to identify frequent itemsets.
  • Generates and displays association rules along with important metrics such as support, confidence, lift, leverage, and conviction.

Features

  • Data Import: Reads transactions from a CSV file.
  • Data Preprocessing: Cleans and transforms transaction data into a list format and then into a one-hot encoded DataFrame.
  • Frequent Itemset Mining: Uses the Apriori algorithm to find item combinations that occur frequently in the dataset.
  • Association Rule Mining: Extracts rules that show how the purchase of certain items is associated with others.
  • Interpretation Metrics: Outputs support, confidence, lift, and several additional metrics to help in the analysis.

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/viznuv/market-basket-analysis.git
    cd market-basket-analysis

About

This project performs market basket analysis on transaction data using the Apriori algorithm and association rule mining.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published