-
-
Save proywm/49be64968550ae683b34be6fbb517daf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib | |
import matplotlib.pyplot as plt | |
plt.style.use('seaborn-whitegrid') | |
import numpy as np | |
axes = plt.axes() | |
axes.set_ylim([0, 1.1]) | |
fname= "h1/f1" | |
pname= "h1/p" | |
rname= "h1/r" | |
with open(fname, 'r') as file_name: | |
fn_value = np.genfromtxt(file_name, dtype=np.float) | |
with open(pname, 'r') as file_name: | |
p_value = np.genfromtxt(file_name, dtype=np.float) | |
with open(rname, 'r') as file_name: | |
r_value = np.genfromtxt(file_name, dtype=np.float) | |
y, x = np.split(fn_value,[-1],axis=1) | |
yP, xP = np.split(p_value,[-1],axis=1) | |
yR, xR = np.split(r_value,[-1],axis=1) | |
plt.plot(y, x, '-o', color = 'r', label='F1 Score', markersize=8); | |
plt.plot(yP, xP, '-^', color = 'g', label='Precision', markersize=8); | |
plt.plot(yR, xR, '-v', color = 'b', label='Recall', markersize=8); | |
plt.xlabel(r'Threshold $\tau$') | |
plt.legend(loc='lower right') | |
plt.savefig('Accuracy_Spec_go_H1.pdf') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment