diff --git a/docs/machine-learning/automate-training-with-model-builder.md b/docs/machine-learning/automate-training-with-model-builder.md index 62c110b9a7887..07b04a20d09dd 100644 --- a/docs/machine-learning/automate-training-with-model-builder.md +++ b/docs/machine-learning/automate-training-with-model-builder.md @@ -1,7 +1,7 @@ --- title: What is Model Builder and how does it work? description: How to use the ML.NET Model Builder to automatically train a machine learning model -ms.date: 06/01/2020 +ms.date: 07/11/2020 ms.custom: overview, mlnet-tooling #Customer intent: As a developer, I want to use Model Builder to automatically train a model using a visual interface. --- @@ -13,11 +13,25 @@ Model Builder uses automated machine learning (AutoML) to explore different mach You don't need machine learning expertise to use Model Builder. All you need is some data, and a problem to solve. Model Builder generates the code to add the model to your .NET application. -![Model Builder Visual Studio extension user interface animation](media/ml-dotnet-model-builder.gif) +![Model Builder Scenarios](./media/model-builder-scenarios.png#lightbox) > [!NOTE] > Model Builder is currently in Preview. +## Creating a Model Builder Project + +When you first start up Model Builder it will ask for you to name the project. This will create an `mbconfig` configuration file inside of the project. + +The `mbconfig` file keeps track of everything you do in Model Builder to allow you to reopen the session. + +After training, three files are generated under the *.mbconfig file: + +- **Model.consumption.cs:** This file contains the `ModelInput` and `ModelOutput` schemas as well as the `Predict` function generated for consuming the model. +- **Model.training.cs:** This file contains the training pipeline (data transforms, algorithm, algorithm hyperparameters) chosen by Model Builder to train the model. You can use this pipeline for re-training your model. +- **Model.zip:** This is a serialized zip file which represents your trained ML.NET model. + +When you create your `mbconfig` file, you're prompted for a name. This name is applied to the consumption, training, and model files. In this case, the name used is _Model_. + ## Scenario You can bring many different scenarios to Model Builder, to generate a machine learning model for your application. @@ -98,7 +112,7 @@ Once you have chosen your scenario, Model Builder asks you to provide a dataset. ![Diagram showing Model Builder steps](media/model-builder-steps.png) -Model Builder supports datasets in .tsv, .csv, .txt formats, as well as SQL database format. If you have a .txt file, columns should be separated with `,`, `;` or `/t` and the file must have a header row. +Model Builder supports datasets in .tsv, .csv, .txt formats, as well as SQL database format. If you have a .txt file, columns should be separated with `,`, `;` or `\t`. If the dataset is made up of images, the supported file types are `.jpg` and `.png`. @@ -217,11 +231,14 @@ If your model performance score is not as good as you want it to be, you can: - Balance your data. For classification tasks, make sure that the training set is balanced across the categories. For example, if you have four classes for 100 training examples, and the two first classes (tag1 and tag2) are used for 90 records, but the other two (tag3 and tag4) are only used on the remaining 10 records, the lack of balanced data may cause your model to struggle to correctly predict tag3 or tag4. -## Code +## Consume After the evaluation phase, Model Builder outputs a model file, and code that you can use to add the model to your application. ML.NET models are saved as a zip file. The code to load and use your model is added as a new project in your solution. Model Builder also adds a sample console app that you can run to see your model in action. -In addition, Model Builder outputs the code that generated the model, so that you can understand the steps used to generate the model. You can also use the model training code to retrain your model with new data. +In addition, Model Builder gives you the option to create projects that consume your model. Currently, Model Builder will create the following projects: + +- **Console app:** Creates a .NET Core console applications to make predictions from your model. +- **Web API:** Creates an ASP.NET Core Web API that lets you consume your model over the internet. ## What's next? diff --git a/docs/machine-learning/media/ml-dotnet-model-builder.gif b/docs/machine-learning/media/ml-dotnet-model-builder.gif deleted file mode 100644 index 521b5ea38407b..0000000000000 Binary files a/docs/machine-learning/media/ml-dotnet-model-builder.gif and /dev/null differ diff --git a/docs/machine-learning/media/model-builder-scenarios.png b/docs/machine-learning/media/model-builder-scenarios.png new file mode 100644 index 0000000000000..8c91b0b89c375 Binary files /dev/null and b/docs/machine-learning/media/model-builder-scenarios.png differ