Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ PoissonLikelihood
```@docs
Link
ChainLink
BijectiveSimplexLink
```

The rest of the links [`ExpLink`](@ref), [`LogisticLink`](@ref), etc.,
Expand Down
8 changes: 4 additions & 4 deletions src/links.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Base.inv(l::Link) = Link(InverseFunctions.inverse(l.f))
Wrapper to preprocess the inputs by adding a `0` at the end before passing it to
the link `link`.
This is a necessary step to work with simplices.
For example with the [`SoftMaxLink`](@ref), to obtain a `n`-simplex leading to
`n+1` categories for the [`CategoricalLikelihood`](@ref),
one needs to pass `n+1` latent GP.
However, by wrapping the link into a `BijectiveSimplexLink`, only `n` latent are needed.
For example with the [`SoftMaxLink`](@ref), to obtain a `n-1`-simplex leading to
`n` categories for the [`CategoricalLikelihood`](@ref),
one needs to pass `n` latent GP.
However, by wrapping the link into a `BijectiveSimplexLink`, only `n-1` latent GP are needed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What effect does this reparametrisation have on the model? Does it break the symmetry amongst classes (i.e., would changing the order of classes change the resulting fit)? Would it be useful to mention the 0 added at the end in the docstring, or is that irrelevant?

Also, a harder question that you may not have the answer to but I would be curious if this makes it easier to fit the model (because there's no more redundancy through the overall level, and hence it becomes identifiable)...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in some quick 1-D experiments with a few classes I did in my thesis. I generated data via the [fs, 0] process and trying to recover the latent GPs with the bijective and non-bijective link.
I consistently observed that the bijective link produced more correct probability distributions (compared to the true generating probabilities) but that the non-bijective likelihood had a better log-likelihood on the training data

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was with the logistic-softmax link. Also the augmentation non-bijective creates improper priors whereas in the bijective case all is nice and beautiful.
In terms of speed there does not seem to be a difference, but I did not check thoroughly

"""
struct BijectiveSimplexLink{L} <: AbstractLink
link::L
Expand Down