-
Notifications
You must be signed in to change notification settings - Fork 196
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
Diffprivlib v0.3 #18
Diffprivlib v0.3 #18
Conversation
This pull request introduces 1 alert when merging a0bd2fa into 17cb421 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see my comments please - hope they make sense. I'll approve in the meanwhile, you can go ahead with Stefano's review once you're happy with mine. Cheers!
@naoise-h I left you a bunch of comments, and approved. But first, please ask @stefano81 for his review first, before merging. Thanks!! |
- Naive Bayes error message consistency - Correct reading of bounds from data in PCA - None no longer permitted as input to check_bounds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, check the comments.
- Parenthesis in Vector mechanism to enhance readibility - Explaining use of new accountant in StandardScaler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The PR updates Diffprivlib to version 0.3. This update includes a number of new additions, as well as various fixes to existing functionality. This version of diffprivlib supports Python 3.5 through 3.8.
The updates are summarised as follows.
Added
BudgetAccountant
class to keep track of privacy budget spent in a script (and associated notebook).Budget
class to allow easy comparison (with<
,>
, etc) between privacy budgets of the form(epsilon, delta)
.count_nonzero
,sum
andnansum
functions to calculate a differentially private count and sum on an array or list.GaussianDiscrete
mechanism, the discrete analogue to the popular Gaussian mechanism.clip_to_bounds
andclip_to_norm
to clip input data to the given bounds/norm; used in tools and models as appropriate.Changed
Breaking:
bounds
parameter passed to tools and models has changed; it is now specified as a tuple of the form(min, max)
.min
andmax
can be scalars or 1-dimensional arrays.Bounds can typically be converted to the new form with
new_bounds = ([l for l, _ in bounds], [u for _, u in bounds])
.range
parameter now requiresbounds
instead (e.g.models.LinearRegression
,models.StandardScaler
,tools.mean
, etc.).Non-breaking:
Geometric
mechanism now has defaultsensitivity=1
.This reflects the typical use of the geometric mechanism on count queries with sensitivity 1.Fixed
models.GaussianNB
now satisfy differential privacy. Theclass_count_
attribute is therefore noisy, and care must be taken in relying on these values for testing or other purposes.mean
,std
andvar
tools, and theirNaN
equivalents, no longer require numpy array inputs, and can take all array-like inputs (e.g. scalars, lists and tuples).var
output.Note: Although backward compatibility is broken by this release, I propose not incrementing the major version number to reflect the library's overall beta development status.