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

Weighted proportions for overlaps 177801573 #280

Merged
merged 3 commits into from
Apr 19, 2021

Conversation

slobodan-ilic
Copy link
Contributor

Per ticket

* Change one overlaps fixture to include weighted counts alongside
  overlaps, to demonstrate the difference in z scores expectation
@coveralls
Copy link

coveralls commented Apr 19, 2021

Coverage Status

Coverage remained the same at 100.0% when pulling 7fc056e on weighted-proportions-for-overlaps-177801573 into f9b064f on master.

* Change how percentages are calculated for overlaps measures
* Use weighted counts instead of (unweighted) overlaps selected counts
* Prevent regression by changing a fixture and an expectation in a test
@slobodan-ilic slobodan-ilic force-pushed the weighted-proportions-for-overlaps-177801573 branch from 13f9f80 to 297a726 Compare April 19, 2021 12:20
Copy link
Contributor

@ernestoarbitrio ernestoarbitrio left a comment

Choose a reason for hiding this comment

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

Per comments

@@ -512,25 +512,29 @@ def test_pairwise_significance_mr_x_mr(self):
def test_pairwise_cat_x_mr_gender_x_all_pets_owned(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

I would use the suffix _weighted where it's needed in the test name. This way we understand that we are testing the cube with a weight

@@ -565,6 +566,7 @@ def p_vals(self):
[
[
_PairwiseSignificaneBetweenSubvariablesHelper(
self._cube_measures.weighted_cube_counts.weighted_counts,
Copy link
Contributor

Choose a reason for hiding this comment

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

what if weighted_counts is None? This is an optional cube measure and if it doesn't exists its value is None. Do we have a test that exercises this case?

* Add `weighted` to the test name
* Remove weighted counts from one fixture, to demonstrate that the
  overlaps column proportions calculation still works (defaults to
  weighted counts)
@slobodan-ilic slobodan-ilic merged commit 42695ce into master Apr 19, 2021
@ernestoarbitrio ernestoarbitrio deleted the weighted-proportions-for-overlaps-177801573 branch April 20, 2021 12:20
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

3 participants