text
stringlengths
0
4.94k
assert abs(float(committor[-1]) - 1.0) <= 1e-8
assert np.all(mean_exit >= -1e-8)
assert abs(float(mean_exit[0])) <= 1e-8
assert abs(float(mean_exit[-1])) <= 1e-8
own_q, own_t = _backward_kinetics(
potential[mask],
mobility[mask],
record_spec["temperature"],
x_grid,
)
assert relative_l2_matrix(committor, own_q) <= 2e-3
assert relative_l2_matrix(mean_exit, own_t) <= 2e-3
spec = SPEC["campaigns"][campaign_id]
truth_u, _ = _potential_truth(x_grid, spec["potential"])
truth_mu, _ = _mobility_truth(x_grid, spec["mobility"])
truth_q, truth_t = _backward_kinetics(
truth_u,
truth_mu,
record_spec["temperature"],
x_grid,
)
bands = KINETIC_BANDS[campaign_id]
assert relative_l2_matrix(committor, truth_q) <= bands["committor"]
> assert relative_l2_matrix(mean_exit, truth_t) <= bands["exit"]
E assert 0.4583319972390812 <= 0.45
E + where 0.4583319972390812 = relative_l2_matrix(array([0. , 0.63240318, 0.89014784, 1.01120688, 1.08055327,\n 1.12861168, 1.16666852, 1.20032346, 1.23278171, 1.26613608,\n 1.30199652, 1.34049498, 1.37945075, 1.41153989, 1.42211625,\n 1.40254141, 1.36401969, 1.32110832, 1.28075273,...
/verifier/test_outputs.py:1336: AssertionError
_________ test_uncertainty_intervals_cover_truth_without_being_vacuous _________
def test_uncertainty_intervals_cover_truth_without_being_vacuous():
_, _, _, _, uncertainty = _submission()
assert int(uncertainty.get("folds", -1)) == 8
assert uncertainty.get("method") == (
"eight-fold trajectory-index jackknife with finite-time "
"model-discrepancy floors"
)
assert uncertainty.get("fold_rule") == (
"omit trajectory indices i with i % 8 == fold"
)
for campaign_id in CAMPAIGN_IDS:
entry = _uncertainty_entry(campaign_id)
campaign, x_grid, mobility, _, potential = _campaign(campaign_id)
assert np.allclose(
np.asarray(entry["x_grid"], float), x_grid, rtol=0, atol=1e-10
)
arrays = {
key: np.asarray(entry[key], float)
for key in (
"mobility_lower",
"mobility_upper",
"potential_lower",
"potential_upper",
"mobility_jackknife_se",
"potential_jackknife_se",
)
}
assert all(
array.shape == x_grid.shape and np.all(np.isfinite(array))
for array in arrays.values()
)
fold_mobility = np.asarray(entry["fold_mobility"], float)
fold_potential = np.asarray(entry["fold_potential"], float)
assert fold_mobility.shape == fold_potential.shape == (
8,
len(x_grid),
)
assert np.all(np.isfinite(fold_mobility))
assert np.all(np.isfinite(fold_potential))
assert np.all(fold_mobility > 0)
assert np.all(
np.min(fold_potential, axis=1)
<= 1.0e-6
+ 0.01 * np.maximum(np.ptp(fold_potential, axis=1), 1.0e-9)
)
mobility_se = np.sqrt(
7.0
/ 8.0
* np.sum(
(
fold_mobility
- np.mean(fold_mobility, axis=0, keepdims=True)
)
** 2,
axis=0,
)
)
potential_se = np.sqrt(
7.0
/ 8.0
* np.sum(
(
fold_potential
- np.mean(fold_potential, axis=0, keepdims=True)
)
** 2,
axis=0,