yasa.SleepStaging.plot_predict_proba#

SleepStaging.plot_predict_proba(proba=None, majority_only=False, palette=('#99d7f1', '#009DDC', 'xkcd:twilight blue', 'xkcd:rich purple', 'xkcd:sunflower'))[source]#

Plot the predicted probability for each sleep stage for each 30-sec epoch of data.

Parameters:
probaself or DataFrame

A dataframe with the probability of each sleep stage for each 30-sec epoch of data.

majority_onlyboolean

If True, probabilities of the non-majority classes will be set to 0.

palettelist or tuple

The color of each column of proba. The default colors are for Wake, N1, N2, N3 and REM, in that order.

Returns:
axmatplotlib.axes.Axes

Matplotlib Axes.