yasa.EpochByEpochAgreement.multi_scorer#
- static EpochByEpochAgreement.multi_scorer(df, scorers)[source]#
Compute multiple agreement scores from a 2-column dataframe (an optional 3rd column may contain sample weights).
This function offers convenience when calculating multiple agreement scores using
pandas.DataFrame.groupby.apply. Scikit-learn doesn’t include a function that returns multiple scores, and the GroupBy implementation ofapplyin pandas does not accept multiple functions.- Parameters:
- df
pandas.DataFrame A
DataFramewith 2 columns and length of n_samples. The first column contains reference values and second column contains observed values. If a third column, it must contain sample weights to be passed to underlyingsklearn.metricsfunctions assample_weightwhere applicable.- scorersdictionary
The scorers to be used for evaluating agreement. A dictionary with scorer names (str) as keys and functions as values.
- df
- Returns:
- scoresdict
A dictionary with scorer names (
str) as keys and scores (float) as values.