pdstools.explanations.Reports¶
Classes¶
Module Contents¶
- class Reports(explanations: pdstools.explanations.Explanations.Explanations)¶
Bases:
pdstools.utils.namespaces.LazyNamespace- Parameters:
explanations (pdstools.explanations.Explanations.Explanations)
- dependencies = ['yaml']¶
- dependency_group = 'explanations'¶
- explanations¶
- report_foldername = 'reports'¶
- report_folderpath¶
- report_output_dir¶
- aggregate_folder¶
- params_file¶
- generate(report_filename: str = 'explanations_report.zip', top_n: int = defaults.top_n, top_k: int = defaults.top_k, sort_by: str = defaults.sort_by.value, display_by: str = defaults.display_by.value, zip_output: bool = False)¶
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.
sort_by (_CONTRIBUTION_TYPE) – Contribution type enum used for sorting and ranking data.
display_by (_CONTRIBUTION_TYPE) – Contribution type enum used for display axes and report text.
zip_output (bool) – Whether to zip the output report. The filename will be used as the zip file name.
Notes
Progress and diagnostic information is logged at DEBUG level. Enable debug logging to see detailed report generation steps.
- _validate_report_dir()¶
- _copy_report_resources()¶
- _set_params(top_n: int = defaults.top_n, top_k: int = defaults.top_k, from_date: str = '', to_date: str = '', sort_by: pdstools.explanations.ExplanationsUtils._CONTRIBUTION_TYPE = defaults.sort_by, display_by: pdstools.explanations.ExplanationsUtils._CONTRIBUTION_TYPE = defaults.display_by)¶
- Parameters:
top_n (int)
top_k (int)
from_date (str)
to_date (str)
sort_by (pdstools.explanations.ExplanationsUtils._CONTRIBUTION_TYPE)
display_by (pdstools.explanations.ExplanationsUtils._CONTRIBUTION_TYPE)