Gradient of LMM objective through automatic differentiation

Open
#312 4 comments 0 reactions 1 assignee View on GitHub

@dmbates is already working on this.

Since May 8, 2020.

Assessment

This issue has not been assessed yet.

Description

enhancement

Copying here from Slack so that it doesn't disappear.

I added a notebook to https://github.com/RePsychLing/ZiFPsychLing/ showing the forward mode and sketching the reverse-mode automatic differentiation of the objective for linear mixed models. I believe that forward-mode, though more tedious, will be the way to go because it preserves the sparsity of the system to generate L.

I have been playing around a bit with some examples and the way that I think this can be done is to add a vector of BlockArray objects of the same block structure as the L field in the LinearMixedModel structure. The updateL! function would then need to be changed to update the forward-mode L-dot at the same time as L. From there, getting the gradient is straightforward.

I believe the only changes in other structures needed for this is to carry around a scratch matrix of the same size a lambda in an ReMat structure.

Dominant language
Julia
Stars
455
Forks
51
Avg merge
3d 15h
Merged PRs (30d)
4

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaStats/MixedModels.jl

All issues in JuliaStats/MixedModels.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.