Description Usage Arguments Details Value Note Author(s) See Also Examples
The softmax function: exponentiate a vector and then normalize.
1 |
eta |
numeric array of the odds. The odds are de-meaned within each group. |
g |
a vector giving the group indices. If |
Given vector η for a single group, essentially computes vector μ defined by
μ_i = \frac{\exp{η_i}}{∑_j \exp{η_j}}.
Note that this computation should be invariant with respect to level shifts of the η, and thus we de-mean the odds first.
the exponentiated data normalized. For the row-wise version, each row is soft maxed.
This function can deal with overflow in a semi-coherent way.
Steven E. Pav shabbychef@gmail.com
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.