100 beginner machine learning projects with runnable Python code, tests and honest case studies. By Networkers Home, Bangalore.
This small teaching project builds and evaluates a content recommendation pipeline that starts from collaborative filtering and adds freshness, diversity and a cold-start fallback. The code produces personalised ranked lists for users from a compact synthetic content catalogue. It compares the recommender against a simple editorial baseline using ranking recall, topic coverage and a separate new-user (cold-start) test. The project is deterministic and intended for students to see how small, well-scoped additions to a recommender can change output quality.
The data in this project is synthetic but realistic in structure: a small catalogue of items with topic labels and publication dates, and a set of voluntary user ratings (1-5). The catalogue and ratings are generated inside the code using numpy and pandas; no external downloads are used. The catalogue provides the metadata required to implement freshness and topic diversity policies.
Measured by running python project.py (seed 42) on 2026-10-23; the tests in test_project.py assert the floor.
| Metric | Value |
|---|---|
| recall_at_5 | 0.5000 |
| topic_coverage_at_5 | 0.8750 |
| new_user_recall | 0 |
| baseline_recall_at_5 | 0 |
| sample_user | U1 |
Also returned (see python project.py output): sample_recommendations (5 items).
This is a compact educational pipeline. The synthetic dataset is small and simplified; results do not reflect a production-scale environment. The diversity re-ranking is a basic greedy approach and may not match more advanced constrained optimisation techniques. Freshness is a simple additive score and does not account for long-term user preferences for older content.
Possible extensions include learning-to-rank approaches that combine signals, session-aware freshness, user-level diversity preferences, item-side embeddings (content features), and a better cold-start model that uses side information about users or items.
Full case study, build steps and evaluation checks: Content recommendation engine on networkershome.com
Built by Networkers Home · Learn the skills in the AI Engineer Course · Part of 100 AI projects with code