Skip to content

NA or NaN not being accepted #5

@follhim

Description

@follhim

Hello,
When I came across this package, I was SUPER excited because this has everything I was looking for and more!
FIML, 3-step for covariates, and even BCH!

However I'm running into a problem:

Error in py_call_impl(callable, call_args$unnamed, call_args$named) : 
  ValueError: Input X contains NaN.
StepMix does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values

Essentially, it's not happy that there is NaN, however I don't understand how to fix this. In your Notebook it simply works, but not for me.

Would greatly appreciate help on this matter!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions