Spaces:
Sleeping
Sleeping
| # Evaluation Module | |
| Metrics and ground truth management for retrieval evaluation. | |
| ## Files | |
| | File | Description | | |
| |------|-------------| | |
| | `metrics.py` | F1@K, precision, recall, timing statistics | | |
| | `ground_truth.py` | Ground truth label management | | |
| ## Metrics | |
| | Metric | Description | | |
| |--------|-------------| | |
| | F1@5 | Precision@5 x Recall@5 | | |
| | F1@10 | Precision@10 x Recall@10 | | |
| | Same-Modal F1 | F1 for same-modality queries | | |
| | Cross-Modal F1 | F1 for cross-modality queries | | |
| ## Usage | |
| ```python | |
| from src.evaluation.metrics import compute_f1 | |
| # Compute F1@K | |
| f1_score = compute_f1( | |
| predicted_indices=result.indices, | |
| ground_truth_indices=gt_indices, | |
| k=5 | |
| ) | |
| ``` | |