File size: 1,515 Bytes
2db37b1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import plotly.express as px
import pandas as pd
import re

# Define columns for all relevant predictions
pred_columns = ['pred_dependencies', 'pred_training', 
                'pred_evaluation', 'pred_weights', 'pred_readme', 
                'pred_license']

# Define the real and predicted column pairs
real_pred_columns = {
    'dependencies': 'pred_dependencies',
    'training': 'pred_training',
    'evaluation': 'pred_evaluation',
    'weights': 'pred_weights',
    'readme': 'pred_readme',
    'license': 'pred_license'
}

df = pd.read_csv('data/results.csv', sep="\t")

# Cleanup
df['year'] = pd.to_numeric(df['year'], errors='coerce')
df = df.dropna(subset=['year'])
df['year'] = df['year'].astype(int)

custom_order = ["MICCAI", "MIDL", "Nature", "arXiv"]

# Group by venue
df_filtered = df[df['pred_live'] == "Yes"].copy()
df_filtered['license'] = df_filtered['license'].apply(lambda row: row if ((row == "No") | (pd.isna(row))) else "Yes")

# Add matching counts for each category
for real, pred in real_pred_columns.items():
    df_filtered[f'matching_{real}'] = df_filtered[real] == df_filtered[pred]

for real, pred in real_pred_columns.items():
    print(f"Evaluations for {real}:")
    for idx, row in df_filtered.iterrows():
        if ((row['year'] == 2024) | pd.isna(row["url"]) | (row["url"] == "") | (pd.isna(row[real]))):
            continue

        if not(row[f'matching_{real}']):
            print(f"Automated test for {real} failed for link: {row['url']} [{row[real]} - {row[pred]}]")