Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

Is this a bug? #6

Open
markos523 opened this issue Jul 13, 2020 · 2 comments
Open

Is this a bug? #6

markos523 opened this issue Jul 13, 2020 · 2 comments

Comments

@markos523
Copy link

Hi everyone,

I've been experimenting with the following simple mln:

flip = {A}
flop = {C}

H(flip)
S(flop)

H(i) ^ S(o).

When inferring H and S, I would expect it to produce results similar to those
of the mln

flip = {A}
flop = {C}

H(flip)
S(flop)

10000 H(i) ^ S(o)

where the dot (.) has been replaced with a large weight.
I would expect the results to be

H(A) ~almost 1
S(C) ~almost 1

However, the results I get are something like this:

H(A) 0.329217
S(C) 0.338016

Why is this happening?

I performed the same experiment, replacing H(i) ^ S(o) with H(i) v S(o),
and indeed, the dot(.) and large weight versions of the mln produce similar
results. For some reason, this is not happening when instead of disjunction I use conjuction.
Why is this happening?

Can someone please provide an explanation?

@JoeDumoulin
Copy link
Contributor

JoeDumoulin commented Jul 13, 2020

I took a quick look at this this morning and if I understand you rules corectly, I think you will get what you want by replacing

H(flip)
S(flop)

with

H(flip!)
S(flop!)

As I understand the syntax, this forces the inference engine to take into account all realizations of 'flip', and 'flop' in your prior model.

with this change I get the following from infer.

H(A) 0.99995
S(C) 0.99995

I hope this helps.

Best of luck.

Joe D

@markos523
Copy link
Author

Hi Joe,
many thanks for your time and answer.
I'm still puzzled, though; In their book, Domingos and Lowd say
"In general, the ‘!’ notation signifies that, for each possible combination of values of the arguments without ‘!’, there is exactly one combination of the arguments with ‘!’ for which the predicate is true."
With that in mind, I don't think that declaring the predicates with '!' after the arguments is equivalent
to specifying H(i) ^ S(o) as a hard constraint, i.e. with a dot (.). I was however able to get the results
you present by replacing
H(i) ^ S(o).
with
H(i).
S(o).
i.e. two separate hard constraints. What still puzzles me is that although the dot notation
for a formula like
H(i) ^ S(o). or
H(i) => S(o).
gives the same results with
10000 H(i) ^ S(o) or
10000 H(i) => S(o) respectively,
(i.e. replacing the dot with a large weight)
this does is not the case for the conjuctive formula H(i) ^ S(o).

Again, many thanks for your time and answer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants