(df, perm_cutoff=20)
return pd.concat(out, axis=0, names=["dataset", "index"]).reset_index()
Compute meta-analysis statistics from results dataframe

    Parameters
    ----------
    df: DataFrame
        results obtained by an evaluation
    perm_cutoff: int, default=20
        threshold value for using permutation or Wilcoxon tests

    Returns
    -------
    stats: DataFrame
        Table of effect and p-values for each dataset and all pipelines
Compute meta-analysis statistics from results dataframe
Compute meta - analysis statistics from results dataframe
def compute_dataset_statistics(df, perm_cutoff=20):
    """Compute meta-analysis statistics from results dataframe

    Parameters
    ----------
    df: DataFrame
        results obtained by an evaluation
    perm_cutoff: int, default=20
        threshold value for using permutation or Wilcoxon tests

    Returns
    -------
    stats: DataFrame
        Table of effect and p-values for each dataset and all pipelines
    """
    df = collapse_session_scores(df)
    algs = df.pipeline.unique()
    dsets = df.dataset.unique()
    out = {}
    for d in dsets:
        score_data = df[df.dataset == d].pivot(
            index="subject", values="score", columns="pipeline"
        )
        if score_data.shape[0] < perm_cutoff:
            p = compute_pvals_perm(score_data, algs)
        else:
            p = compute_pvals_wilcoxon(score_data, algs)
        t = compute_effect(score_data, algs)
        P = pd.DataFrame(index=pd.Index(algs, name="pipe1"), columns=algs, data=p)
        T = pd.DataFrame(index=pd.Index(algs, name="pipe1"), columns=algs, data=t)
        D1 = pd.melt(P.reset_index(), id_vars="pipe1", var_name="pipe2", value_name="p")
        D2 = pd.melt(T.reset_index(), id_vars="pipe1", var_name="pipe2", value_name="smd")
        stats_df = D1.merge(D2)
        stats_df["nsub"] = score_data.shape[0]
        out[d] = stats_df
    return pd.concat(out, axis=0, names=["dataset", "index"]).reset_index()
def compute_dataset_statistics ( df , perm_cutoff = 20 ) : df = collapse_session_scores ( df ) algs = df . pipeline . unique ( ) dsets = df . dataset . unique ( ) out = { } for d in dsets : score_data = df [ df . dataset == d ] . pivot ( index = "subject" , values = "score" , columns = "pipeline" ) if score_data . shape [ 0 ] < perm_cutoff : p = compute_pvals_perm ( score_data , algs ) else : p = compute_pvals_wilcoxon ( score_data , algs ) t = compute_effect ( score_data , algs ) P = pd . DataFrame ( index = pd . Index ( algs , name = "pipe1" ) , columns = algs , data = p ) T = pd . DataFrame ( index = pd . Index ( algs , name = "pipe1" ) , columns = algs , data = t ) D1 = pd . melt ( P . reset_index ( ) , id_vars = "pipe1" , var_name = "pipe2" , value_name = "p" ) D2 = pd . melt ( T . reset_index ( ) , id_vars = "pipe1" , var_name = "pipe2" , value_name = "smd" ) stats_df = D1 . merge ( D2 ) stats_df [ "nsub" ] = score_data . shape [ 0 ] out [ d ] = stats_df return pd . concat ( out , axis = 0 , names = [ "dataset" , "index" ] ) . reset_index ( )