Base Reporter
Bases: ABC
Abstract base class for dataset reporting and visualization.
This class provides a shared interface and utility methods for creating technical reports. It handles console output formatting, shared logging, and calculation of dataset health metrics such as 'sweet spots' (statistical ranges free of outliers).
Source code in tools/stats/dataset_reporter/base_reporter.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 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 137 138 139 140 141 142 143 144 145 146 147 148 | |
report_path
property
writable
Path: The directory where generated reports are stored.
__init__(settings)
Initializes the reporter with global settings and logging.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
AppSettings
|
Global configuration containing paths, log levels, and report schemas. |
required |
Source code in tools/stats/dataset_reporter/base_reporter.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |
generate_visual_report(df, destination, features)
abstractmethod
Generates visual analytics (plots, heatmaps, manifolds).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
The feature matrix of the dataset. |
required |
destination
|
Union[Path, str, PdfPages]
|
Output target for the visual assets. |
required |
features
|
List[str]
|
Numeric columns used for visual correlation and manifold analysis. |
required |
Source code in tools/stats/dataset_reporter/base_reporter.py
56 57 58 59 60 61 62 63 64 65 66 | |
show_console_report(df, target_format)
abstractmethod
Prints a detailed technical report to the console.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
The feature matrix of the dataset. |
required |
target_format
|
str
|
Annotation format identifier (e.g., 'yolo'). |
required |
Source code in tools/stats/dataset_reporter/base_reporter.py
45 46 47 48 49 50 51 52 53 54 | |