Introduction to ML .NET

25 October 2021 at 10:00 by ParTech Media - Post a comment

ML.NET, a free, cross-platform, and open-source machine learning framework, was primarily designed to bring the power of Machine Learning to.NET applications for a variety of use cases. This included sentiment analysis, price prediction, image classification, and more. It was publicly released at the Build conference in May 2018.

Microsoft released ML.NET 1.0 a year later at Build 2019, which brought additional capabilities and tools to make training bespoke ML models even easier for .NET developers.

This post captures everything you need to know about ML.NET, including its benefits.

Table of contents

  1. What is ML.NET?
  2. What can you do with ML.NET?
  3. What is so special about ML.NET?
  4. Conclusion

What is ML.NET?

Python is a popular language for machine learning and data science because of its ease of use and abundance of modules and frameworks.

Data Scientists prefer to train their models in Python using various machine learning frameworks such as TensorFlow, Scikit Learn, and others. Application developers, on the other hand, prefer to utilize programming languages such as C# and Java to integrate and consume such models.

As a result, delivering ML Models to production in a smooth manner has become a pain point for many enterprises (due to the discrepancies between the above technologies and frameworks).

Microsoft's solution to this problem is ML.NET. It lets .NET developers create, train, and consume bespoke machine learning models while remaining within the.NET environment. Both C# and F# are currently supported by ML.NET. Since ML.NET is cross-platform, it works on Mac OS X, Linux, and Windows. You can quickly put your custom ML model into production using ML.NET.

What can you do with ML.NET?

The sky is the limit with ML.NET when it comes to creating world-class AI models and applications based on a variety of use cases. Some of the areas where ML.NET is widely used include -

  • Sentiment Analysis
  • Spam Detection
  • Fraud Detection
  • Product/Movie Recommendation
  • Price Prediction
  • Sales Forecasting
  • Anomaly Detection (Credit Card Fraud)
  • Image Classification Training
  • Object Detection

What is so special about ML.NET?

Model Builder is a sophisticated tooling mechanism included with ML.NET. It uses Automated ML (or AutoML) to simplify the model-building process. It makes it very simple for developers to get their models up and running by simply inputting data. The rest of the model-building process, including the code creation for consuming those models, is handled by AutoML. It also enables you to use popular machine learning frameworks such as TensorFlow and ONNX to consume models in.NET using ML.NET.

Since ML.NET is a free and open-source framework (similar in autonomy and context to other.NET frameworks such as Entity Framework, ASP.NET, or even.NET Core), you can use it in any.NET application, as shown in Figure. It includes web apps and services (ASP.NET MVC, Razor Pages, Blazor, Web API), desktop programs (WPF, WinForms).

This means that ML.NET models can be created and consumed on-premises or in the cloud, such as Microsoft Azure. Furthermore, since ML.NET is cross-platform, you may use it on any operating system such as Windows, Linux, and macOS. You may even utilize ML.NET on Windows to integrate AI/ML into your existing.NET applications using the traditional.NET Framework.

This also applies to offline scenarios; ML.NET models can be trained and consumed in offline settings such as desktop applications (WPF and WinForms) or any other offline .NET application (excluding ARM processors, which are currently not supported).

NimbusML Python bindings are also available from ML.NET. If your enterprise has data scientists who are more proficient in Python, they can use NimbusML to develop ML.NET models in Python. They can then consume this in their production end-user .NET applications while running as native .NET.

Data scientists and Python developers acquainted with scikit-learn estimators and transforms, as well as other popular Python libraries like NumPy and Pandas, will feel at ease utilizing NimbusML to create/train ML.NET models that can run natively in .NET apps.

Conclusion

ML.NET is a fantastic platform for any.NET developer who wants to work with machine learning. Microsoft has now made it very easy for .NET Developers who are hesitant to learn Python to build machine learning apps by using their existing .NET and access to libraries. However, ML.NET makes no attempt to sway python enthusiasts and data scientists away from it. In fact, it enables Python application developers to incorporate pre-trained models (for instance, you can train the model using PyTorch and export it to ONNX format, which can then be consumed in .NET using ML.NET).

Latest