-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
15 lines (13 loc) · 709 Bytes
/
test.py
File metadata and controls
15 lines (13 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import random
from estimateVC import estimate_vc_sauer, estimate_vc_shattering
from induceLabels import union_of_intervals, separating_hyperplanes, rectangles
if __name__ == "__main__":
make_example = lambda: (random.random(), random.random())
print("Rect:", estimate_vc_sauer(make_example, rectangles))
# for i in range(100):
# make_example = lambda: [random.random() for _ in range(i + 1)]
# print(i, ":", estimate_vc_shattering(make_example, separating_hyperplanes))
# for i in range(100):
# make_example = lambda: random.random()
# induce_labels = lambda s: union_of_intervals(s, i)
# print(i, ":", estimate_vc_sauer(make_example, induce_labels))