forked from PlanetaryDefense/PD-Webpage-Classifier
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlotAccuracy.py
More file actions
25 lines (20 loc) · 689 Bytes
/
PlotAccuracy.py
File metadata and controls
25 lines (20 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import matplotlib.pyplot as plt
import csv
"""
Short script that uses pyplot to plot the percentage of relevant webapges
for each round of the fully classified dataset.
NOTE: User of program must edit paths accordingly
"""
# put csv file into list
with open('/Users/yjiang/Documents/nutch_data/classification/output_classification.csv', encoding="utf8") as csv_file:
reader = csv.reader(csv_file, delimiter = ",")
data = list(reader)
rounds = []
percentage = []
for round in range(0, len(data)):
rounds.append(data[round][:][0])
percentage.append(data[round][1][:])
plt.plot(rounds, percentage)
plt.ylabel('Accuracy Percentage')
plt.xlabel('Round Number')
plt.show()