1. Learn
  2. /
  3. Courses
  4. /
  5. Natural Language Processing (NLP) in Python

Connected

Exercise

Comparing models on labeled review data

Now that you can classify sentiment in bulk, your team wants to evaluate which model is more reliable. You'll compare two models using a larger labeled dataset of reviews and measure their accuracy.

A texts list and its true_labels are pre-loaded for you.

Instructions 1/2

undefined XP
    1
    2
  • Load two pipelines (pipe_a and pipe_a) using the models "distilbert-base-uncased-finetuned-sst-2-english" and "abilfad/sentiment-binary-dicoding", respectively.
  • Extract the 'label' values from the predictions of both pipelines.