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

Link LCA with MixtureModels ExpectationMazimization.jl for EM and predict #2

Open
dmetivie opened this issue Nov 8, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@dmetivie
Copy link

dmetivie commented Nov 8, 2024

Hello,
I don't know much about (medical?) applications of LCA, however I do know about EM algo.
Looking at your package, I wanted to make you aware (if you are not already) of the MixtureModel from Distributions.jl. Indded the LCA you consider can be seen as a Mixture of Product distribution of Categorical variables.
Moreover, ExpectationMazimization.jl (I am the owner) is made to fit MixtureModels.
It is very generic and support in particular Mixture of Product distribution of Categorical variables.

Suggestion for this Issue: maybe the internal of your EM algo and predict can use ExpectationMazimization.jl?
The interface you design however should be kept as you prefer and as your community wants.
It feels a bit weird to push for "my" package, but here are some potential benefits:

  • First, here is a notebook to showcase how to use MixtureModel in your context + that the two packages do the exact same EM.
  • Independently of EM.jl, with MixtureModels it is very easy to generate artificial datasets e.g. for testing, unlike the "manual" used in the runtest.jl. See the notebook second example where I create a latent dataset with 4 items of [4, 2, 3, 5] categories with 3 classes.
  • EM.jl is faster and use less memory (see notebook benchmarks) -> if you don't agree on the depending on EM.jl you can always improve your EM having in mind my code.
  • EM.jl also implement Stochastic EM algo (see notebook at the end), and I aim to implement other methods at some point
  • You can focus on other aspect of your package
  • Dependencies of EM.jl are quite soft (mainly Distribution.jl)

If you are interested and want to discuss, we could set up a chat. Moreover, I could write a PR to show how small changes in your package's internals could without modifying the user interface support EM.jl (the conversion between LCA.jl and EM.jl is mostly done in the notebook)

I have other suggestions, but I'll open other issues to keep things separate.

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

No branches or pull requests

2 participants