SabaPivot's picture
Publish canonical reproduction with fresh CPU audit
bd2c7f9 verified
Raw
History Blame Contribute Delete
2.55 kB
{
"all_passed": true,
"tests": [
{
"test": "positive_stable_laplace_transform",
"pass": true,
"detail": "max |E[exp(-tS)] - exp(-t^a)| = 6.15e-04 over lam in {2,5}, t in {0.3,1,3} (400k draws)"
},
{
"test": "gumbel_copula_marginals_and_kendall_tau",
"pass": true,
"detail": "lam=2.0: max KS=0.0049, tau=0.495 (theory 0.500); lam=5.0: max KS=0.0047, tau=0.803 (theory 0.800)"
},
{
"test": "recourse_closed_form_equals_LP",
"pass": true,
"detail": "max relative gap over 6 x-vectors x 6 scenarios = 0.00e+00"
},
{
"test": "apub_equals_inf_t_formulation",
"pass": true,
"detail": "max relative gap between sorted-tail CVaR and inf_t {t + E[(Z-t)_+]/alpha} = 2.25e-16"
},
{
"test": "apub_sp_monotone_in_alpha_and_alpha1_converges_to_SAA",
"pass": true,
"detail": "objs by alpha = {0.05: -3753.9139, 0.2: -3846.432, 0.5: -4195.5273, 1.0: -5391.2208} (monotone non-increasing in alpha: True); SAA = -5346.4976; alpha=1 relative gap to SAA at M=(200,1600,12800) = ['1.20e-02', '6.70e-03', '4.88e-03']"
},
{
"test": "apub_sp_LP_objective_matches_independent_rebuild",
"pass": true,
"detail": "alpha=0.1: LP obj=-4510.8383, independent rebuild=-4510.8383, rel gap=1.01e-15; alpha=0.5: LP obj=-7124.7985, independent rebuild=-7124.7985, rel gap=2.17e-15"
},
{
"test": "fixed_recourse_closed_form_equals_LP",
"pass": true,
"detail": "max relative gap over 8 x-vectors x 6 scenarios = 4.02e-16"
},
{
"test": "wasserstein_lipschitz_moduli_are_exact",
"pass": true,
"detail": "emp=7507.78 <= analytic=7571.44; emp=8337.95 <= analytic=8357.28; emp=8723.94 <= analytic=8735.27; emp=8036.24 <= analytic=8081.75; emp=8009.52 <= analytic=8082.76; newsvendor modulus max(h,b)=9.0 respected"
},
{
"test": "newsvendor_SAA_LP_equals_empirical_quantile_solution",
"pass": true,
"detail": "LP obj=-686.673572, closed-form quantile obj=-686.673572, rel gap=1.66e-16, max |x_LP - x_quantile| = 0.000"
},
{
"test": "newsvendor_apub_rebuild_and_dro_constant_shift",
"pass": true,
"detail": "APUB LP obj=-674.475982 vs rebuild=-674.475982 (rel gap 3.37e-16); DRO-SAA shift=6.300000 vs eps*max(h,b)=6.300000; x unchanged=True"
},
{
"test": "fixed_recourse_DRO_solution_is_decision_dependent",
"pass": true,
"detail": "||x_DRO - x_SAA||_2 at eps=(0.05, 0.2, 1.0) = [0.076, 0.748, 11.951] (non-decreasing and eventually positive => the Wasserstein modulus really depends on x; contrast the newsvendor, where it cannot move at all)"
}
]
}