-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.py
40 lines (35 loc) · 1.09 KB
/
test.py
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
32
33
34
35
36
37
38
39
40
import Support
from Support import *
import basestuff
from basestuff import *
from time import time
filename = "data/brent-daily.csv"
datecols = ['Date']
load_from_csv(filename,columns = ['Date','Price'],datecols=datecols,nrows=1000)
RoI_Split()
#print tightest_statement(.8)
#print MostSupportedStatement(20)
#print support_baseline(10,50)
print support(10,50)
print support_rand_baseline(10, 50, 10,True)
print support_rand_constrained(10, 50, 100,10)
#print support_rand_baseline(10, 50, 10)
'''
for i in range(10):
v1 = np.var([support_rand_baseline(10, 50, 10) for j in range(10)])
v2 = np.var([support_rand(10, 50, 10) for j in range(10)])
print 'baseline: ', v1, 'smart: ', v2
t = time()
print support_baseline(10,50)
print time()-t
print support_constrainted(10,50,100,baseline=True)
t = time()
print support(10,50)
print time()-t
for i in range(10):
v1 = np.var([support_rand_baseline(10, 50, 10) for j in range(10)])
v2 = np.var([support_rand(10, 50, 10) for j in range(10)])
print 'baseline: ', v1, 'smart: ', v2
#for i in range(10):
# print support_rand(10, 50, 10)
'''