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

Generic N-ary multihypothesis (bad-init nullhypo addition) #248

Closed
dehann opened this issue Apr 2, 2019 · 10 comments · Fixed by #661 or #663
Closed

Generic N-ary multihypothesis (bad-init nullhypo addition) #248

dehann opened this issue Apr 2, 2019 · 10 comments · Fixed by #661 or #663

Comments

@dehann
Copy link
Member

dehann commented Apr 2, 2019

Binary hypothesis factors:

addFactor!(fg, .., multihypo=[1.0; 0.5; 0.5])

Produce two options where one must be true, and this is known to work well with sequential Gibbs sampling.

When more options are added, such as:

addFactor!(fg, .., multihypo=[1.0; 1/3;1/3;1/3])

sequential Gibbs sampling (with automated conditional construction) can arrive at inconsistent proposal distributions. The clearest example is from 3-door identified in #236:

  • three priored landmarks (:l0,:l1,:l2) at 0, 10, 40.
  • a pose x0 at 0.
  • single variable sampling where trying to predict :l1 or :l2 from other information
$$1/P [L1 | X0, L0, L2, Z]$$

Question is if it impossible to find the conditional [ | ] without the partition function 1/P that is guaranteed to always produce consistent proposals?

@dehann dehann added this to the v0.5.6 milestone Apr 2, 2019
@dehann dehann added the bug label Apr 2, 2019
@dehann dehann changed the title Generic N-ary multihypothesis Generic N-ary multihypothesis (affects greater and equal to tripple uncertainty) Apr 2, 2019
@dehann dehann changed the title Generic N-ary multihypothesis (affects greater and equal to tripple uncertainty) Generic N-ary multihypothesis (affects greater and equal to triple uncertainty) Apr 2, 2019
@dehann
Copy link
Member Author

dehann commented Apr 17, 2019

Update: i think the desired behavior is a compromise between the legacy nested Gibbs strategy and introduction of two nullhypothesis strategies.

Assumed solution at this point is expand the generalized multihypo API to automatically include an internal hypothesis---i.e. N+1 options---which represents stale particles from the current variable. This avoids programming absolute (or even relative) data about uncertain variables into the factor. This approach does change the proposal conditionals in Gibbs strategy to depend on old values of a proposed variable, but is limited to only one of (N+1) options.

If multihypo=[1.0;0.5;0.5], the internal code should increase to [1.0, 1/3,1/3,1/3] where the last option is treated as keep stale, null hypothesis option.

@dehann
Copy link
Member Author

dehann commented Apr 17, 2019

The rule of thumb is to multiply the uncertain values with the additional hypothesis -- i.e. binary becomes 2/3 * [p1, p2], or trinary becomes 3/4*[p1,p2,p3], etc. The last, 'new' null hypothesis mode will for the time being be set to 1/(N+1) likelihood.

@dehann
Copy link
Member Author

dehann commented Apr 17, 2019

fyi @keevindoherty

@dehann
Copy link
Member Author

dehann commented May 5, 2019

required for JuliaRobotics/Caesar.jl#141

@dehann
Copy link
Member Author

dehann commented Jun 10, 2019

moving this back (hopefully the last time) until after the DFG and CSM upgrades are sufficiently complete in IIF v0.7.0. Several (maybe slightly messy) cleanups to occur throughout IIF v0.7.x.

@dehann
Copy link
Member Author

dehann commented Jun 10, 2019

Oh, and about to tag v0.7.0

@dehann
Copy link
Member Author

dehann commented Jun 10, 2019

xref #237

@dehann
Copy link
Member Author

dehann commented Jul 10, 2019

xref #347

@dehann dehann modified the milestones: v0.7.3, v0.7.4 Jul 16, 2019
@dehann dehann modified the milestones: v0.7.4, v0.7.5 Aug 5, 2019
@dehann dehann modified the milestones: v0.7.x, v0.7.7 Sep 15, 2019
@dehann dehann modified the milestones: v0.7.7, v0.7.8 Sep 26, 2019
@dehann dehann modified the milestones: v0.7.8, v0.7.9 Oct 7, 2019
@dehann
Copy link
Member Author

dehann commented Oct 7, 2019

will do soon, sorry for the delay. Just resolving a long series of upstream breaking changes, but things starting to stabilize.

@dehann dehann modified the milestones: v0.7.9, v0.7.x Oct 16, 2019
@dehann dehann modified the milestones: v0.7.x, v0.8.x Nov 19, 2019
@dehann
Copy link
Member Author

dehann commented Dec 15, 2019

xref #462

@dehann dehann changed the title Generic N-ary multihypothesis (affects greater and equal to triple uncertainty) Generic N-ary multihypothesis (bad-init nullhypo addition) Mar 27, 2020
dehann added a commit that referenced this issue Mar 27, 2020
dehann added a commit that referenced this issue Mar 28, 2020
add bad-init resolution for multihypo (#248)
dehann added a commit that referenced this issue Mar 30, 2020
This was referenced Mar 30, 2020
@dehann dehann modified the milestones: shortlist, v0.11.1 Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant