report
Reportable
Bases: Protocol
__str__()
abstractmethod
Return a string representation.
Source code in src/flowcean/core/report.py
19 20 21 |
|
Report
Bases: dict[str, ReportEntry]
A structured container for evaluation results of multiple models.
The Report
maps model names to their metric results. For each model:
- top-level keys are metric names,
- values are either:
- a single
Reportable
(e.g., scalar metric result), or - a nested mapping from submetric names to
Reportable
objects (e.g., per-class F1 scores, per-feature regression errors, or multi-output results).
- a single
This hierarchical structure allows uniform representation of both simple metrics and complex hierarchical metrics across multiple models.
Example:
report = Report( ... { ... "model_a": { ... "accuracy": 0.95, ... "f1": {"class_0": 0.91, "class_1": 0.89}, ... }, ... "model_b": { ... "mae": {"feature_x": 0.2, "feature_y": 0.3}, ... }, ... } ... )
pretty_print(header_style='bold magenta', metric_style='cyan', value_style='green', title_style='bold yellow')
Pretty print the report to the terminal.
Source code in src/flowcean/core/report.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
|