Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated code sample in Mixture documentation #1843

Open
BatyLeo opened this issue Mar 20, 2024 · 0 comments
Open

Outdated code sample in Mixture documentation #1843

BatyLeo opened this issue Mar 20, 2024 · 0 comments

Comments

@BatyLeo
Copy link

BatyLeo commented Mar 20, 2024

This code sample seems outdated in the mixture page of the documentation.

Instead, according to the mixturemodel.jl source file it should be:

abstract type AbstractMixtureModel{VF<:VariateForm,VS<:ValueSupport,C<:Distribution} <: Distribution{VF, VS} end

struct MixtureModel{VF<:VariateForm,VS<:ValueSupport,C<:Distribution,CT<:Categorical} <: AbstractMixtureModel{VF,VS,C}
    components::Vector{C}
    prior::CT
end

const UnivariateMixture{S<:ValueSupport,   C<:Distribution} = AbstractMixtureModel{Univariate,S,C}
const MultivariateMixture{S<:ValueSupport, C<:Distribution} = AbstractMixtureModel{Multivariate,S,C}

The additional C<:Distribution is needed in order to be able to define a custom mixture without error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant