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

GaussianRotationProposal logTransitionProbability returns -inf (see #105) #104

Open
MartialBiry opened this issue Apr 22, 2018 · 1 comment
Labels

Comments

@MartialBiry
Copy link
Contributor

Bug:

The logTransitionProbability implementation in the GaussianRotationProposal class returns -inf in cases where it should be a value.
For the logTransitionRatio it calls the logTransistionProbability forward (current to new proposal) and backward (new proposal to current). One of them is always -inf.

As example Data all RenderParameter can be used if the have a delta in the specific rotation angle.
Initialization:
GaussianRotationProposal(Vector3D.unitY, 0.01f)

If a proposal is from this ProposalGenerator then it needs a delta of yaw.

if the delta is positiv, it works as intented (the Rotation3D object has a positiv phi and the rotation axis is [0,1,0])
if the delta is negativ the Rotation3D object has an negative phi and a negative rotation axis [0,-1,0]

The last if condition checks if the Proposal is from the same axis:
if (math.abs(rot.phi) > 1e-5 && rot.axis dot axis < 1.0 - 1e-4)
If we have the axis [0,1,0] the dot product is 1.0, if the axis is [0,-1,0] the dot product is -1.0

Fix for this case could be
if (math.abs(rot.phi) > 1e-5 && math.abs(rot.axis dot axis) < 1.0 - 1e-4)

@Andreas-Forster Andreas-Forster changed the title GaussianRotationProposal logTransitionProbability returns -inf GaussianRotationProposal logTransitionProbability returns -inf (see #105) Apr 24, 2018
@Andreas-Forster
Copy link
Member

Andreas-Forster commented Apr 24, 2018

Associated PR #105

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

No branches or pull requests

2 participants