Skip to content

Commit 4e91154

Browse files
committed
change functions names to have compute_ prefix (see PR comments)
1 parent 48c2f8c commit 4e91154

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bayesflow/diagnostics/metrics/mmd_hypothesis_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
77
Functions:
88
----------
9-
- mmd_hypothesis_test_from_summaries:
9+
- compute_mmd_hypothesis_test_from_summaries:
1010
Computes the MMD between observed and reference summaries and generates a null distribution of MMD values
1111
for hypothesis testing.
1212
13-
- mmd_hypothesis_test:
13+
- compute_mmd_hypothesis_test:
1414
Computes the MMD between observed and reference data using an approximator to extract summary statistics,
1515
and generates a null distribution of MMD values for hypothesis testing.
1616
@@ -49,7 +49,7 @@
4949
from bayesflow.metrics import maximum_mean_discrepancy
5050

5151

52-
def mmd_hypothesis_test_from_summaries(
52+
def compute_mmd_hypothesis_test_from_summaries(
5353
observed_summaries: np.ndarray,
5454
reference_summaries: np.ndarray,
5555
num_null_samples: int = 100,
@@ -90,7 +90,7 @@ def mmd_hypothesis_test_from_summaries(
9090
return mmd_observed, mmd_null_samples
9191

9292

93-
def mmd_hypothesis_test(
93+
def compute_mmd_hypothesis_test(
9494
observed_data: np.ndarray,
9595
reference_data: np.ndarray,
9696
approximator: Approximator,
@@ -120,7 +120,7 @@ def mmd_hypothesis_test(
120120
observed_summaries: np.ndarray = covert_to_numpy(approximator.summary_network(covert_to_tensor(observed_data)))
121121
reference_summaries: np.ndarray = covert_to_numpy(approximator.summary_network(covert_to_tensor(reference_data)))
122122

123-
mmd_observed, mmd_null = mmd_hypothesis_test_from_summaries(
123+
mmd_observed, mmd_null = compute_mmd_hypothesis_test_from_summaries(
124124
observed_summaries, reference_summaries, num_null_samples=num_null_samples
125125
)
126126

0 commit comments

Comments
 (0)