%run compute_quantile.py ../audio_test_article/*/* import sklearn import sklearn.metrics df = pd.read_pickle("results_all_article_vit.pkl") df = df.dropna() df['groundtrue'] = df['file'].str.contains("-1.WAV") df['groundtrue'].sum() df['sess'] = df['file'].str.split("/", expand=True)[3] df['lot'] = df['file'].str.split("/", expand=True)[2] acc = sklearn.metrics.accuracy_score(df['groundtrue'], df['prediction']>0.5) acc = sklearn.metrics.recall_score(df['groundtrue']==True, df['prediction']>0.5) rec = sklearn.metrics.recall_score(df['groundtrue']==True, df['prediction']>0.5) prec = sklearn.metrics.precision_score(df['groundtrue']==True, df['prediction']>0.5) acc, prec, rec