This demo accompanies the tech talk "Building Intelligent Applications with ML.NET", where we explore how to use Matrix Factorization to build a product recommendation system based on co-purchase behavior.
Imagine you're running an e-commerce platform. You have customer purchase data and want to recommend products that are frequently bought together — even if the user hasn't seen them before.
This solution uses:
- ML.NET’s
MatrixFactorizationTrainer
- A small sample dataset of
user_id
,product_id
, andLabel
- Basics of Matrix Factorization for collaborative filtering
- How to implement recommendations in ML.NET
- Training a model using implicit purchase data
- Making product predictions for a given customer
- .NET 8 SDK
- Visual Studio or VS Code
- ML.NET NuGet Package:
dotnet add package Microsoft.ML
- Clone or download the repo.
- Open the folder in Visual Studio or run via CLI.
- Make sure the dataset
amazon.csv
is in theData/
folder. - Run the program:
dotnet run
- 🔹 Product Recommendation - Matrix Factorization Problem Sample
- 🎬 Movie Recommendation - Matrix Factorization Sample 1 (Program.cs)
- 🎬 Movie Recommendation - Matrix Factorization Sample 2