Report¶
generate_report
¶
generate_report(real: ECGDataset, synthetics: List[ECGDataset], metric_results: Dict[str, Dict[str, MetricResult]], output_path: Union[str, Path], n_ecg_samples: int = 3, leads: Optional[List[str]] = None, compare_mode: str = 'overlay', plotly_cdn: bool = True, fs: float = 500.0, feature_df_real=None, feature_dfs_synth=None, feature_plots_2d: bool = False, feature_plots_3d: bool = False) -> Path
Build and write a self-contained HTML report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
real
|
ECGDataset
|
|
required |
synthetics
|
list of ECGDataset
|
|
required |
metric_results
|
metric_name: {synth_label: MetricResult}
|
|
metric_name: {synth_label: MetricResult}
|
output_path
|
str or Path
|
|
required |
n_ecg_samples
|
int — number of ECG recordings to show in gallery
|
|
3
|
leads
|
list of str, optional — subset of leads to show in ECG gallery
|
|
None
|
compare_mode
|
'overlay' | 'sidebyside' | 'grid'
|
|
'overlay'
|
plotly_cdn
|
bool — if True, load Plotly.js from CDN (smaller HTML);
|
|
True
|
Returns:
| Type | Description |
|---|---|
Path to the written HTML file.
|
|
Source code in ecgen_eval/report/html_report.py
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 | |