|
6 | 6 |
|
7 | 7 | Functions: |
8 | 8 | ---------- |
9 | | -- mmd_hypothesis_test_from_summaries: |
| 9 | +- compute_mmd_hypothesis_test_from_summaries: |
10 | 10 | Computes the MMD between observed and reference summaries and generates a null distribution of MMD values |
11 | 11 | for hypothesis testing. |
12 | 12 |
|
13 | | -- mmd_hypothesis_test: |
| 13 | +- compute_mmd_hypothesis_test: |
14 | 14 | Computes the MMD between observed and reference data using an approximator to extract summary statistics, |
15 | 15 | and generates a null distribution of MMD values for hypothesis testing. |
16 | 16 |
|
|
49 | 49 | from bayesflow.metrics import maximum_mean_discrepancy |
50 | 50 |
|
51 | 51 |
|
52 | | -def mmd_hypothesis_test_from_summaries( |
| 52 | +def compute_mmd_hypothesis_test_from_summaries( |
53 | 53 | observed_summaries: np.ndarray, |
54 | 54 | reference_summaries: np.ndarray, |
55 | 55 | num_null_samples: int = 100, |
@@ -90,7 +90,7 @@ def mmd_hypothesis_test_from_summaries( |
90 | 90 | return mmd_observed, mmd_null_samples |
91 | 91 |
|
92 | 92 |
|
93 | | -def mmd_hypothesis_test( |
| 93 | +def compute_mmd_hypothesis_test( |
94 | 94 | observed_data: np.ndarray, |
95 | 95 | reference_data: np.ndarray, |
96 | 96 | approximator: Approximator, |
@@ -120,7 +120,7 @@ def mmd_hypothesis_test( |
120 | 120 | observed_summaries: np.ndarray = covert_to_numpy(approximator.summary_network(covert_to_tensor(observed_data))) |
121 | 121 | reference_summaries: np.ndarray = covert_to_numpy(approximator.summary_network(covert_to_tensor(reference_data))) |
122 | 122 |
|
123 | | - mmd_observed, mmd_null = mmd_hypothesis_test_from_summaries( |
| 123 | + mmd_observed, mmd_null = compute_mmd_hypothesis_test_from_summaries( |
124 | 124 | observed_summaries, reference_summaries, num_null_samples=num_null_samples |
125 | 125 | ) |
126 | 126 |
|
|
0 commit comments