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

Numerical Privacy Metrics should support NaN values #58

Open
fealho opened this issue Mar 26, 2021 · 0 comments
Open

Numerical Privacy Metrics should support NaN values #58

fealho opened this issue Mar 26, 2021 · 0 comments
Labels
bug Something isn't working data:single-table Related to tabular datasets

Comments

@fealho
Copy link
Member

fealho commented Mar 26, 2021

NaN values should be supported by numerical privacy metrics, but currently it raises ValueError: Input contains NaN, infinity or a value too large for dtype('float64').

The code below reproduces this issue:

import pandas as pd
from sdmetrics.single_table.privacy import NumericalLR

data = pd.DataFrame({
    'key': [1, 2, None],
    'sensitive': [1, 2, 3]
})

privacy_metric = NumericalLR.compute(
    data,
    data, 
    key_fields=['key'],
    sensitive_fields=['sensitive']
)

print(privacy_metric) # this will print nan
@fealho fealho added the internal The issue doesn't change the API or functionality label Mar 26, 2021
@csala csala added new feature and removed internal The issue doesn't change the API or functionality labels Sep 6, 2021
@npatki npatki added bug Something isn't working data:single-table Related to tabular datasets and removed new feature labels Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data:single-table Related to tabular datasets
Projects
None yet
Development

No branches or pull requests

3 participants