Fix BoundedStandardDeviation test#153
Merged
chinmayshah99 merged 1 commit intoOpenMined:devfrom May 24, 2020
replomancer:test_fix
Merged
Fix BoundedStandardDeviation test#153chinmayshah99 merged 1 commit intoOpenMined:devfrom replomancer:test_fix
chinmayshah99 merged 1 commit intoOpenMined:devfrom
replomancer:test_fix
Conversation
| assert type(result) is float | ||
| assert lower_bound <= result <= upper_bound | ||
| assert type(result) is float and result >= 0 | ||
| assert result <= (upper_bound - lower_bound) / 2 |
Member
There was a problem hiding this comment.
Is this again based on Popoviciu's inequality ?
Member
Author
There was a problem hiding this comment.
I don't know what's the usual proof, but here's how you can derive it from Popoviciu's inequality on variances (I probably made it too complicated):
σ2 ≤ 1/4 (M - m)2
0 ≤ (1/2 (M - m))2 - σ2 # a2 - b2 = (a + b)(a - b)
0 ≤ (1/2 (M - m) + σ) (1/2 (M - m) - σ) # divide by (1/2 (M - m) + σ) which is ≥ 0 because M ≥ m and σ ≥ 0
0 ≤ 1/2 (M - m) - σ
σ ≤ 1/2 (M - m)
Member
There was a problem hiding this comment.
I suspected that; just wanted to verify
chinmayshah99
approved these changes
May 24, 2020
dvadym
pushed a commit
to dvadym/PyDP
that referenced
this pull request
Jul 3, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The test I've recently written for BoundedStandardDeviation made zero sense mathematically 🐛 There was an inequality satisfied only by accident.
Type of change