Skip to content

misha-jehangir/lahore-poi-recommender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lahore POI Recommender

A hybrid recommendation system built using the LightFM library to recommend Points of Interest (POIs) in Lahore, Pakistan.

This repository contains the source code, data, and documentation for a project that processes spatial place data, simulates user interaction demographics, and trains a hybrid collaborative filtering model.


📁 Repository Structure

lahore-poi-recommender/
├── data/
│   ├── pakistan_gazetteer_data.xlsx # Raw Pakistan Gazetteer dataset
│   ├── lahore_locations_data.csv   # Filtered POI data from the Pakistan Gazetteer
│   └── generated_users_data.csv    # Simulated user demographics and interaction history
├── docs/
│   ├── presentation.pdf            # Project presentation slide deck
│   └── report.pdf                  # Detailed project report
├── lahore_poi_recommender.ipynb    # Jupyter Notebook containing the full pipeline
└── README.md                       

🛠️ Project Overview

The project is structured into three main phases, all contained within lahore_poi_recommender.ipynb:

  1. Data Extraction & Filtering:
    • Filtered national spatial data to extract Lahore's coordinates.
    • Categorized locations into relevant feature classes (e.g., Parks, Mosques, Monuments, Shrines, Libraries).
  2. User Simulation:
    • Generated synthetic profile data for 5,000 users.
    • Assigned demographics (age, gender) and category preferences.
    • Built simulated visit histories (10–20 visited locations per user) to train the model.
  3. Model Training & Evaluation:
    • Built a Hybrid Recommender System using the LightFM algorithm.
    • Incorporated user features (gender, binned age groups) and item features (feature classes/codes)
    • Evaluated using ranking metrics: Precision@k, Recall@k, and AUC Score.

🚀 Getting Started

Prerequisites

To run the notebook locally, install the following Python packages:

pip install pandas numpy lightfm scikit-learn openpyxl

Running the Notebook

  1. Clone this repository.
  2. Open lahore_poi_recommender.ipynb in Jupyter Notebook or Google Colab.
  3. Run all cells in order. The notebook is fully self-contained and runnable from start to finish, including the initial coordinate filtering of the raw gazetteer data (data/pakistan_gazetteer_data.xlsx).

📊 Evaluation Results

The hybrid model achieves the following typical validation metrics on the simulated interaction data:

  • Precision@5: ~0.33
  • Recall@5: ~0.11
  • AUC Score: ~0.70

About

A hybrid recommendation system built using LightFM to recommend Points of Interest (POIs) in Lahore, Pakistan, utilizing spatial place data and synthetic user demographics and interaction data | Artificial Intelligence Project

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages