yasa.EpochByEpochAgreement.get_agreement#
- EpochByEpochAgreement.get_agreement(sample_weight=None, scorers=None, pooled=False)[source]#
Return a
pandas.DataFrameof weighted (i.e., averaged) agreement scores.- Parameters:
- sample_weightNone or
pandas.Series Sample weights passed to underlying
sklearn.metricsfunctions where possible. If apandas.Series, the index must match exactly that ofdata.- 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).- pooledbool
If False (default), agreement scores are computed per session and returned as a
DataFramewith one row per session. If True, all epochs across all sessions are pooled before computing a single set of agreement scores, returned as aSeries.
- sample_weightNone or
- Returns:
- agreement
pandas.DataFrameorpandas.Series If
pooled=False, aDataFramewith agreement metrics as columns and sessions as rows. Ifpooled=True, aSerieswith agreement metrics as index.
- agreement