stan-dev / stan-dev/stan

softmax, categorical, multinomial with K-1 parameters for identifiability

Open
#266 11 comments 1 reaction 1 assignee View on GitHub

@bob-carpenter is already working on this.

Since Oct 8, 2013.

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

Description

Add new versions of all these functions for the (K-1)-vector parameterization of softmax.

softmax_dofm1(vector x)  =def=  softmax(c(x,0) )

where c(x,0) is the R function to append 0 to the end of x.

The advantage is that the degrees of freedom matches that of the simplex target, so the model's identified without priors.

The disadvantage is that the priors have to change relative to the K-value parameterization and are no longer symmetric.

  • Any suggestions for a better name than dofm? I suppose we could say identified.
  • Any preference for c(x,0) or c(0,x), i.e., should the 0 value be the first or the last element?

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.