-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_generation.py
130 lines (120 loc) · 4.08 KB
/
data_generation.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
from trustscore import generation
"""
DATA LABEL INFORMATION
+--------+---------------------+---------------------+-----------------------------+
| | USER_IDENTITY_TRUST | USER_BEHAVIOR_TRUST | ORGANIZATION_IDENTITY_TRUST |
+--------+---------------------+---------------------+-----------------------------+
| UHH_OH | HIGH | HIGH | HIGH |
+--------+---------------------+---------------------+-----------------------------+
| UHH_OL | HIGH | HIGH | LOW |
+--------+---------------------+---------------------+-----------------------------+
| UHL_OH | HIGH | LOW | HIGH |
+--------+---------------------+---------------------+-----------------------------+
| UHL_OL | HIGH | LOW | LOW |
+--------+---------------------+---------------------+-----------------------------+
| ULH_OH | LOW | HIGH | HIGH |
+--------+---------------------+---------------------+-----------------------------+
| ULH_OL | LOW | HIGH | LOW |
+--------+---------------------+---------------------+-----------------------------+
| ULL_OL | LOW | LOW | HIGH |
+--------+---------------------+---------------------+-----------------------------+
| ULL_OL | LOW | LOW | LOW |
+--------+---------------------+---------------------+-----------------------------+
"""
MODEL_PATH = "trust-ontology/ontology/trust_ontology.ttl"
N_USER = 1000
RANGES = [(0, 0.5), (0.5, 1)]
IDENTITY_DIST_HIGH = [0.3, 0.7]
IDENTITY_DIST_LOW = [0.7, 0.3]
BEHAVIOR_DIST_HIGH = [0.3, 0.7]
BEHAVIOR_DIST_LOW = [0.7, 0.3]
ORG_IDENTITY_HIGH = 0.9
ORG_IDENTITY_LOW = 0.3
# UHH_OH
generation.build_trust_graph(
model_path=MODEL_PATH,
n_user=N_USER,
ranges=RANGES,
identity_dist=IDENTITY_DIST_HIGH,
behavior_dist=BEHAVIOR_DIST_HIGH,
org_identity_trust=ORG_IDENTITY_HIGH,
destination_dir="result",
file_name="UHH_OH",
)
# UHH_OL
generation.build_trust_graph(
model_path=MODEL_PATH,
n_user=N_USER,
ranges=RANGES,
identity_dist=IDENTITY_DIST_HIGH,
behavior_dist=BEHAVIOR_DIST_HIGH,
org_identity_trust=ORG_IDENTITY_LOW,
destination_dir="result",
file_name="UHH_OL",
)
# UHL_OH
generation.build_trust_graph(
model_path=MODEL_PATH,
n_user=N_USER,
ranges=RANGES,
identity_dist=IDENTITY_DIST_HIGH,
behavior_dist=BEHAVIOR_DIST_LOW,
org_identity_trust=ORG_IDENTITY_HIGH,
destination_dir="result",
file_name="UHL_OH",
)
# UHL_OL
generation.build_trust_graph(
model_path=MODEL_PATH,
n_user=N_USER,
ranges=RANGES,
identity_dist=IDENTITY_DIST_HIGH,
behavior_dist=BEHAVIOR_DIST_LOW,
org_identity_trust=ORG_IDENTITY_LOW,
destination_dir="result",
file_name="UHL_OL",
)
# ULH_OH
generation.build_trust_graph(
model_path=MODEL_PATH,
n_user=N_USER,
ranges=RANGES,
identity_dist=IDENTITY_DIST_LOW,
behavior_dist=BEHAVIOR_DIST_HIGH,
org_identity_trust=ORG_IDENTITY_HIGH,
destination_dir="result",
file_name="ULH_OH",
)
# ULH_OL
generation.build_trust_graph(
model_path=MODEL_PATH,
n_user=N_USER,
ranges=RANGES,
identity_dist=IDENTITY_DIST_LOW,
behavior_dist=BEHAVIOR_DIST_HIGH,
org_identity_trust=ORG_IDENTITY_LOW,
destination_dir="result",
file_name="ULH_OL",
)
# ULL_OH
generation.build_trust_graph(
model_path=MODEL_PATH,
n_user=N_USER,
ranges=RANGES,
identity_dist=IDENTITY_DIST_LOW,
behavior_dist=BEHAVIOR_DIST_LOW,
org_identity_trust=ORG_IDENTITY_HIGH,
destination_dir="result",
file_name="ULL_OH",
)
# ULL_OL
generation.build_trust_graph(
model_path=MODEL_PATH,
n_user=N_USER,
ranges=RANGES,
identity_dist=IDENTITY_DIST_LOW,
behavior_dist=BEHAVIOR_DIST_LOW,
org_identity_trust=ORG_IDENTITY_LOW,
destination_dir="result",
file_name="ULL_OL",
)