Skip to content

generalized binary prior likelihood issue #142

@xxie6

Description

@xxie6

Hi! When using the generalized binary prior with flashier, I came across some instances where the KL estimate is negative. For example, for the flash fit generated by the code below:

set.seed(1)
X <- matrix(rnorm(100*1000), nrow=100, ncol=1000)
gb_flash_fit <- flash_init(X) |> flash_greedy(Kmax = 2, ebnm_fn = ebnm::ebnm_generalized_binary)

I found that all of the (negative) KL values were positive, e.g. one was 34.39.

I think there is an issue with the likelihood calculation. I looked through the code and I think in the generalized_binary.R file, line 228, the log(pi) term should be log(2*pi)?

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