import json from verify import run def main(): out = run() rows = [] for r in out['reports']: rows.append({ 'q': r['q'], 'adaptive_degree': r['chosen_degree'], 'adaptive_coefficients': r['chosen_coefficients'], 'adaptive_actual_relative_tail': r['chosen_tail'], 'fixed_degree': 4, 'fixed_coefficients': r['fixed_degree_4_coefficients'], 'fixed_actual_relative_tail': r['fixed_degree_4_tail'], 'coefficient_ratio_adaptive_over_fixed': r['chosen_coefficients'] / r['fixed_degree_4_coefficients'], }) result = { 'claim_check': { 'heat_max_relative_error': out['heat_relative_error'], 'envelope_constant_from_exact_quadrature': out['empirical_envelope_C'], 'tail_target': out['target'], }, 'benchmark': rows, 'interpretation': 'Exact diagonal-Gaussian density-ratio approximation using Hermite coefficients; fixed degree 4 is the control. Coefficients are distribution-level, not per-sample latent codes.' } with open('mini_result.json', 'w') as f: json.dump(result, f, indent=2) print(json.dumps(result, indent=2)) if __name__ == '__main__': main()