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

Issue handling sensitive correlations #181

Open
1 task done
nagrawal2-sc opened this issue May 28, 2024 · 0 comments
Open
1 task done

Issue handling sensitive correlations #181

nagrawal2-sc opened this issue May 28, 2024 · 0 comments
Labels
bug Something isn't working. status:triage

Comments

@nagrawal2-sc
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When trying to use the function sensitive.find_sensitive_correlations where one of the columns being tested is a string, it would still still try to calculate pearson correlation and returns an error.

Expected Behavior

To calculate spearman or kendall correlation.

Steps To Reproduce

import pandas as pd
import fairlens as fl
col_names = ["gender", "nationality", "random", "corr1", "corr2"]
data = [
    ["woman", "spanish", 715, "w", 20],
    ["man", "spanish", 1008, "m", 20],
    ["man", "french", 932, "m", 10],
    ["woman", "french", 1300, "w", 10],
       ] 
df = pd.DataFrame(data, columns=col_names)    
fl.sensitive.find_sensitive_correlations(df)

Environment

- OS:
- python: 3.9

Anything else? Screenshots?

No response

@nagrawal2-sc nagrawal2-sc added bug Something isn't working. status:triage labels May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. status:triage
Projects
None yet
Development

No branches or pull requests

1 participant