Skip to content

Commit

Permalink
add extra comments in UnivariateFinite type def
Browse files Browse the repository at this point in the history
  • Loading branch information
ablaom committed May 2, 2020
1 parent e78c1d6 commit 354f115
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/interface/univariate_finite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ abstract type NonEuclidean <: Dist.ValueSupport end

const UnivariateFiniteSuper = Dist.Distribution{Dist.Univariate,NonEuclidean}

struct UnivariateFinite{L,U,T<:Real} <: UnivariateFiniteSuper
decoder::CategoricalDecoder{L,U}
# C - original type (eg, Char in `categorical(['a', 'b'])`)
# U - reference type <: Unsigned
# T - raw probability type
# L - subtype of CategoricalValue, eg CategoricalValue{Char,UInt32}

struct UnivariateFinite{C,U,T<:Real} <: UnivariateFiniteSuper
decoder::CategoricalDecoder{C,U}
prob_given_class::LittleDict{U,T}
end

Expand Down

0 comments on commit 354f115

Please sign in to comment.