| | import matplotlib.pyplot as plt |
| | import numpy as np |
| |
|
| | |
| | |
| | |
| |
|
| | |
| | labels = [ |
| | '\nOlympiad', |
| | '\nGPQA-Diamond', |
| | '\nGAOKAO-MM', |
| | '\nMathVista', |
| | '\nMMMU', |
| | '\nM³oralBench', |
| | '\nMM-SafetyBench', |
| | '\nSIUO', |
| | '\nFLAMES', |
| | '\nMSSBench', |
| | ] |
| |
|
| | |
| | labels = labels[:5] + [''] + labels[5:] + [''] |
| | num_vars = len(labels) |
| |
|
| | |
| | base_model_scores = [59.88, 59.60, 78.17, 76.10, 70.94, 64.50, 92.04, 90.53, 65.31, 74.83, 0, 0] |
| | safe_model_scores = [59.88, 59.60, 78.17, 76.10, 70.94, 64.50, 92.04, 90.53, 65.31, 74.83, 0, 0] |
| |
|
| | |
| | angles = np.linspace(0, 2 * np.pi, num_vars, endpoint=False).tolist() |
| | scores_base = base_model_scores + [base_model_scores[0]] |
| | scores_safe = safe_model_scores + [safe_model_scores[0]] |
| | angles += [angles[0]] |
| |
|
| | |
| | fig, ax = plt.subplots(figsize=(8, 8), subplot_kw=dict(polar=True)) |
| |
|
| | |
| | ax.plot(angles, scores_base, color='#4B63FF', linewidth=2, label='s') |
| | ax.fill(angles, scores_base, color='#4B63FF', alpha=0.2) |
| |
|
| | ax.plot(angles, scores_safe, color='#FF77AC', linewidth=2, label='SafeWork-R1', marker='s') |
| | ax.fill(angles, scores_safe, color='#FF77AC', alpha=0.2) |
| |
|
| | |
| | ax.set_xticks(angles[:-1]) |
| | ax.set_xticklabels(labels, fontsize=10) |
| |
|
| | |
| | ax.set_rlabel_position(0) |
| | ax.set_ylim(50, 100) |
| | ax.yaxis.grid(True) |
| | ax.xaxis.grid(True) |
| |
|
| | |
| | plt.legend(loc='lower center', bbox_to_anchor=(0.5, -0.1), ncol=2) |
| |
|
| | plt.title('a vs b', fontsize=14, pad=20) |
| | plt.tight_layout() |
| |
|
| | |
| | plt.savefig('radar_chart.png', dpi=300, bbox_inches='tight') |
| |
|
| | plt.show() |
| |
|