compml.report#
PDF report builder for statistical comparison results.
- class compml.report.Report(path, title, author, *, subtitle=None, date=None)[source]#
Bases:
objectBuild a PDF document with the results of the applied statistical tests.
- Parameters:
path (
str|Path) – Output PDF path.title (
str) – Document title.author (
str) – Author name.subtitle (
str|None) – Document subtitle.date (
str|None) – Date string.
Examples
>>> report = Report("out.pdf", title="Comparison Report", author="John Doe") >>> report.add_section_header("Frequentist tests") >>> report.add_result(some_result) >>> report.build()
- add_result(result, include_plots=False)[source]#
Append a result summary and optionally its associated figure.
- Parameters:
result (
BaseResult) – Result to add to the report.include_plots (
bool) – Whether to include the associated figure. Default is False.
- Raises:
ValueError – If the result is not a BaseResult or the include_plots is not a boolean.
- Return type:
None