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

Precision - Recall plot using 15 values #6

Open
anwarMZ opened this issue Jan 29, 2018 · 1 comment
Open

Precision - Recall plot using 15 values #6

anwarMZ opened this issue Jan 29, 2018 · 1 comment

Comments

@anwarMZ
Copy link

anwarMZ commented Jan 29, 2018

Hi,

I am trying to understand how to use this package based on the results that i have. Hopefully you can help a bit.
I have two classifiers and calculated precision and recall at 15 different threshold for each of them.

Classifier 1
Threshold - Recall - Precision
1 - 0.xxx - 0.xxx
2 - 0.xxx - 0.xxx
3 - 0.xxx - 0.xxx
.....
15 - 0.xxx - 0.xxx

Classifier 2
Threshold - Recall - Precision
1 - 0.xxx - 0.xxx
2 - 0.xxx - 0.xxx
3 - 0.xxx - 0.xxx
.....
15 - 0.xxx - 0.xxx

But i am not sure how to plot sscurves for it. Do i have to calculate F1 scores and use them as scores?
What are the positive and negative values as in data P10N10? Labels i assume would be the threshold values?

Would be really helpful if you can direct me towards the solution.

Cheers,
Zohaib

@takayasaito
Copy link
Member

It seems like that you have already calculated precision and recall values yourself. You can simply make a plot with R's regular plot and lines functions if you are interested in creating precision-recall curves.

plot(x = your_df1[, 2], y = your_df1[, 3], type = "l", xlim = c(0, 1), ylim = c(0,1))
lines(x = your_df2[, 2], y = your_df2[, 3], type = "l")

You need at least two types of data if you want to use precrec to calculate precision-recall curves - the scores that the classifiers of your interest has produced from your test data and the labels from the same test data - as you can see them in P10N10 as an example.

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

2 participants