-
Notifications
You must be signed in to change notification settings - Fork 542
/
deepdive.conf
48 lines (40 loc) · 1.48 KB
/
deepdive.conf
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
deepdive {
schema.variables {
person_has_cancer.has_cancer : Boolean
person_smokes.smokes : Boolean
}
extraction.extractors: {
# No extractors needed for this example
}
inference.factors: {
# Smokes(x) => Cancer(x)
smokes_cancer {
input_query: """
SELECT person_has_cancer.id as "person_has_cancer.id",
person_smokes.id as "person_smokes.id",
person_smokes.smokes as "person_smokes.smokes",
person_has_cancer.has_cancer as "person_has_cancer.has_cancer"
FROM person_has_cancer, person_smokes
WHERE person_has_cancer.person_id = person_smokes.person_id
"""
function: "Imply(person_smokes.smokes, person_has_cancer.has_cancer)"
weight: 0.5
}
# Friends(x, y) => (Smokes(x) <=> Smokes(y))
friends_smoke {
input_query: """
SELECT p1.id AS "person_smokes.p1.id",
p2.id AS "person_smokes.p2.id",
p1.smokes AS "person_smokes.p1.smokes",
p2.smokes AS "person_smokes.p2.smokes"
FROM friends INNER JOIN person_smokes AS p1 ON
(friends.person_id = p1.person_id) INNER JOIN person_smokes AS p2 ON
(friends.friend_id = p2.person_id)
"""
function: "Imply(person_smokes.p1.smokes, person_smokes.p2.smokes)"
weight: 0.4
}
}
calibration.holdout_fraction: 0.0
sampler.sampler_args: "-l 0 -s 10 -i 1000 -t 1 --alpha 0.01"
}