Closed liu-yang-maker closed 1 year ago
Hey,
When we are talking about open vs closed predicates, we are really talking about the types of variables (unobserved vs observed) that the predicate produces.
Closed predicates can only produce atoms that are observed. Closed predicates have a closed-world assumption applied to them, so any ground atom that uses a closed predicate and does not have an explicitly defined value takes on a value of 0.0 (false). These semantics are very similar to other SRL frameworks/languages (like MLNs) and other probabilistic programming in-general.
Open predicates can have both observed and unobserved values, and does not have the closed world assumption applied to them. For open predicates, all reachable atoms (atoms that may be used in a ground rule) has to be specified. To see a predicate that has both observed and unobserved data, you can look at the simple-acquaintances example. You can see in the data file for the most recent release, that "Knows" is marked as open and has data loaded into both "observations" (observed data) and "targets" (unobserved data). (Also note that the new configuration format used in the next release does not explicitly state open/closed, but instead infers that information from the data provided.)
For reference, you can see the canonical PSL paper (Section 4.1.2).
Hope this helps.
Thanks for your reply!!!
I have been reviewing the examples provided in the project and noticed that in all the examples, the predicate is consistently set as "predicate_closed=True". I would like to understand the rationale behind this choice and its implications for the project.
Could you example whether it should to distinguish the predicate as open or closed? Why the target predicate also set as "open"? Could you please provide some insights? Thanks a lot.