Skip to content

Add tags or indexes when comparing ML models of the same type #24

@ImProta

Description

@ImProta

The current compare_metrics function does not account for models of the same type. Visualization might be confusing. It is necessary to develop a feature to identify the different metadata of model of same type and give a tag to it. This will make easier to visualize which data belongs to each model.

for i, metric in enumerate(metric_order):
if metric != 'accuracy':
plot_data = pivot_df[pivot_df['Metric'] != 'accuracy']
else:
plot_data = pivot_df[pivot_df['Metric'] == 'accuracy']
sns.barplot(x='Model',
y='Value',
hue='Class',
data=plot_data[plot_data['Metric'] == metric],
ax=axes[i],
palette=palette)
axes[i].set_title(f'{metric.capitalize()} - Labels')
axes[i].set_xlabel('')
axes[i].set_ylabel(metric.capitalize())
if metric != 'accuracy':
handles, labels = axes[i].get_legend_handles_labels()
axes[i].legend(handles=handles[:2], labels=labels[:2])
plt.tight_layout()

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions