Labo-Lacourse / stepmix

A Python package following the scikit-learn API for model-based clustering and generalized mixture modeling (latent class/profile analysis) of continuous and categorical data. StepMix handles missing values through Full Information Maximum Likelihood (FIML) and provides multiple stepwise Expectation-Maximization (EM) estimation methods.
https://stepmix.readthedocs.io/en/latest/index.html
MIT License
54 stars 4 forks source link

LCA with Mixed Features #13

Closed sarasilvacunha closed 1 year ago

sarasilvacunha commented 1 year ago

Hi!!! I'm having a problem with the "measurement" parameter in a database with 3 categorical and 25 continuous variables. I followed the example you share and in my Python it doesn't accept the variable "mixed_descriptor". The error that appears is the following:

" ValueError: emission value mixed_descriptor not recognized. Choose from dict_keys(['gaussian', 'gaussian_unit', .......etc.......]) "

Could you help me please?

sachaMorin commented 1 year ago

Hi! Could it be that you are passing the string "mixed_descriptor" instead of the variable mixed_descriptor? As discussed in the tutorial, you need to pass the variable returned by get_mixed_descriptor (in fact, a Python dict) to the measurement parameter.

sachaMorin commented 1 year ago

Otherwise, I would be happy to help if you provide the exact code leading to the error. Cheers!

sarasilvacunha commented 1 year ago

Hi!!! I restarted the kernel and that solved my problem :D Thank you very much for your attentiveness. Thanks also for sharing your content!!