Back

Thursday, 10 August 2023 | 16:08 | Author by Arif Madya

Get to know ML .NET: Machine Learning Framework from Microsoft

The phenomenon of AI (artificial intelligence) is getting more and more popular these days. With the introduction of Chat GPT some time ago, AI has become a very popular technology. Of course, AI technology cannot be separated from the role of machine learning behind it.

Quoting from the Microsoft website, AI is a branch of computing that involves training computers to do things that normally require human intelligence. Machine learning is a subset of AI that involves computers learning from and finding patterns in data so they can then make predictions in new data themselves.

ML .NET is an open-source and cross-platform machine learning framework developed by Microsoft for .NET developers. This framework enables developers to easily build and integrate machine learning models into their .NET applications. In this article, we will discuss the introduction of ML .NET, what ML .NET can do, implementation examples, and reasons why to use ML. NET.


Introduction to ML.NET


ML.NET 1.0. Source: devblogs.microsoft.com


ML.NET was introduced by Microsoft for the first time in May 2018. Now, Microsoft has officially introduced two versions of ML .NET, namely: ML .NET version 1.0 in May 2019 and and ML .NET version 2.0 in November 2022.

ML.NET allows us to train, build, and ship custom machine learning models using C# or F# for a variety of machine learning scenarios. ML.NET includes features such as automated machine learning (AutoML) and tools such as the ML.NET CLI and ML.NET Model Builder, which make it easier to integrate machine learning into our applications.


What Can ML .NET Do?

Machine learning is a technology that has been growing rapidly in recent years. Many companies use machine learning to process and analyze data for useful information. With ML .NET, we can do many things, from sentiment analysis, and object detection, to price prediction. Here are some things that can be done with ML .NET:

  • Sentiment analysis - Analyze sentiment from customer reviews using a binary classification algorithm.
  • Product recommendations - Recommend products based on purchase history using a matrix factorization algorithm.
  • Price prediction - Predict taxi fares based on parameters such as mileage using a regression algorithm.
  • Customer segmentation - Identify customer groups with similar profiles using clustering algorithms.
  • Object detection - Recognizes objects in images using the ONNX deep learning model.
  • Fraud detection - Detects fraudulent credit card transactions using a binary classification algorithm.
  • Sales spike detection - Detect spikes and changes in product sales using an anomaly detection model.
  • Image classification - Classify images (for example, broccoli vs pizza) using TensorFlow deep learning models.
  • Sales forecast - Estimate future product sales using a regression algorithm.


The example implementation of ML .NET

Image classification and object detection


Image classification and object detection. Source: learn.microsoft.com


Image classification is used to identify images from different categories. For example, different types of terrain or animals, etc. We can also use an image classification scenario if we have a group of images, and want to classify the images into different categories.

Meanwhile, object detectors are used to find and categorize entities in images. For example, finding and identifying cars and people in pictures. Object detection finds and categorizes entities in images. Object detection models are generally trained using deep learning and neural networks. Object detectors can be used when an image contains multiple objects of different types. This model can also be used in: Self-Driving Cars, Robotics, Face detection, Workplace Security, Object Counting, etc.


Sentiment Analysis


Sentiment analysis. Source: codemag.com


With ML .NET we can make sentiment predictions from the words we write. For example, we will create an application that predicts whether a comment is positive or negative. With this application, we can find out whether every comment given to us is a positive comment or a negative comment.


Why Use ML.NET?

Machine learning has become a powerful tool in a variety of industries, revolutionizing the way we solve complex problems and make data-driven decisions. Among various machine learning frameworks, ML .NET can be a reliable and tested choice. In this article, we will also explore the compelling reasons why ML .NET stands out from its competitors and can be the choice for developing machine learning applications.


  • Trusted and proven at scale
    ML .NET uses the same ML framework used by well-known Microsoft products such as Power BI, Microsoft Defender, Outlook, and Bing.
  • Custom ML with AutoML
    ML.NET offers a Model Builder (a simple UI tool) and the ML.NET CLI to make it easy to build Custom ML Models. This tool uses Automated ML (AutoML), which automates the process of creating the best-performing models for machine learning scenarios.
  • Supports TensorFlow & other ML frameworks
    ML.NET has been designed as an extensible platform so that we can use other popular ML frameworks (TensorFlow, ONNX, Infer.NET, and others) and have access to more machine learning scenarios, such as image classification, object detection, and more.
  • High performance and accuracy


    ML .NET performance compared to other frameworks. Source: dotnet.microsoft.com

    When running a test using a 9GB Amazon review dataset, ML.NET trained a sentiment analysis model with 95% accuracy results. ML .NET is ahead of other popular machine learning frameworks, which fail to process data sets due to memory errors. Compared to other frameworks, ML.NET shows the highest speed and accuracy.


Conclusion

ML .NET is a fairly popular machine learning framework from Microsoft. This framework enables developers to create and develop machine learning applications using C# or F# on the .NET platform. ML .NET has many advantages and features, including cross-platform capability, open-source, high performance, and many other features. This framework also supports the development of various types of machine-learning models. By using ML .NET, developers can easily develop and implement machine learning applications on the .NET platform.

Radya Digital is a company that uses ML .NET to develop AI-based applications such as facial recognition-based attendance machine applications, etc. For further consultation in making applications using ML.NET, please contact our team at this link.


Source:

What is ML.NET? (dotnet.microsoft.com)

ML. NET | Machine learning made for .NET (dotnet.microsoft.com)

Announcing ML.NET 1.0 (devblogs.microsoft.com)

Announcing ML.NET 2.0 (devblogs.microsoft.com)

Apa itu ML.NET dan bagaimana cara kerjanya? (learn.microsoft.com)

ML.NET: Machine Learning for .NET Developers (codemag.com)