Reputation: 57
I have the values of precision and recall at every epoch in .csv format? Now, I want to plot this values in form of precision_recall curve.
I mean precision on Y-axis and Recall on X-axis.
How can I visualise it in python3?
Upvotes: 1
Views: 524
Reputation: 80574
Supposing your file is named 'my_precision_recall.csv' and looks like:
Recall,Precision
0.836,0.4672
0.8501,0.4447
...
You could plot your curve with 'Recall' as x-axis and 'Precision' as y-axis:
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('my_precision_recall.csv')
df.plot('Recall', 'Precision')
plt.show()
Upvotes: 1