Skip to content

Commit 7d90b49

Browse files
Rename compute_clustered_binomial_gee_group_statistics to compute_binomial_gee_group_statistics for consistency
1 parent 8777e3d commit 7d90b49

4 files changed

Lines changed: 13 additions & 8 deletions

File tree

‎docs/source/api.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Metric tables
125125
.. autofunction:: compute_threshold_responder_table
126126
.. autofunction:: compute_responder_group_statistics
127127
.. autofunction:: compute_binomial_glm_group_statistics
128-
.. autofunction:: compute_clustered_binomial_gee_group_statistics
128+
.. autofunction:: compute_binomial_gee_group_statistics
129129
.. autofunction:: compute_group_day_violin_statistics
130130
.. autofunction:: compute_role_cumulative_curves
131131
.. autofunction:: compute_time_window_learning_curves

‎ic_analysis/metrics.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ def compute_binomial_glm_group_statistics(
14241424

14251425
return pd.DataFrame(omnibus_rows), pd.DataFrame(pairwise_rows)
14261426

1427-
def compute_clustered_binomial_gee_group_statistics(
1427+
def compute_binomial_gee_group_statistics(
14281428
data: pd.DataFrame,
14291429
*,
14301430
phase_number: int,
@@ -1560,6 +1560,11 @@ def compute_clustered_binomial_gee_group_statistics(
15601560

15611561
return pd.DataFrame(omnibus_rows), pd.DataFrame(pairwise_rows)
15621562

1563+
1564+
# Backward-compatible alias for the original public function name.
1565+
compute_clustered_binomial_gee_group_statistics = compute_binomial_gee_group_statistics
1566+
1567+
15631568
def _fdr_bh_adjust(p_values: list[float]) -> list[float]:
15641569
"""Apply Benjamini-Hochberg FDR correction to a sequence of p-values."""
15651570

‎ic_analysis/workflows/place_learning_reversal.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
compute_awake_day_error_rate_tables,
5353
compute_awake_day_ratio_tables,
5454
compute_binomial_glm_group_statistics,
55-
compute_clustered_binomial_gee_group_statistics,
55+
compute_binomial_gee_group_statistics,
5656
compute_experiment_drinking_visit_bins,
5757
compute_experiment_lick_count_bins,
5858
compute_experiment_nosepoke_count_bins,
@@ -595,14 +595,14 @@ def _build_pl_rewarded_gee_stats(
595595
& hourly["bin_start_hours"].lt(24.0)
596596
].copy()
597597

598-
day1_omnibus, day1_pairwise = compute_clustered_binomial_gee_group_statistics(
598+
day1_omnibus, day1_pairwise = compute_binomial_gee_group_statistics(
599599
day1_awake,
600600
phase_number=3,
601601
metric_name=f"rewarded_correct_corner_day1awake_gee_{int(bin_hours)}h",
602602
success_col="correct_visits",
603603
total_col="all_visits",
604604
)
605-
first24_omnibus, first24_pairwise = compute_clustered_binomial_gee_group_statistics(
605+
first24_omnibus, first24_pairwise = compute_binomial_gee_group_statistics(
606606
first24h,
607607
phase_number=3,
608608
metric_name=f"rewarded_correct_corner_first24h_gee_{int(bin_hours)}h",

‎tests/test_metrics.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
compute_awake_day_rate_tables,
1111
compute_awake_day_ratio_tables,
1212
compute_binomial_glm_group_statistics,
13-
compute_clustered_binomial_gee_group_statistics,
13+
compute_binomial_gee_group_statistics,
1414
compute_bottle_preference_bins,
1515
compute_experiment_drinking_visit_bins,
1616
compute_experiment_lick_count_bins,
@@ -290,7 +290,7 @@ def test_onset_responder_and_statistical_metrics(aligned_visits) -> None:
290290
phase_number=3,
291291
bin_hours=6,
292292
success_col="rewarded_correct_corner_visit")
293-
gee_omnibus, gee_pairwise = compute_clustered_binomial_gee_group_statistics(
293+
gee_omnibus, gee_pairwise = compute_binomial_gee_group_statistics(
294294
binned_mouse,
295295
phase_number=3,
296296
metric_name="rewarded_correct_corner_6h",
@@ -407,7 +407,7 @@ def test_empty_inputs_return_empty_tables(aligned_visits) -> None:
407407
metric_name="empty",
408408
success_col="correct_visits",
409409
total_col="all_visits")[0].empty
410-
assert compute_clustered_binomial_gee_group_statistics(
410+
assert compute_binomial_gee_group_statistics(
411411
pd.DataFrame(),
412412
phase_number=3,
413413
metric_name="empty",

0 commit comments

Comments
 (0)