Microsoft's official ML sampler platter for .NET devs
A collection of official samples showing how to infuse machine learning into .NET console, web, and desktop apps.

What it does This repository is Microsoft’s official sample collection for ML.NET, housing two tiers of examples. “Getting Started” samples are stripped-down console apps that isolate specific ML tasks—sentiment analysis, fraud detection, demand prediction—while “End-to-End” apps demonstrate how to embed trained models into real web APIs and desktop software. Most tasks are implemented in both C# and F#.
The interesting bit The repo functions like a Rosetta stone for .NET developers, mapping classic ML problems onto familiar patterns. It often shows the same scenario through different lenses—image classification via high-level ML.NET APIs, TensorFlow featurizers, and ONNX scoring—so you can compare integration strategies without leaving the ecosystem.
Key highlights
- Covers the standard ML spectrum: binary and multi-class classification, regression, recommendation, time series, anomaly detection, clustering, ranking, and computer vision
- Most getting-started samples ship in both C# and F#
- Includes deep-learning bridges: TensorFlow model scoring and ONNX object detection
- Distinguishes between minimal console demos and production-ish web/desktop applications
- Cross-cutting scenarios address deployment patterns like scalable WebAPI integration
Caveats
- This is strictly a samples repo; framework bugs belong in the main ML.NET repository
- The README is essentially a large table of contents, so expect to dig into individual project folders for implementation details
Verdict Useful if you’re a .NET developer trying to map ML concepts onto familiar tooling. Skip it if you want a single polished reference architecture or already live in Python.
Frequently asked
- What is dotnet/machinelearning-samples?
- A collection of official samples showing how to infuse machine learning into .NET console, web, and desktop apps.
- Is machinelearning-samples open source?
- Yes — dotnet/machinelearning-samples is open source, released under the MIT license.
- What language is machinelearning-samples written in?
- dotnet/machinelearning-samples is primarily written in PowerShell.
- How popular is machinelearning-samples?
- dotnet/machinelearning-samples has 4.7k stars on GitHub.
- Where can I find machinelearning-samples?
- dotnet/machinelearning-samples is on GitHub at https://github.com/dotnet/machinelearning-samples.