Skip to content

Skipping the Hastings computation for symmetric proposals #41

Closed
@luiarthur

Description

@luiarthur

In here and here, to compute the log acceptance probability (loga), the proposal density evaluated at the proposed and previous sample is always computed. However, this is not necessary if the proposal is symmetric, since q(spl, params_prev, params) - q(spl, params, params_prev) == 0.

Is there a reasonable way to check if the proposal is symmetric and, if it is, skip the Hastings part of the log acceptance probability computation?

I noticed this when looking at #39. The proposal is always Normal, so q doesn't need to be computed. I understand that there really isn't a computation bottleneck. But for multivariate proposals, it could be nice to avoid this unnecessary computation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions