-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdataVisualize.py
More file actions
31 lines (26 loc) · 780 Bytes
/
dataVisualize.py
File metadata and controls
31 lines (26 loc) · 780 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
26
27
28
29
30
31
'''
Mogamad Raa-iq Williams
Data Mining
'''
from pylab import plot, show, figure, subplot, hist, xlim
from dataImport import *
#Visualization
print("-----------")
print("Visualization")
print("-----------")
#Printing test visualization of Frequency(V2) with Time(V4)
#hence determining total number of donations considering total time since first donation
plot(data[target == 1,1],data[target==1,3],'bo')
plot(data[target == 2,1],data[target==2,3],'ro')
show()
#Plotting and printing of histograms
xmin = min(data[:,1])
xmax = max(data[:,1])
figure()
subplot(211) # distribution of the first class
hist(data[target == 1,1],color='b',alpha=.7)
xlim(xmin,xmax)
subplot(212) # distribution of the second class
hist(data[target == 2,1],color='r',alpha=.7)
xlim(xmin,xmax)
show()