You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And vice-versa. Currently if the wrong datatype is passed it will simply return nan. It should raise an error instead.
Below is code to reproduce this phenomena:
importpandasaspdfromsdmetrics.single_table.privacyimportCategoricalCAPdata=pd.DataFrame({ # data containing only numerical values'key': [1.4, 10.12, 3.4],
'sensitive': [10.9, 9.8, 8.8]
})
score=CategoricalCAP.compute( # privacy metric that's supposed to only work with categorical valuesdata,
data,
key_fields=['key'],
sensitive_fields=['sensitive']
)
print(score) # this will print `nan`
The text was updated successfully, but these errors were encountered:
csala
changed the title
Numerical data passed to a categorical privacy metric should raise and error
Numerical data passed to a categorical privacy metric should raise an error
Sep 6, 2021
And vice-versa. Currently if the wrong datatype is passed it will simply return
nan
. It should raise an error instead.Below is code to reproduce this phenomena:
The text was updated successfully, but these errors were encountered: