Skip to content

Possible bug in poisson_weak #1

@gaurav-arya

Description

@gaurav-arya

In the poisson_weak implementation:

poisson_weak drate = ContT $ \dloss -> do
let (rate, rate') = split (exp (ln drate))
x_neg <- poisson rate
let x_pos = x_neg + 1
y_neg <- dloss x_neg
y_pos <- dloss x_pos
let grad = primal y_pos - primal y_neg
return (bundle (primal y_neg) (grad * rate'))

it looks like the derivative contribution from the continuation might be missing from the returned dual number. i.e. something like grad * rate' + tangent y_neg rather than just grad * rate'.

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