stan-dev / stan-dev/math

autodiff for matrix add and subtract

Open
#1,787 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

code cleanup feature
Dominant language
C++
Stars
839
Forks
220
Avg merge
2d 4h
Merged PRs (30d)
14

Description

Description

There are lots of functions that don't have reverse mode specializations.

Matrix operations

All of these would be very useful, espcially the basic arithmetic of the first five and inverse_spd because it's so important.

  • add
  • subtract
  • minus
  • elt_multiply
  • elt_divide
  • diag_post_multiply
  • diag_pre_multiply
  • quad_form_diag
  • chol2inv
  • `inverse_spd

All of the constraints would be good to specialize. These get used everywhere (the least important are corr_constrain and cov_matrix_constrain---the cholesky forms are more important for our recommended usages).

  • lb_constrain
  • ub_constrain
  • lub_constrain
  • corr_constrain
  • cov_matrix_constrain
  • cholesky_factor_constrain
  • cholesky_corr_constrain
  • offset_multiplier_constrain

Then there are some reductions:

  • mean
  • sd
  • variance

There are probably more.

Feel free to solve one or more of these in a PR.

Current Version:

v3.1.0

Contributor guide

Open the 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.

Research direction

Start by reading the existing reverse-mode specializations for the listed matrix operations, especially add and subtract, and compare them with the current implementations of those operations. Choose a specific operation and define done as adding its reverse-mode specialization with coverage for the relevant behavior; the issue does not name files or tests to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.