Skip to content

Module 4 TF-IDF - Mismatch between instructions and provided code in correlations section #39

Description

@jellomoat

LOCATION
TF-IDF_Lesson.ipynb
Using TF-IDF Correlations to Explore Biases

ISSUE
Mismatch between instructions and provided code. We need to update one of them (probably the code) to align with the other.

DETAIL
The instructions say:

We can use this new DataFrame to compare two concepts in our data. We will look for the columns of "husband" and "wife" – two concepts we expect to appear in this dataset, and that we could imagine being related to gender bias. We then sort the values of the resulting DataFrame based on the "wife" columns in descending order, and print the first 20 values.

But the provided code is:
corr[['husband','wife']].sort_values(by='husband',ascending=False)[:30]

We can fix this by replacing that line of code with:
corr[['husband','wife']].sort_values(by='wife',ascending=False)[:20]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions