Skip to content
Snippets Groups Projects
Commit d9c120e0 authored by tgupta6's avatar tgupta6
Browse files

generate plot in freq_acc_plot

parent ee24ebfe
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,10 @@ import ujson ...@@ -3,6 +3,10 @@ import ujson
import pprint import pprint
from collections import namedtuple from collections import namedtuple
from operator import attrgetter from operator import attrgetter
import numpy as np
import matplotlib
matplotlib.use('pdf')
import matplotlib.pyplot as plt
import constants import constants
...@@ -69,6 +73,19 @@ if __name__=='__main__': ...@@ -69,6 +73,19 @@ if __name__=='__main__':
# obj_test_freq_dict[obj], # obj_test_freq_dict[obj],
# ) # )
freq = []
acc = []
for record in sorted_records:
freq.append(record.train_freq)
acc.append(record.acc)
plt.plot(freq,acc)
plot_filename = os.path.join(
constants.region_object_scores_dirname,
'obj_acc_vs_freq.pdf')
plt.savefig(plot_filename)
print(len(obj_pred_data)) print(len(obj_pred_data))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment