Lim0011's picture
Upload 251 files
85e3d20 verified
raw
history blame
569 Bytes
import sys
import os
sys.path.append("../env")
import pandas as pd
import numpy as np
from datasets import load_dataset
def get_score(submission_folder = "../env"):
submission_path = os.path.join(submission_folder, "submission.csv")
submission = pd.read_csv(submission_path)
test_data = pd.read_csv(os.path.join(os.path.dirname(__file__),'answer.csv'))
correct_matches = submission['Transported'] == test_data['Transported']
accuracy = correct_matches.sum() / len(submission)
return accuracy
if __name__ == "__main__":
print(get_score())