SFI.diagnostics.report module

DiagnosticsReport dataclass — structured output of assess().

class SFI.diagnostics.report.DiagnosticsReport(residuals=<factory>, meta=<factory>)[source]

Bases: object

Container for residual-consistency test results.

Variables:
  • residuals (dict) – Test results. Always holds "moments"; at level="standard" also "autocorr", "normality" and "mse_consistency".

  • meta (dict) – Backend tag, regime, n_obs, n_particles, d, level.

Parameters:
  • residuals (dict)

  • meta (dict)

flag_issues(alpha=0.01, *, hints=True)[source]

List human-readable warnings.

Returns one line per test whose p-value is below alpha or whose statistic crosses a sane threshold (residual mean off zero, std far from one, MSE-consistency |z| > 5).

Parameters:
  • alpha (float) – Significance level for the p-value tests.

  • hints (bool) – When True (default), each message carries a one-line action hint (” — <what to do>”); set False for bare statistics (machine parsing).

Return type:

list[str]

meta: dict
print_summary(alpha=0.01, *, hints=True)[source]

Print a human-readable summary of the diagnostic report.

Each flagged issue carries a one-line action hint unless hints=False.

Parameters:
  • alpha (float)

  • hints (bool)

Return type:

None

residuals: dict
to_dict()[source]

Return a JSON-serialisable representation of the report.

Return type:

dict

to_json(indent=2)[source]

Serialise the report to a JSON string.

Parameters:

indent (int)

Return type:

str