-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Create Linf contribution bounder analysis #532
Conversation
analysis/contribution_bounders.py
Outdated
def __init__(self, partitions_sampling_prob: float): | ||
def __init__(self, | ||
partitions_sampling_prob: float, | ||
perform_cross_partition_contribution_bounding: bool = True): |
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.
why do we need this param if we have LinfAnalysisContributionBounder
? If it is false then it is the smae as LinfAnalysisContributionBounder
.
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.
Thanks, this is leftover of 1st approach that I though (with 1 class, instead of 2)
bound_result = self._run_contribution_bounding(input, | ||
aggregate_fn=lambda x: x) | ||
|
||
expected_result = [(('pid1', 'pk2'), (2, 7, 1, 2)), |
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.
Why (2, 7, 1, 2)
if pk2
has only 3 and 4 values contributed?
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.
Added comment
# the output format:
# (count_per_partition, sum_per_partition,
# num_partition_contributed_per_privacy_id,
# num_contribution_per_privacy_id)
# Since no cross-partition contribution, we consider that the privacy id
# contributes only to this partition, so
# num_partition_contributed_per_privacy_id = 1
# num_contribution_per_privacy_id = count_per_partition
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.
Thanks for review!
analysis/contribution_bounders.py
Outdated
def __init__(self, partitions_sampling_prob: float): | ||
def __init__(self, | ||
partitions_sampling_prob: float, | ||
perform_cross_partition_contribution_bounding: bool = True): |
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.
Thanks, this is leftover of 1st approach that I though (with 1 class, instead of 2)
bound_result = self._run_contribution_bounding(input, | ||
aggregate_fn=lambda x: x) | ||
|
||
expected_result = [(('pid1', 'pk2'), (2, 7, 1, 2)), |
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.
Added comment
# the output format:
# (count_per_partition, sum_per_partition,
# num_partition_contributed_per_privacy_id,
# num_contribution_per_privacy_id)
# Since no cross-partition contribution, we consider that the privacy id
# contributes only to this partition, so
# num_partition_contributed_per_privacy_id = 1
# num_contribution_per_privacy_id = count_per_partition
This is used for analysis w/o cross partition contribution bounding