stan-dev / stan-dev/stanc3

add syntax for mixtures of distributions

Open
#473 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
OCaml
Stars
160
Forks
59
Avg merge
21h 45m
Merged PRs (30d)
26

Description

Andrew suggested something to make mixture modeling easier. I'm not sure what he's thinking in terms of syntax, but maybe something like a distribution like this:

y ~ finite_mixture(lambda, 
                   normal(mu1,sigma1), 
                   normal(mu2,sigma2), 
                   normal(mu3,sigma3) );

or a special "function" like

target += finite_mixture(lambda,
                         normal_log(y,mu1,sigma1),
                         normal_log(y,mu2,sigma2),
                         normal_log(y,mu3,sigma3));

Of course, these aren't functions with the usual type of signature.

Another issue is how to deal with vectorization.

Contributor guide

No contributing guide indexed for this repository

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

Review the proposed finite_mixture syntax and the issue's concern about nonstandard function signatures and vectorization. First resolve the intended syntax and typing behavior; done means the mixture form and its vectorization rules are specified clearly enough to implement.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.