Skip to content

Add API for residuals and Jacobians for least-squares type log-densities #107

@jeffrey-hokanson-numerica

Description

Some recent MCMC samplers such as "Randomize-then-optimize" exploit least squares structure in the log-likelihood; i.e., the log-density has the form $f(x) = \sum_j f_j(x)^2$. Could we add this kind of derivative information into the API? As a proposal, I would suggest something like

residual(ℓ, x)
jacobian(ℓ, x)

which is similar to the NLSolversBase.jl API. Non-allocating versions would be helpful as well, e.g., writing into the last argument

residual!(ℓ, x, res)
jacobian!(ℓ, x, jac)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions