stan-dev / stan-dev/stan

Mean and count priors parameterizations for Beta and Dirichlet

Open
#1,563 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

  • add following parameterization of Beta
Beta_mean(theta | mu, phi) = Beta(theta | mu * phi, (1 - mu) * phi)

We could add it without any customized gradients first.

  • ditto for Dirichlet
Dirichlet_mean(theta | mu, phi) = Dirichlet(theta | mu * phi)
  • add a simple symmetric Dirichlet
Dirichlet_sym(theta | alpha) = Dirichlet(theta | rep(alpha, size(theta))
  • and a similar symmetric Beta
Beta_sym(theta | alpha) = Beta(theta | alpha, alpha)

The latter two will save memory by allowing simpler vari implementations.

  • go off and do this in Stan math with tests
  • expose functions in language

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 reviewing the existing Beta and Dirichlet distribution implementations in Stan Math and their tests, then investigate how distribution functions are exposed in the Stan language. Done means supporting mean-and-count parameterizations and symmetric Beta and Dirichlet forms, with Stan Math tests and language exposure as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data
Issue type
Feature
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.