compute_metrics
Compute comprehensive evaluation metrics for MOS prediction.Parameters
Predicted MOS scores
Ground truth MOS scores
List of metrics to compute. Default: [‘spearman’, ‘pearson’, ‘vquala_score’, ‘mae’, ‘mse’, ‘rmse’]Available metrics:
- ‘spearman’: Spearman rank correlation (SROCC)
- ‘pearson’: Pearson linear correlation (PLCC)
- ‘vquala_score’: VQualA challenge score (SROCC + PLCC) / 2
- ‘mae’: Mean absolute error
- ‘mse’: Mean squared error
- ‘rmse’: Root mean squared error
- ‘std_pred’: Standard deviation of predictions
- ‘std_target’: Standard deviation of targets
- ‘mean_pred’: Mean of predictions
- ‘mean_target’: Mean of targets
Returns
Dictionary of computed metrics
Example
compute_vquala_score
Compute VQualA challenge score: (SROCC + PLCC) / 2Parameters
Predicted overall MOS scores
Ground truth overall MOS scores
Returns
VQualA challenge score (average of SROCC and PLCC)
print_metrics
Pretty print metrics dictionary.Parameters
Dictionary of metrics to print
Title for the metrics display
Example Output
rank_corr
Compute Spearman and Pearson correlation coefficients.Parameters
Predicted MOS scores
Ground truth MOS scores
Returns
Spearman rank correlation coefficient (SROCC)
Pearson linear correlation coefficient (PLCC)
evaluate_all_dimensions
Evaluate all MOS dimensions separately.Parameters
Predicted MOS scores with shape (N, 5)
Ground truth MOS scores with shape (N, 5)
Names for each dimension. Default: [‘Traditional’, ‘Alignment’, ‘Aesthetic’, ‘Temporal’, ‘Overall’]
Returns
Dictionary with metrics for each dimension. Each dimension contains:
- spearman: Spearman correlation
- pearson: Pearson correlation
- vquala_score: VQualA score
- mae: Mean absolute error
- rmse: Root mean squared error