-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_2.py
More file actions
23 lines (22 loc) · 793 Bytes
/
test_2.py
File metadata and controls
23 lines (22 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 j in [10,50,100,500,1000]:
r = [support_rand_baseline(-20,20, j) for k in range(20)]
#for v in r: print v
print j, np.var([support_rand_baseline(-20,20, j) for k in range(20)])
print j, np.var([support_rand(-20,20, j) for k in range(20)])
print '--------------------------'