Skip to content

Commit

Permalink
Updated dev requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
iampelle committed Apr 1, 2022
1 parent c6e464a commit 42d0f8b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 21 deletions.
4 changes: 2 additions & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ flake8==3.7.7
tox==3.21.0
Sphinx==1.4.8
pytest-runner==2.11.1
jupyter==1.0.0
jupyterlab==3.2.9
pylint==1.7.4
coverage==4.5.1
pytest==7.0.1
pytest-cov==2.5.1
ipywidgets>=7.1.0
black==21.9b0
black==22.3.0
scipy>=1.4.1,<1.8.0
Original file line number Diff line number Diff line change
Expand Up @@ -926,18 +926,14 @@ def _compute_sequential_adjusted_alpha(df: DataFrame, method_column: str, arg_di
def _add_ci(df: DataFrame, arg_dict: Dict) -> DataFrame:
lower, upper = confidence_computers[df[arg_dict[METHOD]].values[0]].ci(df, ALPHA, arg_dict)

if (
arg_dict[CORRECTION_METHOD]
in [
HOLM,
HOMMEL,
SIMES_HOCHBERG,
SPOT_1_HOLM,
SPOT_1_HOMMEL,
SPOT_1_SIMES_HOCHBERG,
]
and all(df[PREFERENCE_TEST] != TWO_SIDED)
):
if arg_dict[CORRECTION_METHOD] in [
HOLM,
HOMMEL,
SIMES_HOCHBERG,
SPOT_1_HOLM,
SPOT_1_HOMMEL,
SPOT_1_SIMES_HOCHBERG,
] and all(df[PREFERENCE_TEST] != TWO_SIDED):
if all(df[arg_dict[METHOD]] == "z-test"):
adjusted_lower, adjusted_upper = confidence_computers["z-test"].ci_for_multiple_comparison_methods(
df, arg_dict[CORRECTION_METHOD], alpha=1 - arg_dict[INTERVAL_SIZE]
Expand Down
2 changes: 1 addition & 1 deletion tests/frequentist/test_ttest.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_standard_error_diff_mean_from_sums(self):
sigma2 = 2
x2 = np.random.normal(mu2, sigma2, n2)

std_diff = np.sqrt(sigma1 ** 2 / n1 + sigma2 ** 2 / n2)
std_diff = np.sqrt(sigma1**2 / n1 + sigma2**2 / n2)

arg_dict = {DENOMINATOR: "n"}
diff_se = computer.std_err(
Expand Down
12 changes: 6 additions & 6 deletions tests/frequentist/test_ztest_linreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def setup(self):
data = pd.DataFrame({"variation_name": list(map(str, d)), "y": y, "x": x})
data = (
data.assign(xy=y * x)
.assign(x2=x ** 2)
.assign(y2=y ** 2)
.assign(x2=x**2)
.assign(y2=y**2)
.groupby(["variation_name"])
.agg({"y": ["sum", "count"], "y2": "sum", "x": "sum", "x2": "sum", "xy": "sum"})
.reset_index()
Expand Down Expand Up @@ -83,8 +83,8 @@ def setup(self):
data = pd.DataFrame({"variation_name": list(map(str, d)), "metric_name": m, "y": y, "x": x})
data = (
data.assign(xy=y * x)
.assign(x2=x ** 2)
.assign(y2=y ** 2)
.assign(x2=x**2)
.assign(y2=y**2)
.groupby(["variation_name", "metric_name"])
.agg({"y": ["sum", "count"], "y2": "sum", "x": "sum", "x2": "sum", "xy": "sum"})
.reset_index()
Expand Down Expand Up @@ -226,7 +226,7 @@ def setup(self):
y = 0.5 * d + 0.5 * x1 + 0.5 * x2 + np.random.standard_normal(size=n)
df = pd.DataFrame({"variation_name": list(map(str, d)), "y": y, "x1": x1, "x2": x2})

data = df.assign(y2=y ** 2).groupby(["variation_name"]).agg({"y": ["sum", "count"], "y2": "sum"}).reset_index()
data = df.assign(y2=y**2).groupby(["variation_name"]).agg({"y": ["sum", "count"], "y2": "sum"}).reset_index()

data.columns = data.columns.map("_".join).str.strip("_")

Expand Down Expand Up @@ -332,7 +332,7 @@ def setup(self):
)

data = (
df.assign(y2=y ** 2)
df.assign(y2=y**2)
.groupby(["variation_name", "metric_name"])
.agg({"y": ["sum", "count"], "y2": "sum"})
.reset_index()
Expand Down

0 comments on commit 42d0f8b

Please sign in to comment.