https://github.com/nishanc/ml.net-productrecommendation
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.
https://github.com/nishanc/ml.net-productrecommendation
dotnet microsoft mldotnet recommendation-system
Last synced: 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/nishanc/ml.net-productrecommendation
- Owner: nishanc
- Created: 2025-05-06T15:09:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-06T18:21:33.000Z (about 1 year ago)
- Last Synced: 2025-10-14T19:07:33.558Z (8 months ago)
- Topics: dotnet, microsoft, mldotnet, recommendation-system
- Language: C#
- Homepage:
- Size: 3.06 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π§ ML.NET Product Recommendation Demo β Co-Purchase Scenario
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.
---
## π Scenario
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`, and `Label`
---
## π‘ What You'll Learn
- 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
---
## π§ Prerequisites
- [.NET 8 SDK](https://dotnet.microsoft.com/en-us/download)
- Visual Studio or VS Code
- ML.NET NuGet Package:
```
dotnet add package Microsoft.ML
```
## π οΈ How to Run the Demo
1. **Clone or download the repo**.
2. Open the folder in Visual Studio or run via CLI.
3. Make sure the dataset `amazon.csv` is in the `Data/` folder.
4. Run the program:
```bash
dotnet run
```
## π Further Reading and References
### π¦ ML.NET Samples
- πΉ [Product Recommendation - Matrix Factorization Problem Sample](https://github.com/dotnet/machinelearning-samples/tree/main/samples/csharp/getting-started/MatrixFactorization_ProductRecommendation#product-recommendation---matrix-factorization-problem-sample)
- π¬ [Movie Recommendation - Matrix Factorization Sample 1 (Program.cs)](https://github.com/dotnet/samples/blob/main/machine-learning/tutorials/MovieRecommendation/Program.cs)
- π¬ [Movie Recommendation - Matrix Factorization Sample 2](https://github.com/dotnet/machinelearning-samples/tree/main/samples/csharp/getting-started/MatrixFactorization_MovieRecommendation#movie-recommendation---matrix-factorization-problem-sample)
### π Documentation and Tutorials
- π [What is ML.NET and How Does It Work?](https://learn.microsoft.com/en-us/dotnet/machine-learning/mldotnet-api)
- βοΈ [What is Automated Machine Learning (AutoML)?](https://learn.microsoft.com/en-us/dotnet/machine-learning/automated-machine-learning-mlnet)
- π οΈ [ML.NET AutoML Model Builder (Step-by-Step Walkthrough)](https://blog.nishanc.com/2023/08/mlnet-automl-model-builder-step-by-step.html)
- π [Deploy a Model in an ASP.NET Core Web API](https://learn.microsoft.com/en-us/dotnet/machine-learning/how-to-guides/serve-model-web-api-ml-net)
### π Data & Research
- π [Amazon Sales Dataset (Kaggle)](https://www.kaggle.com/datasets/karkavelrajaj/amazon-sales-dataset?resource=download)
- π [Machine Learning at Microsoft with ML.NET (Research Paper)](https://arxiv.org/pdf/1905.05715)
### π€ Ecosystem & Showcase
- π [Open Neural Network Exchange (ONNX)](https://onnx.ai/)
- π’ [Artificial Intelligence & ML Customer Showcase (Microsoft)](https://dotnet.microsoft.com/en-us/platform/customers/machinelearning-ai)