mirror of
https://github.com/GokuMohandas/Made-With-ML.git
synced 2026-03-09 07:12:37 -05:00
Missing legend in the plot of Logistic Regression #48
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nguyenvulong on GitHub (May 7, 2023).
Problem: only

malignantlegend was shown (plot datasection of the Logistic Regression lesson.)Fix
I am not sure if I should create a PR for a notebook ... so I created this issue with a working code instead. Please see below
@ShathishWarmaS commented on GitHub (May 26, 2023):
Both are showing

Plot the data for each class separately
fig, ax = plt.subplots()
ax.scatter(X_benign[:, 0], X_benign[:, 1], c="blue", s=25, edgecolors="k", label="benign")
ax.scatter(X_malignant[:, 0], X_malignant[:, 1], c="red", s=25, edgecolors="k", label="malignant")
ax.set_xlabel("leukocyte count")
ax.set_ylabel("blood pressure")
ax.legend(loc="upper right")
plt.show()
@nguyenvulong commented on GitHub (May 29, 2023):
@ShathishWarmaS I know. What I was talking about is that the original code, which is plotting both classes using one
scatter, is not working.@chris-caballero commented on GitHub (Jul 20, 2023):
Can I work on this?
@yuboona commented on GitHub (Jul 20, 2023):
您的邮件我已收到,将尽快回复!!