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)
Bug:
The
logTransitionProbability
implementation in theGaussianRotationProposal
class returns -inf in cases where it should be a value. For thelogTransitionRatio
it calls thelogTransistionProbability
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 theRotation3D
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.0Fix for this case could be
if (math.abs(rot.phi) > 1e-5 && math.abs(rot.axis dot axis) < 1.0 - 1e-4)