From 60353119bee9f824f49c922ae8c916cb3e572ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Galy-Fajou?= Date: Mon, 31 Jan 2022 16:54:37 +0100 Subject: [PATCH 1/3] Add BijectiveSimplexLink in the docs --- docs/src/api.md | 1 + src/links.jl | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/src/api.md b/docs/src/api.md index 48ec7ce..bd2875f 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -20,6 +20,7 @@ PoissonLikelihood ```@docs Link ChainLink +BijectiveSimplexLink ``` The rest of the links [`ExpLink`](@ref), [`LogisticLink`](@ref), etc., diff --git a/src/links.jl b/src/links.jl index e7e66c9..34d5493 100644 --- a/src/links.jl +++ b/src/links.jl @@ -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. """ struct BijectiveSimplexLink{L} <: AbstractLink link::L From be8fb9f89c0d6b6e483a880d6cdccadd972c074c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Galy-Fajou?= Date: Tue, 22 Mar 2022 15:14:32 +0100 Subject: [PATCH 2/3] Update src/links.jl Co-authored-by: st-- --- src/links.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/links.jl b/src/links.jl index 34d5493..9011adc 100644 --- a/src/links.jl +++ b/src/links.jl @@ -39,7 +39,7 @@ This is a necessary step to work with simplices. 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. +However, by wrapping the link into a `BijectiveSimplexLink`, only `n-1` latent GPs are needed. """ struct BijectiveSimplexLink{L} <: AbstractLink link::L From 456bbc4863ec730c0e393d5745f896f46c8db20e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Galy-Fajou?= Date: Tue, 22 Mar 2022 15:20:11 +0100 Subject: [PATCH 3/3] Update links.jl --- src/links.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/links.jl b/src/links.jl index 9011adc..2765b9e 100644 --- a/src/links.jl +++ b/src/links.jl @@ -39,7 +39,8 @@ This is a necessary step to work with simplices. 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 GPs are needed. +However, by wrapping the link into a `BijectiveSimplexLink`, only `n-1` latent GPs are needed +as a `0` is concatenated at the end. """ struct BijectiveSimplexLink{L} <: AbstractLink link::L