OpenMined / PyDP

The Python Differential Privacy Library. Built on top of: https://github.com/google/differential-privacy
Apache License 2.0
506 stars 138 forks source link

How to execute a differentially private `Count` on a dataset of non-numeric values #375

Open nadavaviv opened 3 years ago

nadavaviv commented 3 years ago

Question

How can I use the pydp.algorithms.laplacian.Count object with a set of non-numeric values? When I try to use this object over an Input of ["A", "B", "C"] I get this output

TypeError: result(): incompatible function arguments. The following argument types are supported:
    1. (self: _algorithms.CountInt, arg0: List[int]) -> int

Invoked with: <_algorithms.CountInt object at 0x11285a1f0>, ['A', 'B', 'C']

Is there a way to execute this action?

Thanks