In early May 2019, Microsoft released ML.Net 1.0, marking the graduation of ML.Net from a research project to a Release Candidate. In contrast with many machine learning platforms, which usually provide a Python API, ML.Net, as its name suggests, provides a direct interface for code targeting .Net core, whether written in C#, F#, Visual Basic, or any other .Net language. This does not mean, however, that ML.Net is isolated from the rest of the machine-learning world. For example, ML.Net can interface with Google's popular TensorFlow and write code for developing ONNX standards.
At present, ML.Net can be used to create code for x64 platforms. Since it only requires .Net core, ML.Net can run on Linus, Windows, or MacOS. There are some limitations to the functionality available in 32-bit platforms, but this hardly matters as 32-bit platforms are too limited to be taken seriously as machine learning development platforms. ML.Net cannot run on any Arm platform, meaning that ML.Net models cannot be deployed on most existing edge devices.
How does ML.Net differ from CNTK?
ML.Net provides several commonly used machine learning and data mining algorithms for regression and classification but does not come close to comprehensive coverage of this large and rapidly growing field. In contrast, CNTK remains true to the "C" in its name, the Cognitive Toolkit. The official name is Microsoft Cognitive Toolkit, but the simple acronym remains widely used. In addition, CNTK focuses on "deep learning" and provides sophisticated neural network algorithms. ML.Net is, therefore, the "wide" library covering many machine learning techniques, whereas CNTK is the deep neural network library.
Where is ML.Net Headed?
Although ML.Net is now a Release Candidate, the same is not valid for all the packages associated with ML.Net. Available packages that remain in the preview state include:
- TensorFlow components
- ONNX components
- TimeSeries components
- Recommendations components
It seems that Microsoft intends to improve ML.Net's coverage of machine learning by adding features commonly used by businesses and providing interoperability with other platforms like Google's TensorFlow.
ML.Net Model Builder
Just before the official release of ML.Net 1.0, Microsoft previewed ML.Net Model Builder, which provides a bit more insight into the direction Microsoft is taking ML.Net. Model Builder is a Visual Studio extension (you must have at least VS 2017) that automatically uses your data to evaluate potential algorithms for a machine-learning task. Once it chooses the algorithm it thinks is best, it automatically generates C# code to integrate that algorithm into a .Net project.
Readers familiar with Azure AutoML may note a resemblance. This is no coincidence; Model Builder is essentially the desktop version of ML.Net code implemented for Azure.
Machine learning and AI have enormous appetites for processor cycles, so the fundamental building blocks remain "close to the metal" and are written in C and C++. Undoubtedly, the Python APIs created to cement these building blocks together to create working systems will continue to be the most popular among developers shortly. However, Microsoft is determined that there be alternatives, including C# and F#, drag-and-drop options, and even new "automatic" ML alternatives.
Code your success by enrolling in one of our .NET and Visual Studio courses. Available In-Person, Online, or as Private Team Training!
This piece was originally posted Oct 12, 2021 and has been refreshed with updated links and formatting.