stan-dev / stan-dev/stan

Things to fix in ADVI

Open
#2,195 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

code cleanup
Dominant language
C++
Stars
2.8k
Forks
388
Avg merge
2d 17h
Merged PRs (30d)
15

Description

Summary:

These were issues that were noticed when code reviewing for #1751. @bob-carpenter spotted most of these.

Description:
  • Change gradient_samples argument to the algorithm to something closer to "size of the sample" or "number of draws"
  • in fullrank and meanfield, rather than cont_params.resize(cont_vector.size());, we should use an Eigen::Map
  • document @throw and @return properly. Currently, run() looks like it can only return 0, but it does throw.
Current Version:

v2.14.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 locating the ADVI algorithm entry point and the implementations of fullrank and meanfield, then inspect gradient_samples and the cont_params.resize(cont_vector.size()) call. Review run()'s documented return and exception behavior. Done means the argument naming, Eigen mapping, and @throw/@return documentation items are all addressed and the relevant checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.