OpenMined / PyDP

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

Laplace Mechanism Global DP for SKLearn Pipeline #395

Open grilhami opened 2 years ago

grilhami commented 2 years ago

Feature Description

Enabling the use of Laplace Mechanism for Local DP in SKLean Pipeline. This should be in the form of an "operator" that should be inserted between the layers in SKLearn's Pipeline class.

This is the Global DP Version of the already existing Laplace Mechanism extension for Local DP.

Additional Context

Current development for the SKLean Pipeline is in branch feature/machine-learning-1.

Preferably, the name of the "operator" imported from PyDP should be called LaplaceMechanism. The use should be as seamless and convenient as possible in SKLearn's Pipeline class. For example:

pipe = Pipeline([
    ('scaler', StandardScaler()),
    ('nb', GaussianNB()),
    ('laplace', LaplaceMechanism()),
])

For more examples, please have look at the notebook example of Laplace Mechanism's implementation.

As starting guidance, please refer to the source code for LaplaceMechanism in here.

Note: The examples mentioned above are for Local DP. Laplace Mechanism's LocalDP implementation should provide a good starting point to figure out the Global DP's version.

ndcroos commented 1 year ago

Hi, I'd like to work on this. Can you assign it to me?