yasa.SleepStaging.predict#
- SleepStaging.predict(path_to_model='auto')[source]#
Return the predicted sleep stage for each 30-sec epoch of data.
Currently, only classifiers that were trained using a LGBMClassifier are supported.
- Parameters:
- path_to_modelstr or “auto”
Full path to a trained LGBMClassifier, exported as a joblib file. Can be “auto” to use YASA’s default classifier.
- Returns:
- pred
yasa.Hypnogram The predicted sleep stages. Since YASA v0.7, the predicted sleep stages are now returned as a
yasa.Hypnograminstance, which also includes the probability of each sleep stage for each epoch.
- pred