Plots benchmark metrics as a bar chart. Args: metrics (dict): Dictionary of benchmark metrics.
(metrics)
| 8 | |
| 9 | |
| 10 | def plot_metrics(metrics): |
| 11 | """ |
| 12 | Plots benchmark metrics as a bar chart. |
| 13 | |
| 14 | Args: |
| 15 | metrics (dict): Dictionary of benchmark metrics. |
| 16 | """ |
| 17 | plt.figure(figsize=(10, 6)) |
| 18 | names = list(metrics.keys()) |
| 19 | values = list(metrics.values()) |
| 20 | |
| 21 | plt.bar(names, values, color="skyblue") |
| 22 | plt.title("Model Performance Metrics") |
| 23 | plt.xlabel("Metrics") |
| 24 | plt.ylabel("Values") |
| 25 | plt.xticks(rotation=45) |
| 26 | plt.grid(axis="y", linestyle="--", alpha=0.7) |
| 27 | plt.tight_layout() |
| 28 | plt.show() |
| 29 | |
| 30 | |
| 31 | def plot_feature_importance(feature_importance): |
no outgoing calls