Have you tried ML.NET?
It's a new machine learning framework made specifically for .NET developers.

ML.NET Tutorial - Get started in 10 minutes

Train your model

Now you will train your model with the wikipedia-detox-250-line-data.tsv dataset.

Model Builder evaluates many models with varying algorithms and settings to give you the best performing model.

Leave the Time to train, the amount of time you would like Model Builder to explore various models, as 10 seconds. Note that for larger datasets, you should set a longer training time.

Select Start Training to start the training process.

Progress

You can keep track of the progress of model training in the Progress section.

  • Status - This shows you the status of the model training process; this will tell you how much time is left in the training process and will also tell you when the training process has completed.
  • Best accuracy - This shows you the accuracy of the best model that Model Builder has found so far. Higher accuracy means the model predicted more correctly on test data.
  • Best algorithm - This shows you which algorithm performed the best so far during Model Builder's exploration.
  • Last algorithm - This shows you the last algorithm that was explored by Model Builder.

After model training finishes, go to the Evaluate step.

In your terminal, run the following command (in your myMLApp folder):

Terminal
mlnet auto-train --task binary-classification --dataset "wikipedia-detox-250-line-data.tsv" --label-column-name "Sentiment" --max-exploration-time 10

What do these commands mean?

The mlnet auto-train command runs ML.NET with AutoML to explore many iterations of models with varying combinations of data transformations, algorithms, and algorithm options and then chooses the highest performing model.

  • --task: You must specify the ML task, which in this case is binary classification.
  • --dataset: You choose wikipedia-detox-250-line-data.tsv as the dataset (internally, the CLI will split the one dataset into training and testing datasets).
  • --label-column: You must specify the target column you want to predict (or the Label). In this case, you want to predict the Sentiment, which is in the first column (index 0).
  • --max-exploration-time: You must also specify the amount of time you would like the ML.NET CLI to explore the different models, in this case 10 seconds. Note that for larger datasets, you should set a longer training time.

Progress

While the ML.NET CLI is exploring different models, the progress bar will indicate how much time is left in the training process. As new models are explored, the Best Accuracy, Best Algorithm, Last Algorithm, and time duration will change.

  • Best accuracy - This shows you the accuracy of the best model so far. Higher accuracy means the model predicted more correctly on test data.
  • Best algorithm - This shows you which algorithm has performed the best so far.
  • Last algorithm - This shows you the last algorithm that was explored.
Continue