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

MixtureModel with Continuous and Discrete #332

Closed
dfagnan opened this issue Jan 12, 2015 · 6 comments
Closed

MixtureModel with Continuous and Discrete #332

dfagnan opened this issue Jan 12, 2015 · 6 comments

Comments

@dfagnan
Copy link

dfagnan commented Jan 12, 2015

Is there a reason not to allow for mixtures with both continuous and discrete underlying distributions?

It seems like right now it would break the model, since it would be neither discrete nor continuous in terms of ValueSupport. I guess this would be a major change.

MixtureModel([Normal(); Geometric(0.5)])

ERROR: `variate_form` has no method matching variate_form(::Type{Sampleable{F<:V
ariateForm,S<:ValueSupport}})
 in MixtureModel at C:\Users\David\.julia\v0.3\Distributions\src\mixturemodel.jl
:20
 in MixtureModel at C:\Users\David\.julia\v0.3\Distributions\src\mixturemodel.jl
:29
@lindahua
Copy link
Contributor

Yes, all components should be on the same space. We haven't explicitly enforced this constraint yet, but need to work on this.

@abraunst
Copy link

abraunst commented Apr 8, 2019

What about atomic distributions, are they continuous or discrete? More in particular, how does a distribution which is a mixture of continuous and point-mass fits here? Is it continuous or discrete? (math answer IMO: it is neither -- continuous and discrete are not complementary)

Real example: I'm interested in spike-and-slab or Gauss-Bernoulli (mixture of an atomic point-mass distribution and a normal). Right now it seems the only way of producing this is by using a degenerate normal with sigma=0 instead of a point-mass. Is this intended?

@matbesancon
Copy link
Member

@abraunst I think in that case you should construct your own mixture type in that case, not use the common one, assuming same space for the two distributions seems expectable

@abraunst
Copy link

abraunst commented May 8, 2019

@matbesancon While I agree with your statement, I think that "continuous" is a bit ambiguous: it may mean that the distribution is defined on the real line (i.e. a distinction on the space on which is defined, as you mention) or that it is absolutely continuous. I think that the former is more useful.

So, in my humble opinion, discrete should mean that the distribution is defined on a subset of Z or Z^n (and continuous all other cases). In this interpretation the point mass (and mixtures of point mass) should be continuous.

@mschauer
Copy link
Member

mschauer commented May 8, 2019

The absolute continuity is best seen as a property of the pdf. Continuous then just means that the pdf is given with respect to the Lebesgue measure.

@abraunst
Copy link

abraunst commented May 8, 2019

The absolute continuity is best seen as a property of the pdf. Continuous then just means that the pdf is given with respect to the Lebesgue measure.

@mschauer I don't understand. If a measure has a pdf wrt. to the Lebesgue measure, then it is absolutely continuous. So using this interpretation of "continuous" something like spike-and-slab is neither discrete nor continuous. Or am I missing something?

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

5 participants