mirror of
https://github.com/allaunthefox/SilverSight.git
synced 2026-07-30 17:16:16 +00:00
fix(hn): proper NoneType handling in EVAL writer
This commit is contained in:
parent
07adc46931
commit
79433aadfc
1 changed files with 4 additions and 3 deletions
|
|
@ -357,13 +357,14 @@ def write_eval(results):
|
|||
"|-------|---|---|-------|------|---------|--------|------------|------|---------|-----|",
|
||||
]
|
||||
for g in results["graphs"]:
|
||||
ww = g['welch_wynn']
|
||||
ww = g.get('welch_wynn')
|
||||
ww_str = f"{ww:.4f}" if ww is not None else "N/A"
|
||||
hb = g.get('hoffman_bound')
|
||||
hb_str = f"{hb:.4f}" if hb is not None else "inf"
|
||||
lines.append(
|
||||
f"| {g['description']} | {g['n_vertices']} | {g['n_edges']} | "
|
||||
f"{g['lambda_max']:.4f} | {g['lambda_min']:.4f} | "
|
||||
f"{g['hoffman_bound']:.4f} if g['hoffman_bound'] is not None else 'inf' | "
|
||||
f"{g['chi_hoffman']} | {ww_str} | "
|
||||
f"{hb_str} | {g['chi_hoffman']} | {ww_str} | "
|
||||
f"{g['chi_welch_wynn']} | {g['chi_known']} | {g['gap']} |"
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue