Article Complete
AIM
Understanding ML.NET And How .NET Developers & ML Enthusiasts Can Get Started With It
Understanding ML.NET And How .NET Developers & ML Enthusiasts Can Get Started With It

Understanding ML.NET And How .NET Developers & ML Enthusiasts Can Get Started With It

Published Updated

Key takeaways

  • ML.NET 1.0 is a newly open-sourced framework designed for machine learning developers by Microsoft.
  • The framework supports various stages of machine learning, including data pre-processing and operationalisation.
  • ML.NET has been integrated into several Microsoft products, enhancing their functionalities.
  • The release of ML.NET reflects a growing trend in the tech industry towards machine learning accessibility.
5 min
With Google, Facebook and now Microsoft releasing their tools, 2019 is already turning out to be a great year for the machine learning community. These releases clearly indicate the direction in which the tech industry is headed. From datasets to improve the models to new updates to optimise the hardware usage, AI pioneers are leaving no stone unturned. Last week Microsoft too has open sourced ML.NET 1.0, a new framework for machine learning developers. ML.NET has been under works at the research wing of Microsoft. The innovations have been put to use to their own products like Windows Defender, Microsoft Office (Powerpoint design ideas, Excel Chart recommendations), Azure Machine Learning, PowerBI. ML.NET is aimed at providing the end-end workflow for consuming ML into .NET apps across various steps of machine learning (pre-processing, feature engineering, modeling, evaluation and operationalization). ML.NET 1.0 provides the following key components:
  • Data Representation
  • ML tasks(classification, regression, anomaly detection etc)
  • Data featurization
Machine learning models were supposed to make life easier for the analysts and now even building these models as new frameworks are designed keeping AutoML in mind. Apart from the usual machine learning tasks, ML.NET also supports AutoML. For machine learning beginners, Microsoft developers suggest to start with the ML.NET Model Builder in Visual Studio and the ML.NET CLI on any platform.  The AutoML API is also very handy for scenarios where one can build models on the go.. With ML.NET Model builder adding machine learning to the apps is only a right-click away. [caption id="attachment_39060" align="alignnone" width="791"] Source: Microsoft[/caption]

ML At Command Line

Another tool ML.NET CLI (command-line interface) is also introduced which allows for generating ML.NET Models using AutoML and ML.NET. The ML.NET CLI quickly iterates through the dataset for a specific ML Task (currently supports regression and classification) and produces the best model. The CLI in addition to producing the best model also allows users to generate model training and model consumption code for the best performing model. ML.NET CLI is cross-platform and is an easy add-on to the .NET CLI. The Model Builder Visual Studio extension also uses ML.NET CLI to provide model builder capabilities. Installing the ML.NET CLI : dotnet tool install -g mlnet Here is a code snipped on taxi fare prediction using regression Loading datasets IDataView trainingDataView = mlContext.Data.LoadFromTextFile(TrainDataPath, hasHeader: true); IDataView testDataView = mlContext.Data.LoadFromTextFile(TestDataPath, hasHeader: true); Running AutoML binary classification ExperimentResult experimentResult = mlContext.Auto()    .CreateRegressionExperiment(ExperimentTime)     .Execute(trainingDataView, LabelColumnName, progressHandler: new RegressionExperimentProgressHandler()); Model Evaluation ITransformer model = experimentResult.BestRun.Model; and evaluate its quality on a test dataset that was not used in training (taxi-fare-test.csv). Regression.Evaluate()  calculates the difference between known fares and values predicted by the model to produce various metrics. var predictions = trainedModel.Transform(testDataView); var metrics = mlContext.Regression.Evaluate(predictions, scoreColumnName: "Score"); Create prediction engine var predEngine = mlContext.Model.CreatePredictionEngine(model); Calculating Score var predictedResult = predEngine.Predict(taxiTripSample); Know more about applications of ML.NET here  
Membership

Stay ahead with AI insights.

Unlimited access to premium articles, exclusive analysis, and the stories shaping India's AI economy.

Subscribe now

AIM Americas

1190 Miraloma Way Suite P, Sunnyvale, CA 94085

AIM India

1st Floor, Sakti Statesman, Bellandur, Bengaluru – 560103

© 2026 AIM. All rights reserved.