Skip to content

Latest commit

Β 

History

History
71 lines (55 loc) Β· 1.91 KB

File metadata and controls

71 lines (55 loc) Β· 1.91 KB

Furnisique AI Recommender System

Welcome to the AI component of Furnisique β€” a smart furniture recommendation system designed to enhance the user's shopping experience by offering tailored furniture suggestions based on similarity.


🧠 Project Overview

This system analyzes a user's last purchase(s) and computes similarity-based furniture recommendations using a hybrid logic of encoded features and cosine similarity. It's deployed as a RESTful Flask API that integrates smoothly with a Laravel backend.


πŸ”§ Tech Stack

Layer Technology
Data Processing Python, Pandas, NumPy
Similarity Logic Scipy (Cosine Similarity)
API Layer Flask
Backend Integration Laravel (calls the Flask API)

πŸ” How It Works

  1. Vector Encoding: Each product is converted into a vector based on room type, aesthetic, category, normalized price, and color encoding.
  2. Similarity Computation: Uses cosine similarity to compare the vector of a new item with a user's last purchases.
  3. Color Compatibility Boost: Adds a minor boost to scores when color aesthetics match.
  4. Top-N Ranking: Returns top-N product recommendations (excluding purchased items).

πŸš€ Running the API

1. Install Requirements

pip install -r requirements.txt

2. Start the Flask Server

python recommender_api.py

3. Example API Request

GET http://localhost:5000/recommendations?user_id=12&top_n=10

βœ… Sample Response

{
  "user_id": 12,
  "recommendations": [
    {"id": 5, "score": 0.97},
    {"id": 5, "score": 0.95},
    {"id": 5, "score": 0.92},
    {"id": 14, "score": 0.89},
    {"id": 3, "score": 0.87}
  ]
}

πŸ§ͺ Testing

Run the local tests to validate the model:

python tests/test_recommender.py

πŸ‘₯ Contributors

  • AI Engineer: Nour Maged