Reader small image

You're reading from  Active Machine Learning with Python

Product typeBook
Published inMar 2024
PublisherPackt
ISBN-139781835464946
Edition1st Edition
Right arrow
Author (1)
Margaux Masson-Forsythe
Margaux Masson-Forsythe
author image
Margaux Masson-Forsythe

Margaux Masson-Forsythe is a skilled machine learning engineer and advocate for advancements in surgical data science and climate AI. As the Director of Machine Learning at Surgical Data Science Collective, she builds computer vision models to detect surgical tools in videos and track procedural motions. Masson-Forsythe manages a multidisciplinary team and oversees model implementation, data pipelines, infrastructure, and product delivery. With a background in computer science and expertise in machine learning, computer vision, and geospatial analytics, she has worked on projects related to reforestation, deforestation monitoring, and crop yield prediction.
Read more about Margaux Masson-Forsythe

Right arrow

Handling model-label disagreements

Disagreements between model predictions and human labels are inevitable. In this section, we will study how to identify and resolve conflicts.

Programmatically identifying mismatches

To identify discrepancies between the model’s predictions and the human-annotated labels, we can write some simple Python code that highlights the mismatches for review.

Let’s consider the example of an NLP sentiment classifier. This type of classifier is designed to analyze and understand the sentiment or emotions expressed in text. By examining the words, phrases, and context used in a given piece of text, an NLP sentiment classifier can determine whether the sentiment is positive, negative, or neutral. First, we will use the sentiment-analysis model from Huggingface:

sentiment_pipeline = pipeline("sentiment-analysis")
data = ["I love you", "I hate you"]
sentiment_pipeline(data)

The returns the following output...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Active Machine Learning with Python
Published in: Mar 2024Publisher: PacktISBN-13: 9781835464946

Author (1)

author image
Margaux Masson-Forsythe

Margaux Masson-Forsythe is a skilled machine learning engineer and advocate for advancements in surgical data science and climate AI. As the Director of Machine Learning at Surgical Data Science Collective, she builds computer vision models to detect surgical tools in videos and track procedural motions. Masson-Forsythe manages a multidisciplinary team and oversees model implementation, data pipelines, infrastructure, and product delivery. With a background in computer science and expertise in machine learning, computer vision, and geospatial analytics, she has worked on projects related to reforestation, deforestation monitoring, and crop yield prediction.
Read more about Margaux Masson-Forsythe