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

categorical_nan missing value handling #20

Closed sachaMorin closed 1 year ago

sachaMorin commented 1 year ago

categorical_nan fails with the following traceback


    499     # Get maximal number of outcomes
    500     if max_n_outcomes is None:
--> 501         max_n_outcomes = int(array.max() + 1)
    502 
    503     # Create one-hot encoding

ValueError: cannot convert float NaN to integer```