Navigation Menu

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

check if there are no p values to correct #233

Merged
merged 4 commits into from Jul 31, 2018

Conversation

gbordyugov
Copy link
Contributor

This tries to handle the lack of p-value in a slightly more elegant way.

@gbordyugov gbordyugov changed the title check if there is no p values to correct check if there are no p values to correct Jul 27, 2018
@coveralls
Copy link

coveralls commented Jul 27, 2018

Coverage Status

Coverage increased (+0.02%) to 92.449% when pulling 44592ec on gbordyugov:division-by-zero-error into a5f834a on zalando:master.

:return: new critical value (i.e. the corrected alpha)
:rtype: float
"""
if not original_p_values:
Copy link
Contributor

Choose a reason for hiding this comment

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

A few challenges from me ;)

In which cases will we pass an empty list of p values here?
Did you discover this problem from a real experiment bug?
Do we want to raise an exception or just log the error?

Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shansfolder that's something that you explained to me: if there are statistical tests with too few samples, they're marked as invalid and the overall number of statistical tests is decreased. So if all statistical tests in a statistical test suite are invalid, we wind up with having zero statistical tests to analyse (and zero original p values).

I haven't thought know about the logging yet.

Copy link

Choose a reason for hiding this comment

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

@shansfolder this is a great question!
We need to add input parameter validation in the call stack up to entry methods in expan lib (Experiment class I guess)

Copy link

Choose a reason for hiding this comment

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

@gbordyugov I believe assert instruction is a bit more self-explanatory to check methods' pre-, post- conditions.
But I don't really mind, feel free to use it if you agree.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. Thank you.
That's a log to me (otherwise we should raise the exception earlier when we find that there is no valid tests in the suite).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shansfolder for me, that's not just a log - it's unrecoverable. If there are no p-values to correct, we cannot return a sensible corrected alpha threshold.

@gbordyugov gbordyugov merged commit 2b7bc27 into zalando:master Jul 31, 2018
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

4 participants