#MLNET – API improvements in the new 0.6.0 version

A few days ago, the ML.Net team released the 0.6.0 version of Machine Learning.Net and one of the most important changes it’s on the way we use ML.Net API.

In my MLNet sessions I usually comment on a prediction scenario based on the Label of a person to see if it is a child, baby or teenager. All of this using a small set of data with information like name, age and gender.

As you can see from the previous image, my training data set has the columns Name, Age, Gender And Label. well, One important detail is that I also need 2 .Net classes with fields to represent the rows of My trainings Datasets and the expected Prediction.

In the 0.5.0 version of ML.Net the way of working was based on creating a pipeline with the following steps

Define the data model and load training data

Define the features and labels

Select a Trainer and train the model

The generated model allowed to make Predictions. The following example explains it in 20 Lines of code

With the 0.6.0 version, the way the API is used has changed a lot. The best thing at this point is to read the original post of Cesar De la Torre where he explains the novelties of this version (see references). However, I think leaving an example of the same code, adapted to version 0.6.0, will be good enough to share an idea of how flexible is the new API