Skip to content

Commit

Permalink
negative metric calc fix (#39)
Browse files Browse the repository at this point in the history
* negative metric calc fix

* version update

Co-authored-by: Sofie Solecka <sofie.solecka@avast.com>
  • Loading branch information
sovka185 and Sofie Solecka authored Jul 25, 2022
1 parent 6080465 commit dd45bc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = ep-stats
version = 1.3.1
version = 1.3.2
description = Statistical package to evaluate ab tests in experimentation platform.
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down
2 changes: 1 addition & 1 deletion src/epstats/toolkit/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def ttest_evaluation(cls, stats: np.array, control_variant: str) -> pd.DataFrame
# We fill in zeros, when goal data are missing for some variant.
# There could be division by zero here which is expected as we return
# nan or inf values to the caller.
rel_diff = (mean_treat - mean_cont) / mean_cont
rel_diff = (mean_treat - mean_cont) / np.abs(mean_cont)
# standard error for relative difference
rel_se = (
np.sqrt(
Expand Down

0 comments on commit dd45bc7

Please sign in to comment.