ML.NET Tutorial - Get started in 10 minutes

Pick a scenario

To generate your model, you first need to select your machine learning scenario. Model Builder supports several scenarios:

Screenshot of the Select a scenario tab in Visual Studio showing the different scenarios supported in Model Builder.

Note: If the tutorial screenshots don't match with what you see, you may need to update your version of Model Builder. Go to Extensions > Manage Extensions to make sure that there are no available updates for Model Builder. The version used in this tutorial is 17.18.2.

In this case, you'll predict sentiment based on the content (text) of customer reviews.

  1. In the Model Builder Scenario screen, select the Data classification scenario, since you're predicting which category a comment falls into (positive or negative).

    Screenshot of Model Builder's data classification option.

  2. After selecting the Data classification scenario, you must choose your training environment. While some scenarios support training in Azure, Classification currently only supports local training, so keep the Local environment selected and move on to the Data step.

    Local training environment is selected in Model Builder.

To generate your model, you need to select your machine learning scenario.

There are several ML scenarios that are supported by the ML.NET CLI:

  • Classification - Use this when you want to predict which category data belongs in (for example, analyzing sentiment of customer reviews as either positive or negative).
  • Image classification - Use this when you want to predict which category an image belongs to (for example, predicting if an image is of a cat or a dog).
  • Regression (for example, value prediction) - Use this when you want to predict a numeric value (for example, predicting house price).
  • Forecasting - Use this when you want to forecast future values in a time-series (for example, forecast quarterly sales).
  • Recommendation - Use this when you want to recommend items to users based on historical ratings (for example, product recommendation).

In this case, you'll predict sentiment based on the content (text) of customer reviews, so you'll use classification.

Continue