Mark Farragher
Mar 14 · 2 min read

I’ve been playing around with NET Core v3 and the ML.NET machine learning framework.

And let me tell you, this stuff is awesome!

NET Core is really cool all by itself. It’s the multi-platform version of the NET framework: it runs on Windows, OS/X, and Linux. I’m running it directly on my Mac right now without using my Windows 10 virtual machine.

And ML.NET is Microsoft’s new machine learning library. It can run linear regression, logistic classification, clustering, deep learning, and many other machine learning algorithms.

ML.NET is a first-class NET library. There’s no need to use Python, you can easily tap into this library using any NET language, including C#.

Microsoft is pouring all their effort into ML.NET right now. This is going to be their go-to solution for all machine learning in NET going forward.

And it’s super easy to use. Watch this:

I built a simple classifier and trained it on a dataset of botanical data. My code loads a CSV file with the exact dimensions of Iris flower petal sizes, and uses it to train the model to correctly identify the type of each flower.

Here’s the code:

See how easy it is?

ML.NET uses the concept of a pipeline to string data-loading, transformation, and learning stages together into a single machine learning sequence. All I need to do at the end is call the Fit() method to train the machine learning model on the data.

And did you notice I’m not using Visual Studio?

You’re looking at Visual Studio Code, a lightweight multi-platform code editor that runs on Windows, OS/X, and Linux.

Building and running machine learning apps in VS Code is a piece of cake, and I can do it directly on my Mac. Again, I’m not touching my Windows VM.

Here’s my code running in the VS Code debugger. It has correctly identified my test flower as an Iris-Virginica:

So what do you think of my setup?

Are you planning on writing C# machine learning apps with NET Core v3 and ML.NET?

Add a comment and let me know!

The Machine Learning Advantage

Learn the basics of computer vision and machine learning without any complex math! Lots of C# examples and a tiny bit of Python.

Mark Farragher

Written by

I help C# developers learn Computer Vision and Machine Learning in 6 weeks without requiring complex math or Python | https://www.machinelearningadvantage.com

The Machine Learning Advantage

Learn the basics of computer vision and machine learning without any complex math! Lots of C# examples and a tiny bit of Python.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade