Challenge: Retraining a Machine Learning Model

Test yourself by implementing the code for retraining a machine learning model.

We'll cover the following

Using the coding playground at the end of this lesson, perform the tasks highlighted in the “Problem statement” section.

Problem statement

In the following playground, we have the ModelSavingExample.training.cs file with the code that allows us to train a sentiment analysis model. The entire training process is meant to be handled by the Train() method. However, the method is incomplete. You need to insert the correct sequence of method calls into it to make it train and save the model based on the yelp_labelled.txt file present in the project.

Then, once this method is populated, you need to call it from the Program.cs file. Since we don’t have a trained model in the project, you need to train the model first before we can consume it.

Get hands-on with 1400+ tech skills courses.