Challenge: Adding Fields to a Machine Learning Model

Test yourself by modifying the input data object for the 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 setup, we have a small sample of training data represented by the reviews_with_emotions.txt file in the TrainingData folder. Each line in this file represents a tab-delimited row of data. The first column represents a review of a product or service quality. The second column represents the emotion of the review. The third column represents the sentiment label.

However, the original model was trained by using a dataset with just one non-label column. Therefore, the autogenerated code is based on a different training set that only had one non-label column. You'll need to make changes to the code so it can accept both the review and the emotion as its input data. If you get stuck at any point, you can use the hint below:

Get hands-on with 1200+ tech skills courses.