dotnet/machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.

ML.NET – Machine Learning for .NET

What it is – ML.NET is an open‑source, cross‑platform machine‑learning framework built for the .NET ecosystem. It lets C# (and other .NET language) developers create, train, evaluate, and deploy custom ML models without having to write Python or R code.

Key capabilities

  • Data loading from files, databases, or in‑memory collections.
  • A catalog of common algorithms (e.g., binary/multi‑class classification, regression, clustering, time‑series forecasting, anomaly detection) and pipelines for data transformation (text featurization, normalization, etc.).
  • Ability to consume pre‑trained TensorFlow and ONNX models, extending the range of scenarios.
  • Full .NET Standard 2.0 support, so the same code runs on Windows, Linux, macOS, ARM64, Apple Silicon, and even Blazor WebAssembly.
  • Distributed as a NuGet package (Microsoft.ML) with optional add‑ons for advanced trainers (LightGBM, TensorFlow, etc.).

Typical use‑cases

  • Sentiment analysis, spam detection, churn prediction, recommendation engines.
  • Forecasting sales, demand, or sensor readings.
  • Detecting outliers or equipment failures in IoT streams.
  • Adding on‑device inference to desktop, web, or mobile .NET apps.

Getting started

  1. Install the core package: dotnet add package Microsoft.ML.
  2. Follow the official Getting Started tutorial (linked in the README) to load data, build a pipeline, train a model, and make predictions.
  3. Explore the ML.NET Samples repository for ready‑made console, WPF, ASP.NET, and mobile examples.
  4. Consult the online documentation for API reference, task‑specific guides, and platform‑specific notes.

How it’s built / contributed

  • The source lives under the dotnet/machinelearning GitHub repo and follows the .NET Foundation’s contribution guidelines and Code of Conduct.
  • Continuous integration runs on Azure DevOps; code coverage is tracked via Codecov.
  • Releases are synchronized with major .NET releases (e.g., ML.NET 2.0 with .NET 7) and follow a yearly major‑release cadence.

License – MIT (commercial‑friendly, permissive).

Where to learn more


ML.NET lets .NET developers stay in their familiar language and tooling while adding powerful machine‑learning features to their applications.

Related

  • Project
  • Project
  • Project
  • Project
  • Project