-
Notifications
You must be signed in to change notification settings - Fork 0
/
generateTestData.py
69 lines (48 loc) · 1.57 KB
/
generateTestData.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
__author__ = 'max'
import random
file = open('normal-3-1.txt','w')
for i in range(1000):
file.write(str(int((random.normalvariate(3,1)+1)))+"\n")
file.close()
file = open('normal-6-2.txt','w')
for i in range(1000):
file.write(str(int((random.normalvariate(6,2)+1)))+"\n")
file.close()
file = open('normal-100-30.txt','w')
for i in range(1000):
file.write(str(int((random.normalvariate(100,30)+1)))+"\n")
file.close()
file = open('pareto-1.txt','w')
for i in range(1000):
file.write(str(int((random.paretovariate(1))*100))+"\n")
file.close()
file = open('pareto-1p1.txt','w')
for i in range(1000):
file.write(str(int((random.paretovariate(1.1))*100))+"\n")
file.close()
file = open('pareto-2.txt','w')
for i in range(1000):
file.write(str(int((random.paretovariate(2))*100))+"\n")
file.close()
file = open('pareto-3.txt','w')
for i in range(1000):
file.write(str(int((random.paretovariate(3))*100))+"\n")
file.close()
file = open('pareto-4.txt','w')
for i in range(1000):
file.write(str(int((random.paretovariate(4))*100))+"\n")
file.close()
file = open('biNormal-100-300--30.txt','w')
for i in range(1000):
if random.random() > 0.5:
file.write(str(int((random.normalvariate(100,30))+1))+"\n")
else:
file.write(str(int((random.normalvariate(300,30))+1))+"\n")
file.close()
file = open('biNormal-100-300--10.txt','w')
for i in range(1000):
if random.random() > 0.5:
file.write(str(int((random.normalvariate(100,10))+1))+"\n")
else:
file.write(str(int((random.normalvariate(300,10))+1))+"\n")
file.close()