Untitled

 avatar
unknown
plain_text
2 years ago
515 B
3
Indexable
# create a figure with subplots
fig, axs = plt.subplots(nrows=2, ncols=2, figsize=(10,10))

# loop through the evaluation metrics
for i, metric in enumerate(df.index):
  # create a barplot for each evaluation metric
  sns.barplot(data=df, x=df.index[i], y='Logestic Regression', ax=axs[i // 2, i % 2], label='Logistic Regression')
  sns.barplot(data=df, x=df.index[i], y='SVM', ax=axs[i // 2, i % 2], label='SVM')
  
  # add a title to each subplot
  axs[i // 2, i % 2].set_title(metric)

# show the plot
plt.show()
Editor is loading...