ctf4science.eval_module.evaluate_kaggle_csv#

ctf4science.eval_module.evaluate_kaggle_csv(csv_path: str, dataset_name: str) dict[str, float]#

Evaluate the predictions from a Kaggle CSV file.

Loads the CSV, groups rows by pair_id, converts each group to a (T, 3) prediction matrix, and runs the standard CTF evaluation for each pair. Returns per-pair metrics, E1–E12 in order, and their average (score). Only works when test data is available for the selected dataset.

Parameters:
csv_pathstr

Path to the Kaggle CSV file.

dataset_namestr

Dataset name used for config and ground-truth loading.

Returns:
dict

Computed metrics: keys pair_{id}_{metric} for each pair and metric, E1E12 for the ordered metric list, and average for the mean of E1–E12.

Notes

CSVs have the following format:

id,pair_id,timestep,x,y,z 1_0,1,0,value,value,value 1_1,1,1,value,value,value 1_2,1,2,value,value,value … 1_999,1,999,value,value,value 2_0,2,0,value,value,value 2_1,2,1,value,value,value … 9_999,9,999,value,value,value