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
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:
importpandasaspdfromsdmetrics.single_table.privacyimportNumericalLRdata=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
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: