Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalization in condensed Chain factor #715

Open
wkretschmer opened this issue Jun 9, 2017 · 4 comments
Open

Normalization in condensed Chain factor #715

wkretschmer opened this issue Jun 9, 2017 · 4 comments

Comments

@wkretschmer
Copy link
Contributor

In theory, the following two elements are equivalent:

val e1 = If(Flip(0.5), Select(0.4 -> 0, 0.6 -> 1), Select(0.6 -> 0, 0.4 -> 1))
val e2 = If(Flip(0.5), Select(0.4 -> 0, 0.6 -> 1), Select(1.2 -> 0, 0.8 -> 1))

The only difference is whether or not the Select in the second argument is normalized. However, running StructuredVE on the second element returns an incorrect result for the distribution. The reason why is that the condensed Chain factor is incorrect when subproblems are not normalized. There are a two ways I could resolve this:

  1. Change factor creation to normalize everything. In other words, make every model without evidence have partition function 1.
  2. Explicitly normalize the subproblems when computing the condensed factor.
@matanox
Copy link

matanox commented Sep 28, 2017

I wonder why is a non-normalized Select allowed in the first place, but I'm just getting started. I mean why doesn't Select enforce normalization by rejecting a tuple that doesn't add up to 1, or auto-normalize upon instantiation.

@wkretschmer
Copy link
Contributor Author

This is precisely the issue! The normalization is inconsistently applied. I agree that the best way to solve this might be to move some level of normalization to Select initialization, however my concern is that the lack of normalization might occur elsewhere in the codebase.

@bruttenberg
Copy link
Collaborator

This normalization issue is popping up in influence diagrams as well. @apfeffer do you have any objection if I change the Select factory to always normalize the factors? I don't see how this could be a problem

@apfeffer
Copy link
Contributor

apfeffer commented Oct 17, 2017 via email

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

No branches or pull requests

4 participants