Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Laplace Demo Notebook and add minimal README #404

Merged
merged 3 commits into from
Dec 18, 2021
Merged

Improve Laplace Demo Notebook and add minimal README #404

merged 3 commits into from
Dec 18, 2021

Conversation

SauravMaheshkar
Copy link
Contributor

Description

This PR is related to #312. Changes are minimal such as "beautification" of the Notebook by adding a TOC at the top, making some LaTeX equations bigger to make them more readable, deleting redundant code cells. I've also added a minimal README.md within the examples/laplace_demo/ dir.

Checklist

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@SauravMaheshkar
Copy link
Contributor Author

Request for Review @chinmayshah99

examples/laplace_demo/laplace.ipynb Show resolved Hide resolved
@@ -1,21 +1,21 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This language needs work.


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhmm 😅 I haven't actually changed any of this. But sure I'll look into this as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chinmayshah99 I've updated the conclusion section in da7990e. LMK if it looks okay.

Can we keep the existing part of the conclusion too as that is the technical summary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhm sure I'll add those back

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chinmayshah99 how does it look after 64ba683

Copy link
Member

@chinmayshah99 chinmayshah99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Language-specific issues.

@SauravMaheshkar
Copy link
Contributor Author

@chinmayshah99 I've updated the conclusion section in da7990e. LMK if it looks okay.

Copy link
Member

@chinmayshah99 chinmayshah99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@chinmayshah99 chinmayshah99 merged commit 3880e91 into OpenMined:dev Dec 18, 2021
chinmayshah99 added a commit that referenced this pull request May 17, 2022
* Added machine learning and mechanisms directory

* Added files for utils

Files include:

- acountant.py (for BudgetAccountant purposes)
- utils.py
- validation.py

* Directory change for machine learning & mechanism

Anything related to machine learning
and mechanism is located in the
"ml" directory

* Added function to check epsilon delta in validation.py

* Added function to check min max bounds in validation.py

* Added function to clip 2-d array to given maximum norm in validation.py

* Added function to clip 2-d array to given bounds in validation.py

* Added gunction to set global seed in utils.py

* Added function to copy docstring in ml/util/utils.py

* Added subclass Budget for privacy budgets epsilon delta

* Add class BudgetError for exceeded privacy budget error

* Added class for privacy leakage warning

* Added class for incompatible arguments PyDP

* Added function for warning incompitable argument

* Added class for budget accountant

The class added main goal is
to allocate privacy budget

* Added file as base for mechanism and add base class

* Added methods for base class

* Added class for truncated and folded mechanism

* Added files for laplace & geometric mechanism

* Added class as main laplace mechanism

* Added class for truncated laplacian

* Added class for folder laplacian

* Added class for main geometric mechanism

* Added class for truncated geometric

* Added file for naive bayes model with model class

* FIX: Move ml directory to src/pydp directory

* FEAT: Added LaplaceBoundedDomain class in laplce mechanism file

* Added folder that contains machine learning capabilities

* Apply Python and C++ styling

* Added type:ignored on unresolved imports

* Python formatting with Black after adding type:ignore

* Fix mypy test errors in ml directory

* Fix apply Python format with blac

* Add source link to ml directory files

* Removed extra special characters

* Added example notebook for Naive Bayes implementation

* Added Jupyter Notebook for PyDP NB comparison

* Moved matplotlib as dev dependincy

* change setup msbuild to version 1.0.2

* Test remove python 3.5 in Windows workflow

* Add back python 3.5 for Windows build

* Remove python-dp in docs/requirements.txt

* Change version to cehck build doc action

* conf.py in /docs append pydp build path

* Change ubuntu version for build docs action

* Change Python to 3.6 in build docs action

* Revert back ubuntu and Python versions

* Add pre-build-command in sphinx-action@master

* Fix pre-build-command syntax

* Change pre-build-comman for sphinx-action

* pre-build-command install software-properties-common

* Fix pre-build-command

* Fix pre-build-command

* Fix pre-build-command

* Change ubuntu version for build doc action

* Change Python Version to 3.8

* Removed test limited to dev branch. 

This test would run on all Pull requests now rather than just PR to dev. 
Other than that, tests are to be triggered if there's a change in ipynb too.

* Wrapper for numerical mechanism class [Continuation from #372] (#380)

* initial addition of partition selection

* corrected instantiation to 'builder.Build' instead

* build works, TODO: deal with passing Laplace/Gaussian mechanims builders

* post-review changes, moved partition selection python related code to own submodule

* fixed some formatting

* Added documentation

* post formatting

* added tests for partition selection

* moved imports for patition_selection

* clarified TODO dependency

* attempt to resolve linting issues

* * Added exports in algorithms.partition_selection
* Replaced the Create*PartitionStrategy functions with a template
function and instantiantions

* revert a to latest stable commit

* restore the correct commit for google-dp submodule

* added python bindings for numerical mechanisms

* added some python files

* fixed prereqs_linux.sh script

* saving changes

* build + tests work

* added docs for numerical mechanisms

* Fix Bazel build

Bazel failed to build since the name of the workspace was inconsistent
with the DP Library.  This commit also fixes the order in which we
install dependencies of the DP Lib.  Additionally, on Linux we used the
wrong compiler flags, which is now fixed in the .bazelrc.

* Revert "Fix Bazel build"

* Update README.md (#385)

* Update README.md

Changed "Currently supports Linux and macOS (Windows support coming soon)" to "Compatible with all three types of Operating Systems - Linux, macOS, and Windows"

* Update README.md

Changed "Currently supports Linux and macOS (Windows support coming soon)" to "Compatible with all three types of Operating Systems - Linux, macOS, and Windows"

* sha upgrade and added temporary fix for bazel reference

* upgraded SHA

* removal of functions and dependency in accordance with SHA upgrade

* fixed build file reference issue for test cases

* build file reference fix

* Made the system release ready

* Fixed the ubuntu version for google collab

* fixed the BUILD file naming

* c++ styling

* fixed the RC version

* Attempt to trigger the find replace in BUILD file

* added find replace in version scripts

* updated the release number to 1.1.1

* Fixed the bazel build absolute reference

* removed the temporary fix in the build actions

* fix

* fix

* Removing unused code (#400)

* clean-ups

* tiny fix

* format

* format c++

* Add support for categorical features for Laplace mechanism

* Clean-ups (#401)

Removing unused code and using c++ style guidelines

* Improve Laplace Demo Notebook and add minimal README (#404)

* Improve Laplace Demo NB and add minimal README

* Improve the Conclusion Section

* Add back the old conclusion

* Removed partial privacy budget +  Update Google C++ DP library to the latest commit and fix compilation errors (#405)

* update

* update

* remove unintended changed

* tests

* FIX: Change Google DP Commit Hash

* FEAT: SKLearn Laplace Mechanism use Google DP

Modifie the `LaplaceMechanism`class in
`/src/pydp/ml/mechanisms/sklearn_pipeline.py`
so that it uses `LaplaceDistribution` class
from Google DP`

* Fix typo in build-docs.yml

* FIX: Stling pythong and cpp

* FIX: Styling python and cpp

* FIX: Typo in build-docs.yml

* FIX: Changed clang-format version

* FIX: Try clang-format 12

* Update to the latest version of Google building block library (#415)

* remove privacy budget

* fixes

* fixes

* tests

* FIX: Change clang format action version

* Reset HEAD

Co-authored-by: Chinmay Shah <[email protected]>
Co-authored-by: Lev Zlotnik <[email protected]>
Co-authored-by: Christoph Dibak <[email protected]>
Co-authored-by: Abin (אבין ברגיס) <[email protected]>
Co-authored-by: FIRhinmay <[email protected]>
Co-authored-by: Vadym Doroshenko <[email protected]>
Co-authored-by: dvadym <[email protected]>
Co-authored-by: Saurav Maheshkar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants