Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jellomoat opened this issue Jul 10, 2024 · 0 comments

Comments

@jellomoat
Copy link
Member

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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant