test_formal_v02.py

Streaming Polyphase Factor Decomposition / SKAT

test_formal_v02.py

Download original file

This is the original source text. Reading it does not run or verify the program.

Read the typeset paper

Skip source text

1 from pathlib import Path
2 import pandas as pd
3 
4 HERE = Path(__file__).resolve().parent
5 
6 part = pd.read_csv(HERE/'partition_invariance.csv')
7 hier = pd.read_csv(HERE/'hierarchical_refinement.csv')
8 lc = pd.read_csv(HERE/'polyphase_psd_light_cone.csv')
9 rank = pd.read_csv(HERE/'phase_local_rank_audit.csv')
10 qr = pd.read_csv(HERE/'qr_core_update_audit.csv')
11 mem = pd.read_csv(HERE/'memory_asymptotic_sweep.csv')
12 
13 assert part['gram_rel_error'].max() < 1e-12
14 assert part['action_rel_error'].max() < 1e-12
15 assert hier['coarse_vs_fine_rel_error'].iloc[0] < 1e-12
16 assert lc.loc[lc['outside_light_cone'], 'norm'].max() == 0.0
17 assert (rank['constructed_rank'] == rank['svd_numerical_rank']).all()
18 assert qr['relative_l2_singular_difference'].iloc[0] < 1e-12
19 assert mem['stream_kernel_action_MiB'].max() == mem['stream_kernel_action_MiB'].min()
20 assert mem['full_factor_MiB'].iloc[-1] > 90 * mem['full_factor_MiB'].iloc[0]
21 print('PASS: v0.2 formal regression invariants')

Back to source controls

Other PDFs for this work

Original file and source record

This copy matches the recorded source file. Its publication here does not change the work’s review status.

SHA-256: c823854dd6c534e45f1eb7d8e5ea28c3e1ac7266ba918f3e7986e31827c01320

Original source on GitHub

Back to Streaming Polyphase Factor Decomposition / SKAT