yasa.EpochByEpochAgreement.get_agreement#

EpochByEpochAgreement.get_agreement(sample_weight=None, scorers=None)[source]#

Return a pandas.DataFrame of weighted (i.e., averaged) agreement scores.

Parameters:
sample_weightNone or pandas.Series

Sample weights passed to underlying sklearn.metrics functions where possible. If a pandas.Series, the index must match exactly that of data.

scorersNone, list, or dictionary

The scorers to be used for evaluating agreement. If None (default), default scorers are used. If a list, the list must contain strings that represent metrics from the sklearn metrics module (e.g., accuracy, precision). If more customization is desired, a dictionary can be passed with scorer names (str) as keys and custom functions as values. The custom functions should take 3 positional arguments (true values, predicted values, and sample weights).

Returns:
agreementpandas.DataFrame

A DataFrame with agreement metrics as columns and sessions as rows.