Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsJul 13, 2026·3 min de lectura

ML.NET — Cross-Platform Machine Learning Framework for .NET

An open-source machine learning framework by Microsoft that lets .NET developers build, train, and deploy custom ML models without leaving the .NET ecosystem.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
ML.NET Overview
Comando de instalación directa
npx -y tokrepo@latest install bcdbac82-7e94-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con dry-run.

Introduction

ML.NET is Microsoft's open-source machine learning framework for .NET developers. It enables classification, regression, anomaly detection, recommendation, and time-series forecasting directly in C# or F# applications without requiring Python or external ML services.

What ML.NET Does

  • Trains custom ML models for classification, regression, clustering, anomaly detection, and ranking
  • Provides AutoML for automatic model selection and hyperparameter tuning
  • Imports pre-trained ONNX and TensorFlow models for inference in .NET apps
  • Offers a visual Model Builder tool in Visual Studio for code-free ML development
  • Runs inference on CPU with no GPU requirement for deployment scenarios

Architecture Overview

ML.NET uses a pipeline-based architecture where data transformations and trainers are chained together. Data flows through an IDataView abstraction that supports lazy evaluation and streaming for large datasets. The framework wraps native libraries for performance-critical operations while exposing a managed C# API.

Self-Hosting & Configuration

  • Install via NuGet: dotnet add package Microsoft.ML
  • Add domain-specific packages like Microsoft.ML.Vision or Microsoft.ML.TimeSeries as needed
  • Use Model Builder in Visual Studio for guided model training
  • Deploy trained models as part of ASP.NET Core APIs or Azure Functions
  • Export models in the ML.NET .zip format or consume ONNX models directly

Key Features

  • Native .NET integration with no Python dependency for training or inference
  • AutoML automatically selects the best algorithm and hyperparameters
  • ONNX model import enables using models trained in PyTorch or TensorFlow
  • Scales from desktop apps to cloud services with the same codebase
  • Supports .NET 6+ on Windows, Linux, and macOS

Comparison with Similar Tools

  • scikit-learn — Python-native with larger algorithm library; ML.NET stays within the .NET ecosystem
  • PyTorch/TensorFlow — Deep learning focused with GPU support; ML.NET targets traditional ML with CPU inference
  • Accord.NET — Older .NET ML library; ML.NET has stronger Microsoft backing and active development
  • ONNX Runtime — Pure inference engine; ML.NET adds training, data pipelines, and AutoML on top

FAQ

Q: Does ML.NET require a GPU? A: No, ML.NET runs on CPU. For deep learning with GPU, import ONNX or TensorFlow models.

Q: Can I use ML.NET in production? A: Yes, ML.NET is used in production at Microsoft for features in Bing, PowerPoint, and Excel.

Q: What data formats does ML.NET support? A: CSV, TSV, Parquet, SQL databases, and in-memory IEnumerable collections.

Q: How does AutoML work? A: AutoML tries multiple algorithms and hyperparameter combinations, then returns the best-performing pipeline.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados