📚
BookDB
Find your next favourite book.
A recommendation engine built from scratch: item-based collaborative filtering , a hand-written BPR matrix factorization , TF-IDF content similarity, and hybrid fusion with Reciprocal Rank Fusion. The demo below runs the content + RRF half right in your browser.
View source →
How it works
Content similarity — every book becomes a TF-IDF vector over its genres, author, and description; cosine similarity finds neighbours.
Collaborative filtering — item-item cosine over a (synthetic) interaction matrix: books read by similar people are similar.
BPR — a matrix factorization trained by ranking observed items above unobserved ones (SGD on triples).
Hybrid fusion — rankers are merged with Reciprocal Rank Fusion , which combines lists by rank rather than raw score.
Evaluated — python -m bookdb eval shows item-CF and BPR beating a popularity baseline on held-out data (precision/recall/MAP/NDCG).
pip install -e .
python -m bookdb demo # sample recommendations
python -m bookdb eval # metrics vs. a popularity baseline
python -m bookdb serve # JSON API on :8000
BookDB — find your next favourite book · MIT.