All Projects → OpenMined → Pydp

OpenMined / Pydp

Licence: apache-2.0
A python wrapper for https://github.com/google/differential-privacy

Programming Languages

python
139335 projects - #7 most used programming language
cpp
1120 projects

Projects that are alternatives of or similar to Pydp

Gino
GINO Is Not ORM - a Python asyncio ORM on SQLAlchemy core.
Stars: ✭ 2,299 (+1191.57%)
Mutual labels:  hacktoberfest
Slack Scala Client
A scala library for interacting with the slack api and real time messaging interface
Stars: ✭ 176 (-1.12%)
Mutual labels:  hacktoberfest
Otoroshi
Lightweight api management on top of a modern http reverse proxy
Stars: ✭ 177 (-0.56%)
Mutual labels:  hacktoberfest
Data Structures And Algorithms In Cpp
This repository is in development phase and will soon provide you with c++ code of various data structures and algorithms
Stars: ✭ 176 (-1.12%)
Mutual labels:  hacktoberfest
Netflix Migrate
A command-line tool to migrate data to and from Netflix profiles
Stars: ✭ 175 (-1.69%)
Mutual labels:  hacktoberfest
Tamburetei
Fazendo de tamburete as cadeiras de [email protected]
Stars: ✭ 177 (-0.56%)
Mutual labels:  hacktoberfest
Image
Encoding and decoding images in Rust
Stars: ✭ 2,534 (+1323.6%)
Mutual labels:  hacktoberfest
Supabase Js
An isomorphic Javascript client for Supabase.
Stars: ✭ 176 (-1.12%)
Mutual labels:  hacktoberfest
Mattermost Android Classic
Mattermost app for Android phones and tablets
Stars: ✭ 176 (-1.12%)
Mutual labels:  hacktoberfest
Yarnhook
Run `yarn install`, `npm install` or `pnpm install` on git hooks automatically
Stars: ✭ 177 (-0.56%)
Mutual labels:  hacktoberfest
Antminer Monitor
Cryptocurrency ASIC mining hardware monitor using a simple web interface
Stars: ✭ 176 (-1.12%)
Mutual labels:  hacktoberfest
Availity Reactstrap Validation
Easy to use React validation components compatible for reactstrap.
Stars: ✭ 176 (-1.12%)
Mutual labels:  hacktoberfest
Externalsecret Operator
An operator to fetch secrets from cloud services and inject them in Kubernetes
Stars: ✭ 177 (-0.56%)
Mutual labels:  hacktoberfest
Gatsby Wordpress Themes
🎨 Gatsby WordPress Theme
Stars: ✭ 175 (-1.69%)
Mutual labels:  hacktoberfest
Yii2 Bootstrap
Yii 2 Bootstrap 3 Extension
Stars: ✭ 177 (-0.56%)
Mutual labels:  hacktoberfest
Ivre
Network recon framework, published by @cea-sec & @ANSSI-FR. Build your own, self-hosted and fully-controlled alternatives to Shodan / ZoomEye / Censys and GreyNoise, run your Passive DNS service, collect and analyse network intelligence from your sensors, and much more!
Stars: ✭ 2,331 (+1209.55%)
Mutual labels:  hacktoberfest
Shopyo
🎁 Your Open web framework, designed with big in mind. Flask with Django advantages. Build your management systems, ERP products & mobile backend (coming soon). Small business needs apps included by default. First timers friendly. Email: [email protected] | password: pass
Stars: ✭ 172 (-3.37%)
Mutual labels:  hacktoberfest
Nmf App
Understand and reduce your carbon footprint 🌱 iOS & Android.
Stars: ✭ 176 (-1.12%)
Mutual labels:  hacktoberfest
Midifile
A MIDI file parser/writer using ArrayBuffers
Stars: ✭ 177 (-0.56%)
Mutual labels:  hacktoberfest
React Otp Input
✔️ OTP Input Component for React
Stars: ✭ 177 (-0.56%)
Mutual labels:  hacktoberfest

Tests Version License

PyDP

In today's data-driven world, more and more researchers and data scientists use machine learning to create better models or more innovative solutions for a better future.

These models often tend to handle sensitive or personal data, which can cause privacy issues. For example, some AI models can memorize details about the data they've been trained on and could potentially leak these details later on.

To help measure sensitive data leakage and reduce the possibility of it happening, there is a mathematical framework called differential privacy.

In 2020, OpenMined created a Python wrapper for Google's Differential Privacy project called PyDP. The library provides a set of ε-differentially private algorithms, which can be used to produce aggregate statistics over numeric data sets containing private or sensitive information. Therefore, with PyDP you can control the privacy guarantee and accuracy of your model written in Python.

Things to remember about PyDP:

  • 🚀 Features differentially private algorithms including: BoundedMean, BoundedSum, Max, Count Above, Percentile, Min, Median, etc.
    • All the computation methods mentioned above use Laplace noise only (other noise mechanisms will be added soon! 😃)
  • 🔥 Currently supports Linux and macOS (Windows support coming soon 😃)
  • ⭐️ Use Python 3.x.

Installation

To install PyDP, use the PyPI package manager:

pip install python-dp

(If you have pip3 separately for Python 3.x, use pip3 install python-dp.)

Examples

Refer to the curated list of tutorials and sample code to learn more about the PyDP library.

You can also get started with an introduction to PyDP (a Jupyter notebook) and the carrots demo (a Python file).

Example: calculate the Bounded Mean

# Import PyDP
import pydp as dp
# Import the Bounded Mean algorithm
from pydp.algorithms.laplacian import BoundedMean

# Calculate the Bounded Mean
# Structure: `BoundedMean(epsilon: double, lower: int, upper: int)`
# `epsilon`: a Double, between 0 and 1, denoting the privacy threshold,
#            measures the acceptable loss of privacy (with 0 meaning no loss is acceptable)
# `lower` and `upper`: Integers, representing lower and upper bounds, respectively
x = BoundedMean(0.6, 1, 10)

# If the lower and upper bounds are not specified,
# PyDP automatically calculates these bounds
# x = BoundedMean(epsilon: double)
x = BoundedMean(0.6)

# Calculate the result
# Currently supported data types are integers and floats
# Future versions will support additional data types
# (Refer to https://github.com/OpenMined/PyDP/blob/dev/examples/carrots.py)
x.quick_result(input_data: list)

Learning Resources

Go to resources to learn more about differential privacy.

Support and Community on Slack

If you have questions about the PyDP library, join OpenMined's Slack and check the #lib_pydp channel. To follow the code source changes, join #code_dp_python.

Contributing

To contribute to the PyDP project, read the guidelines.

Pull requests are welcome. If you want to introduce major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

Apache License 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].