pdstools.explanations.Reports¶
Classes¶
Reports. |
Module Contents¶
- class Reports(explanations: pdstools.explanations.Explanations.Explanations)¶
Bases:
pdstools.utils.namespaces.LazyNamespaceReports.
- Parameters:
explanations (pdstools.explanations.Explanations.Explanations)
- dependency_group = 'explanations'¶
- explanations¶
- generate(report_filename: str = 'explanations_report.zip', top_n: int = 20, top_k: int = 20, zip_output: bool = False, full_embed: bool = False, *, output_dir: str | pathlib.Path = DEFAULT_OUTPUT_DIR, sort_by: pdstools.explanations._constants.ContributionType = 'contribution_abs', display_by: pdstools.explanations._constants.ContributionType = 'contribution')¶
Generate the explanations report.
- Parameters:
report_filename (str) – Name of the output report file.
top_n (int) – Number of top explanations to include.
top_k (int) – Number of top features to include in explanations.
zip_output (bool) – Whether to zip the output report. The filename will be used as the zip file name.
full_embed (bool, default False) – When True, fully embed JavaScript libraries into the generated Quarto website. Defaults to False, which keeps the smaller CDN-backed output.
output_dir (str | Path, keyword-only) – Directory the Quarto project is rendered into, default
".tmp/reports". The rendered site lands in<output_dir>/_site.sort_by (str, keyword-only) – Column to rank/select top predictors. Default:
"contribution_abs".display_by (str, keyword-only) – Column to use for the report axis values. Default:
"contribution".
Notes
Progress and diagnostic information is logged at DEBUG level. Enable debug logging to see detailed report generation steps.