A Python-based recommendation system that suggests movies π₯ and music πΆ to users based on their shared preferences with other users.
β
User-Based Collaborative Filtering β Finds similar users based on shared ratings π«
β
Personalized Recommendations β Suggests movies & music users haven't watched/listened to yet π§ποΈ
β
Dynamic & Expandable β Easily add more users and ratings for better recommendations π
β
Simple & Lightweight β No external libraries, just pure Python π
- User Ratings Dataset π
- Each user rates movies and songs on a scale of 1-5.
- Finding Similar Users π€
- Compares a target userβs ratings with others to find similar tastes.
- Making Recommendations π
- Suggests items that similar users liked but the target user hasn't experienced yet.
- Sorting by Interest Score π’
- Recommendations are ranked based on the total ratings from similar users.
# Create an instance of the recommender system
collab_recommender = CollaborativeFilteringRecommender()
# Get recommendations for Alice
recommendations = collab_recommender.recommend_items("Alice")
# Display recommendations
for title, score in recommendations:
print(f"{title} | Estimated Interest Score: {score}")| User | Movies & Songs Rated πΆπ¬ |
|---|---|
| Alice | Inception (5), Interstellar (4), Bohemian Rhapsody (2) |
| Bob | The Dark Knight (5), Imagine (3), Inception (4) |
| Charlie | Avengers: Endgame (4), Hotel California (3) |
| David | The Matrix (5), Billie Jean (5) |
| Emma | Bohemian Rhapsody (5), Shape of You (4) |
πΉ Use cosine similarity for better user comparison π
πΉ Integrate a database for dynamic user ratings πΎ
πΉ Implement a graphical user interface (GUI) for easy use π¨
πΉ Support real-world datasets from platforms like IMDb & Spotify π
πΉ Clone the repository
πΉ Run the Python script
πΉ Get personalized recommendations in seconds! π
π¨βπ» Developed as part of CodSoft Internship β Task 4 π
Feel free to contribute & improve the system! π‘