Conversation
…endentSets graph traversals
Contributor
|
For discussion - it's not clear to me why tests would go into I've added a (the?) regression test for the example in #1564. I'll note that |
Contributor
|
This passed testing previously; I just canceled the tests to avoid a bunch of test computation when adding the simple regression test. |
Contributor
|
This passes the (limited new) tests in (Actually a test-quadrature.R test is failing, but that was apparently failing before.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am throwing this up as a candidate fix. It fixes Issue #1564 and it passes test-setupMargNodes.R.
We should probably tests in (at least) nimbleQuad (in development at this time) and nimbleSMC,
If this seems to work, I will document more about the change and add a regression test.
The basic idea is: don't mark deteministic nodes as touched during getConditionallyIndependent sets traversals of the graph. The reason is that as we are iterating over a set of parent (or presumably in some cases child) nodes, the recursions could pass through a deterministic node that then needs to be passed through by a later parent (or child) node of the original iterations. But if it has been "touched" (tagged as done), then it blocks activity. But in the case of a deterministic node, this is not really correct. So it takes a particular setup of nodes to trigger the issue. I think it is actually correct to never tag deterministic nodes, since the algorithm is fundamentally about stochastic nodes.