Open tlamadon opened 4 months ago
I would like to suggest adding this method to compute the characteristic function of Univariate Mixtures:
function cf(d::UnivariateMixture,t) p = probs(d) m = sum(pi * cf(component(d, i),t) for (i, pi) in enumerate(p) if !iszero(pi)) return m end
This is a simple copy of the mean function but applied to the characteristic function. So I think it could be added next to it: https://github.com/JuliaStats/Distributions.jl/blob/c1705a3015d438f7e841e82ef5148224813831e8/src/mixtures/mixturemodel.jl#L173
It matches the general cf signature as seen here: https://github.com/JuliaStats/Distributions.jl/blob/c1705a3015d438f7e841e82ef5148224813831e8/src/univariates.jl#L293-L297
cf
I would like to suggest adding this method to compute the characteristic function of Univariate Mixtures:
This is a simple copy of the mean function but applied to the characteristic function. So I think it could be added next to it: https://github.com/JuliaStats/Distributions.jl/blob/c1705a3015d438f7e841e82ef5148224813831e8/src/mixtures/mixturemodel.jl#L173
It matches the general
cf
signature as seen here: https://github.com/JuliaStats/Distributions.jl/blob/c1705a3015d438f7e841e82ef5148224813831e8/src/univariates.jl#L293-L297