Skip to content

ahmetcanarin/ARL_Based_Recommendation_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‚ Data Access

The dataset used in this project is based on the Online Retail II dataset, which contains transactional data from a UK-based online retail company.

Due to GitHub file size limitations and best practices in data science project structuring, the dataset is not included directly in this repository.


πŸ”— Dataset Source

You can access the dataset from the official source below:


πŸ“Š Dataset Description

The dataset includes real-world transactional data with the following key attributes:

  • Invoice: Unique transaction identifier
  • StockCode: Product/item code
  • Description: Product name
  • Quantity: Number of items purchased
  • InvoiceDate: Transaction timestamp
  • Price: Unit price
  • CustomerID: Unique customer identifier
  • Country: Customer location

βš™οΈ Data Preprocessing

Before modeling, the dataset undergoes several preprocessing steps to ensure analytical quality:

  • Removal of canceled transactions (Invoices containing "C")
  • Exclusion of non-product entries (e.g., shipping codes such as "POST")
  • Filtering out invalid values (e.g., non-positive prices)
  • Handling missing values
  • Outlier capping using IQR-based thresholds

πŸ€– Recommendation System (Association Rule Learning)

After preprocessing, an Association Rule Learning (ARL)–based recommendation system is developed using the Apriori Algorithm.

The goal is to identify products that are frequently purchased together and generate data-driven product recommendations.


🧠 Approach

The recommendation system follows these steps:

  • Transform transactional data into a basket (invoice-product) matrix
  • Convert quantities into a binary format (1 if purchased, 0 otherwise)
  • Apply the Apriori algorithm to extract frequent itemsets
  • Generate association rules using support, confidence, and lift metrics
  • Rank rules based on lift to identify strong product relationships

πŸ“Š Key Concepts

  • Support β†’ Frequency of itemset occurrence
  • Confidence β†’ Probability of purchasing item B given item A
  • Lift β†’ Strength of association between products (higher = stronger relationship)

βš™οΈ Recommendation Logic

  • For a given product:
    • Find rules where the product appears in the antecedent (left-hand side)
    • Retrieve the corresponding consequents (right-hand side)
    • Sort by lift to prioritize stronger associations
    • Return top-N recommended products

🎯 Business Value

This system enables:

  • Cross-selling opportunities (e.g., β€œCustomers who bought this also bought…”)
  • Improved product bundling strategies
  • Increased average order value (AOV)
  • More personalized shopping experiences

πŸ’‘ Example Use Case

If a customer purchases a specific product, the system can recommend complementary products based on historical co-purchase patterns.

This makes the solution directly applicable to:

  • E-commerce recommendation engines
  • Campaign targeting
  • Product placement strategies

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages