Skip to content

Commit

Permalink
Improve plot titles
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturoAmorQ committed Apr 26, 2024
1 parent 9e97332 commit 060bd89
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python_scripts/cross_validation_stratification.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@
train_cv_counts.plot.bar()
plt.legend(bbox_to_anchor=(1.05, 0.8), loc="upper left")
plt.ylabel("Count")
_ = plt.title("Training set")
_ = plt.title("Training set class counts")

# %%
test_cv_counts.plot.bar()
plt.legend(bbox_to_anchor=(1.05, 0.8), loc="upper left")
plt.ylabel("Count")
_ = plt.title("Test set")
_ = plt.title("Test set class counts")

# %% [markdown]
# We can confirm that in each fold, only two of the three classes are present in
Expand Down Expand Up @@ -191,13 +191,13 @@
train_cv_counts.plot.bar()
plt.legend(bbox_to_anchor=(1.05, 0.8), loc="upper left")
plt.ylabel("Count")
_ = plt.title("Training set")
_ = plt.title("Training set class counts\n(with suffling)")

# %%
test_cv_counts.plot.bar()
plt.legend(bbox_to_anchor=(1.05, 0.8), loc="upper left")
plt.ylabel("Count")
_ = plt.title("Test set")
_ = plt.title("Test set class counts\n(with suffling)")

# %% [markdown]
# We see that neither the training and testing sets have the same class
Expand Down Expand Up @@ -242,13 +242,13 @@
train_cv_counts.plot.bar()
plt.legend(bbox_to_anchor=(1.05, 0.8), loc="upper left")
plt.ylabel("Count")
_ = plt.title("Training set")
_ = plt.title("Training set class counts\n(with stratifying)")

# %%
test_cv_counts.plot.bar()
plt.legend(bbox_to_anchor=(1.05, 0.8), loc="upper left")
plt.ylabel("Count")
_ = plt.title("Test set")
_ = plt.title("Test set class counts\n(with stratifying)")

# %% [markdown]
# In this case, we observe that the class counts are very close both in the
Expand Down

0 comments on commit 060bd89

Please sign in to comment.