Metrics Tools API¶
Metrics visualization and investigation tools.
Provides functions to visualize training metrics and investigate hierarchy correlations.
investigate_hierarchy(distance_matrix_path=None, config_path=None, project_root=None)
¶
Investigate why hierarchy preservation correlations might be low.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
distance_matrix_path
|
Optional[Path]
|
Path to ground truth distance matrix |
None
|
config_path
|
Optional[Path]
|
Path to config file |
None
|
project_root
|
Optional[Path]
|
Project root directory |
None
|
Returns:
| Type | Description |
|---|---|
Dict
|
Dictionary with investigation results |
visualize_metrics(stage='02_text', log_file=None, output_dir=None, project_root=None)
¶
Visualize training metrics from log files.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stage
|
str
|
Stage name to filter (e.g., '02_text') |
'02_text'
|
log_file
|
Optional[Path]
|
Path to log file (default: logs/train_sequential.log) |
None
|
output_dir
|
Optional[Path]
|
Output directory for plots (default: outputs/visualizations/) |
None
|
project_root
|
Optional[Path]
|
Project root directory (default: current working directory) |
None
|
Returns:
| Type | Description |
|---|---|
Dict
|
Dictionary with metrics and output file path |