yasa.EpochByEpochAgreement.get_agreement_bystage#

EpochByEpochAgreement.get_agreement_bystage(beta=1.0)[source]#

Return a pandas.DataFrame of unweighted (i.e., one-vs-rest) agreement scores.

Parameters:
betafloat

Weight of recall relative to precision in the F-score. Default is 1.0 (i.e., F1). See sklearn.metrics.precision_recall_fscore_support.

Returns:
agreementpandas.DataFrame

A DataFrame with agreement metrics as columns (fbeta, npv, precision, recall, specificity, support) and a MultiIndex with session and sleep stage as rows.

specificity (True Negative Rate) and npv (Negative Predictive Value) are computed using a one-vs-rest confusion matrix per stage.