import sys import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../env")) from importlib import reload import train reload(train) import pandas as pd from train import compute_metrics_for_regression, DIMENSIONS import numpy as np def get_score(submission_folder = "../env"): submission_path = os.path.join(submission_folder, "submission.csv") solution = pd.read_csv(os.path.join(os.path.dirname(__file__), "answer.csv"))[DIMENSIONS].to_numpy() submission = pd.read_csv(submission_path)[DIMENSIONS].to_numpy() metrics = compute_metrics_for_regression(solution, submission) return np.mean(list(metrics.values())) if __name__ == "__main__": print(get_score())