Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to draw precision and recall curve for Known class? #119

Open
JiuqingDong opened this issue May 7, 2023 · 0 comments
Open

How to draw precision and recall curve for Known class? #119

JiuqingDong opened this issue May 7, 2023 · 0 comments

Comments

@JiuqingDong
Copy link

JiuqingDong commented May 7, 2023

Dear author, I would like to know how to draw the P-R curve and Confusion metrics for known classes.

Although you provide a function here, I can not use it to draw a PR curve for all classes.

def plot_pr_curve(precision, recall, filename, base_path='/home/fk1/workspace/OWOD/output/plots/'):

def plot_pr_curve(precision, recall, filename, base_path='xxxxx/output/plots/'):
fig, ax = plt.subplots()
ax.step(recall, precision, color='r', alpha=0.99, where='post')
ax.fill_between(recall, precision, alpha=0.2, color='b', step='post')
plt.xlabel('Recall')
plt.ylabel('Precision')
plt.ylim([0.0, 1.05])
plt.xlim([0.0, 1.0])
plt.savefig(base_path + filename)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant