yasa icon indicating copy to clipboard operation
yasa copied to clipboard

InconsistentVersionWarning because LabelEncoder from version 0.24.2 of scikit-learn

Open nabilalibou opened this issue 5 months ago • 2 comments

Hello,

Just want to point out the fact that predicting with yasa.SleepStaging() with recent sklearn versions seems to print an InconsistentVersionWarning:

\site-packages\sklearn\base.py:348: InconsistentVersionWarning: Trying to unpickle estimator LabelEncoder from version 0.24.2 when using version 1.3.2. This might lead to breaking code or invalid results. 
Use at your own risk. For more info please refer to: https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations

I am not sure about this warning origin and how it can be fixed. I put it here in case something can be solved on the yasa side and if some people also have this warning using SleepStaging().

nabilalibou avatar Feb 05 '24 14:02 nabilalibou

Thanks, this warning is shown because models were trained on an old version of scikit-learn. I don't think it impacts the accuracy of the model however. I will try to updated classifiers sometimes in the next months, using the latest scikit-learn and lightgbm versions available.

raphaelvallat avatar Feb 07 '24 15:02 raphaelvallat

Alright perfect, thanks

nabilalibou avatar Feb 07 '24 15:02 nabilalibou