Week 12 : Loaded Final Features & Recommendations
1. Introduction
In Week 12, our focus is on **loading the final features** and generating **product recommendations** for users using collaborative filtering.
We build the **User-Item matrix**, compute **Item Similarity**, predict user ratings, and extract the **top 3 recommended products per user**.
This ensures our recommendation model is ready for deployment and evaluation.
2. Objectives
- Load final feature dataset from Week 11 outputs.
- Construct the User-Item matrix representing user-product interactions.
- Compute Item Similarity Matrix using collaborative filtering techniques.
- Predict product ratings for each user.
- Generate and save top 3 product recommendations per user.
- Document key metrics and milestones for Week 12.
3. Week 12 Tasks / Assignment
- Load the final features dataset prepared in Week 11.
- Create User-Item matrix with users as rows and products as columns.
- Compute Item Similarity Matrix using cosine similarity.
- Predict ratings for all users based on item similarity.
- Extract top 3 recommended products per user and save as 'week12_recommendations.csv'.
- Visualize sample outputs for verification.
4. Outputs
4.1 Final Features (Sample)
| Unique id | channel_name | category | Sub-category | Customer Remarks |
Order_id | order_date_time | Issue_reported at | issue_responded | Survey_response_Date |
Customer_City | Product_category | Item_price | connected_handling_time | Agent_name |
Supervisor | Manager | Tenure Bucket | Agent Shift | CSAT Score |
| 7e9ae164-6a8b-4521-a2d4-58f7c9fff13f | Outcall | Product Queries | Life Insurance | nan |
c27c9bb4-fa36-4140-9f1f-21009254ffdb | nan | 01/08/2023 11:13 | 01/08/2023 11:47 | 01-Aug-23 |
nan | nan | nan | nan | Richard Buchanan |
Mason Gupta | Jennifer Nguyen | On Job Training | Morning | 5 |
| b07ec1b0-f376-43b6-86df-ec03da3b2e16 | Outcall | Product Queries | Product Specific Information | nan |
d406b0c7-ce17-4654-b9de-f08d421254bd | nan | 01/08/2023 12:52 | 01/08/2023 12:54 | 01-Aug-23 |
nan | nan | nan | nan | Vicki Collins |
Dylan Kim | Michael Lee | >90 | Morning | 5 |
4.2 User-Item Matrix Sample
| Unique id | Affiliates | Books & General merchandise | Electronics | Furniture |
GiftCard | Home | Home Appliences | LifeStyle | Mobile |
| 0001f06a-bd9a-4888-9cf9-0a094a15eaf2 | 0 | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 00053812-fb74-4294-a9d1-5167c5a36c7d | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4.3 Item Similarity Matrix Sample
| Product_category | Affiliates | Books & General merchandise | Electronics | Furniture |
GiftCard | Home | Home Appliences | LifeStyle | Mobile |
| Affiliates | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Books & General merchandise | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4.4 Predicted Ratings Sample
| Unique id | Affiliates | Books & General merchandise | Electronics | Furniture |
GiftCard | Home | Home Appliences | LifeStyle | Mobile |
| 0001f06a-bd9a-4888-9cf9-0a094a15eaf2 | 0 | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 00053812-fb74-4294-a9d1-5167c5a36c7d | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
4.5 Top 3 Recommended Products per User
| UserID | Top_Products |
| 0001f06a-bd9a-4888-9cf9-0a094a15eaf2 | ['Books & General merchandise', 'Affiliates', 'Electronics'] |
| 00053812-fb74-4294-a9d1-5167c5a36c7d | ['LifeStyle', 'Affiliates', 'Books & General merchandise'] |
5. Key Metrics
- Total users processed: 50,000+
- Total products: 10
- User-Item matrix size: 50,000 x 10
- Top 3 product recommendations generated per user
- Recommendations saved successfully to 'week12_recommendations.csv'
6. Week 12 Milestone
- Loaded final features from Week 11 outputs
- Built User-Item matrix for collaborative filtering
- Calculated Item Similarity Matrix
- Generated predicted ratings for all users
- Extracted and saved top 3 recommended products per user
- Completed Week 12 assignment successfully