Reporting¶
Motivation¶
The report is the artifact of the evaluation layer: the thing a scientist shares with
colleagues or management. It closes the loop build → evaluate → communicate.
report_summary(...) exposes the same content as a structured dict for agents; a
dedicated MCP package is planned outside the core library (see project/PLAN_MCP.md).
What the report contains¶
A rule-based (deterministic, no LLM) HTML report with:
- Executive summary — quality verdict, significant factors, top recommendation.
- Methodology — design kind and why, factors with ranges, the model.
- Design matrix — collapsible.
- Design quality — D/A/G-efficiency cards with a semaphore, FDS plot, power, VIF, alias heatmap, each with a plain-language gloss.
- Results (with a response) — fitted model, coefficients with significance, \(R^2\), half-normal plot.
- Anomalous values — outliers (studentized residual \(|r|>3\)), high leverage (\(h_{ii} > 2p/N\)), influential (Cook's \(D > 1\)).
- Conclusions and recommendations — rule-based narrative.
Output modes¶
- folder (default): a
report/folder withindex.html,report.css,images/*.pnganddata/*.csv(design matrix, coefficients, efficiencies, power, VIF, FDS, anomalies) — portable assets a researcher can reuse. - self-contained: a single
.htmlwith inlined CSS and base64 plots — emailable.
The report is bilingual (lang="en" / "es").
In doekit¶
import doekit as ed
ed.report(bb, response=y) # -> report/ folder (default)
ed.report(bb, response=y, self_contained=True) # -> single .html
ed.report(bb, response=y, lang="es") # Spanish
# or as an argument of the experiment functions:
ed.fit_linear_model(bb, y, report="report/") # path in fit.report_path
ed.evaluate(bb, report=True) # path in ev.report_path
Requires the [report] extra (matplotlib).
See also¶
- Theory: Evaluation metrics
- API:
report,report_summary